SettingTabs.vue 1.6 KB

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