SettingTabs.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <script setup>
  2. const tabs = ref([
  3. {
  4. 'name' : wTrans('settings.options'),
  5. 'view' : 'settings.options',
  6. 'id' : 'lnkTabOptions'
  7. },
  8. // {
  9. // 'name' : wTrans('settings.account'),
  10. // 'view' : 'settings.account',
  11. // 'id' : 'lnkTabAccount'
  12. // },
  13. // {
  14. // 'name' : wTrans('settings.oauth'),
  15. // 'view' : 'settings.oauth.tokens',
  16. // 'id' : 'lnkTabOAuth'
  17. // },
  18. // {
  19. // 'name' : wTrans('settings.webauthn'),
  20. // 'view' : 'settings.webauthn.devices',
  21. // 'id' : 'lnkTabWebauthn'
  22. // },
  23. ])
  24. const props = defineProps({
  25. activeTab: {
  26. type: String,
  27. default: ''
  28. },
  29. })
  30. </script>
  31. <template>
  32. <div class="options-header">
  33. <ResponsiveWidthWrapper>
  34. <div class="tabs is-centered is-fullwidth">
  35. <ul>
  36. <li v-for="tab in tabs" :key="tab.view" :class="{ 'is-active': tab.view === props.activeTab }">
  37. <RouterLink :id="tab.id" :to="{ name: tab.view }">{{ tab.name }}</RouterLink>
  38. </li>
  39. </ul>
  40. </div>
  41. </ResponsiveWidthWrapper>
  42. </div>
  43. </template>