admin-utilities.vue 3.2 KB
Newer Older
1
<template lang='pug'>
2 3 4 5
  v-container(fluid, grid-list-lg)
    v-layout(row, wrap)
      v-flex(xs12)
        .admin-header
6
          img(src='/svg/icon-maintenance.svg', alt='Utilities', style='width: 80px;')
7
          .admin-header-title
8 9
            .headline.primary--text {{$t('admin:utilities.title')}}
            .subheading.grey--text {{$t('admin:utilities.subtitle')}}
10

11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
      v-flex(lg3, xs12)
        v-card.animated.fadeInUp
          v-toolbar(flat, color='primary', dark, dense)
            .subheading {{$t('admin:utilities.tools')}}
          v-list(two-line, dense).py-0
            template(v-for='(tool, idx) in tools')
              v-list-tile(:key='tool.key', @click='selectedTool = tool.key', :disabled='!tool.isAvailable')
                v-list-tile-avatar
                  v-icon(:color='!tool.isAvailable ? `grey lighten-1` : (selectedTool === tool.key ? `blue ` : `grey darken-1`)') {{ tool.icon }}
                v-list-tile-content
                  v-list-tile-title.body-2(:class='!tool.isAvailable ? `grey--text` : (selectedTool === tool.key ? `primary--text` : ``)') {{ $t('admin:utilities.' + tool.i18nKey + 'Title') }}
                  v-list-tile-sub-title.caption(:class='!tool.isAvailable ? `grey--text text--lighten-1` : (selectedTool === tool.key ? `blue--text ` : ``)') {{ $t('admin:utilities.' + tool.i18nKey + 'Subtitle') }}
                v-list-tile-avatar(v-if='selectedTool === tool.key')
                  v-icon.animated.fadeInLeft(color='primary') arrow_forward_ios
              v-divider(v-if='idx < tools.length - 1')
26

27 28 29
      v-flex.animated.fadeInUp.wait-p2s(xs12, lg9)
        transition(name='admin-router')
          component(:is='selectedTool')
30

31 32 33
</template>

<script>
34

35
export default {
36
  components: {
37
    UtilityAuth: () => import(/* webpackChunkName: "admin" */ './admin-utilities-auth.vue'),
38
    UtilityContent: () => import(/* webpackChunkName: "admin" */ './admin-utilities-content.vue'),
39 40 41
    UtilityCache: () => import(/* webpackChunkName: "admin" */ './admin-utilities-cache.vue'),
    UtilityImportv1: () => import(/* webpackChunkName: "admin" */ './admin-utilities-importv1.vue'),
    UtilityTelemetry: () => import(/* webpackChunkName: "admin" */ './admin-utilities-telemetry.vue')
42
  },
43
  data() {
44
    return {
45 46 47 48 49 50 51 52
      selectedTool: 'UtilityAuth',
      tools: [
        {
          key: 'UtilityAuth',
          icon: 'lock_outline',
          i18nKey: 'auth',
          isAvailable: true
        },
53 54 55 56 57 58
        {
          key: 'UtilityContent',
          icon: 'insert_drive_file',
          i18nKey: 'content',
          isAvailable: true
        },
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
        {
          key: 'UtilityCache',
          icon: 'invert_colors',
          i18nKey: 'cache',
          isAvailable: true
        },
        {
          key: 'UtilityGraphEndpoint',
          icon: 'settings_ethernet',
          i18nKey: 'graphEndpoint',
          isAvailable: false
        },
        {
          key: 'UtilityImportv1',
          icon: 'present_to_all',
          i18nKey: 'importv1',
Nick's avatar
Nick committed
75
          isAvailable: false
76 77 78 79 80 81 82 83
        },
        {
          key: 'UtilityTelemetry',
          icon: 'wifi_tethering',
          i18nKey: 'telemetry',
          isAvailable: true
        }
      ]
84
    }
85 86 87 88 89 90 91
  }
}
</script>

<style lang='scss'>

</style>