You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

91 lines
3.3 KiB

  1. <template lang='pug'>
  2. v-container(fluid, grid-list-lg)
  3. v-layout(row, wrap)
  4. v-flex(xs12)
  5. .admin-header
  6. img(src='/_assets/svg/icon-maintenance.svg', alt='Utilities', style='width: 80px;')
  7. .admin-header-title
  8. .headline.primary--text {{$t('admin:utilities.title')}}
  9. .subtitle-1.grey--text {{$t('admin:utilities.subtitle')}}
  10. v-flex(lg3, xs12)
  11. v-card.animated.fadeInUp
  12. v-toolbar(flat, color='primary', dark, dense)
  13. .subtitle-1 {{$t('admin:utilities.tools')}}
  14. v-list(two-line, dense).py-0
  15. template(v-for='(tool, idx) in tools')
  16. v-list-item(:key='tool.key', @click='selectedTool = tool.key', :disabled='!tool.isAvailable')
  17. v-list-item-avatar
  18. v-icon(:color='!tool.isAvailable ? `grey lighten-1` : (selectedTool === tool.key ? `blue ` : `grey darken-1`)') {{ tool.icon }}
  19. v-list-item-content
  20. v-list-item-title.body-2(:class='!tool.isAvailable ? `grey--text` : (selectedTool === tool.key ? `primary--text` : ``)') {{ $t('admin:utilities.' + tool.i18nKey + 'Title') }}
  21. v-list-item-subtitle: .caption(:class='!tool.isAvailable ? `grey--text text--lighten-1` : (selectedTool === tool.key ? `blue--text ` : ``)') {{ $t('admin:utilities.' + tool.i18nKey + 'Subtitle') }}
  22. v-list-item-avatar(v-if='selectedTool === tool.key')
  23. v-icon.animated.fadeInLeft(color='primary', large) mdi-chevron-right
  24. v-divider(v-if='idx < tools.length - 1')
  25. v-flex.animated.fadeInUp.wait-p2s(xs12, lg9)
  26. transition(name='admin-router')
  27. component(:is='selectedTool')
  28. </template>
  29. <script>
  30. export default {
  31. components: {
  32. UtilityAuth: () => import(/* webpackChunkName: "admin" */ './admin-utilities-auth.vue'),
  33. UtilityContent: () => import(/* webpackChunkName: "admin" */ './admin-utilities-content.vue'),
  34. UtilityCache: () => import(/* webpackChunkName: "admin" */ './admin-utilities-cache.vue'),
  35. UtilityImportv1: () => import(/* webpackChunkName: "admin" */ './admin-utilities-importv1.vue'),
  36. UtilityTelemetry: () => import(/* webpackChunkName: "admin" */ './admin-utilities-telemetry.vue')
  37. },
  38. data() {
  39. return {
  40. selectedTool: 'UtilityAuth',
  41. tools: [
  42. {
  43. key: 'UtilityAuth',
  44. icon: 'mdi-lock-open-outline',
  45. i18nKey: 'auth',
  46. isAvailable: true
  47. },
  48. {
  49. key: 'UtilityContent',
  50. icon: 'mdi-content-duplicate',
  51. i18nKey: 'content',
  52. isAvailable: true
  53. },
  54. {
  55. key: 'UtilityCache',
  56. icon: 'mdi-database-refresh',
  57. i18nKey: 'cache',
  58. isAvailable: true
  59. },
  60. // {
  61. // key: 'UtilityGraphEndpoint',
  62. // icon: 'mdi-graphql',
  63. // i18nKey: 'graphEndpoint',
  64. // isAvailable: false
  65. // },
  66. {
  67. key: 'UtilityImportv1',
  68. icon: 'mdi-database-import',
  69. i18nKey: 'importv1',
  70. isAvailable: true
  71. },
  72. {
  73. key: 'UtilityTelemetry',
  74. icon: 'mdi-math-compass',
  75. i18nKey: 'telemetry',
  76. isAvailable: true
  77. }
  78. ]
  79. }
  80. }
  81. }
  82. </script>
  83. <style lang='scss'>
  84. </style>