SettingTabs.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <template>
  2. <div class="options-header has-background-black-ter">
  3. <div class="columns is-centered">
  4. <div class="form-column column is-two-thirds-tablet is-half-desktop is-one-third-widescreen is-one-third-fullhd">
  5. <div class="tabs is-centered is-fullwidth">
  6. <ul>
  7. <li v-for="tab in tabs" :key="tab.view" :class="{ 'is-active': tab.view === activeTab }">
  8. <router-link :id="tab.id" :to="{ name: tab.view }">{{ tab.name }}</router-link>
  9. </li>
  10. </ul>
  11. </div>
  12. </div>
  13. </div>
  14. </div>
  15. </template>
  16. <script>
  17. export default {
  18. name: 'SettingTabs',
  19. data(){
  20. return {
  21. tabs: [
  22. {
  23. 'name' : this.$t('settings.options'),
  24. 'view' : 'settings.options',
  25. 'id' : 'lnkTabOptions'
  26. },
  27. {
  28. 'name' : this.$t('settings.account'),
  29. 'view' : 'settings.account',
  30. 'id' : 'lnkTabAccount'
  31. },
  32. {
  33. 'name' : this.$t('settings.oauth'),
  34. 'view' : 'settings.oauth.tokens',
  35. 'id' : 'lnkTabOAuth'
  36. },
  37. {
  38. 'name' : this.$t('settings.webauthn'),
  39. 'view' : 'settings.webauthn.devices',
  40. 'id' : 'lnkTabWebauthn'
  41. },
  42. ]
  43. }
  44. },
  45. props: {
  46. activeTab: {
  47. type: String,
  48. default: ''
  49. },
  50. },
  51. }
  52. </script>