wikijs-fork/client/components/admin/admin-utilities.vue

92 lines
3.2 KiB
Vue
Raw Normal View History

<template lang='pug'>
v-container(fluid, grid-list-lg)
v-layout(row, wrap)
v-flex(xs12)
.admin-header
img(src='/svg/icon-maintenance.svg', alt='Utilities', style='width: 80px;')
.admin-header-title
.headline.primary--text {{$t('admin:utilities.title')}}
2019-08-03 04:48:55 +00:00
.subtitle-1.grey--text {{$t('admin:utilities.subtitle')}}
v-flex(lg3, xs12)
v-card.animated.fadeInUp
v-toolbar(flat, color='primary', dark, dense)
2019-08-03 04:48:55 +00:00
.subtitle-1 {{$t('admin:utilities.tools')}}
v-list(two-line, dense).py-0
template(v-for='(tool, idx) in tools')
2019-07-29 04:50:03 +00:00
v-list-item(:key='tool.key', @click='selectedTool = tool.key', :disabled='!tool.isAvailable')
v-list-item-avatar
v-icon(:color='!tool.isAvailable ? `grey lighten-1` : (selectedTool === tool.key ? `blue ` : `grey darken-1`)') {{ tool.icon }}
2019-07-29 04:50:03 +00:00
v-list-item-content
v-list-item-title.body-2(:class='!tool.isAvailable ? `grey--text` : (selectedTool === tool.key ? `primary--text` : ``)') {{ $t('admin:utilities.' + tool.i18nKey + 'Title') }}
2019-08-03 04:48:55 +00:00
v-list-item-subtitle: .caption(:class='!tool.isAvailable ? `grey--text text--lighten-1` : (selectedTool === tool.key ? `blue--text ` : ``)') {{ $t('admin:utilities.' + tool.i18nKey + 'Subtitle') }}
2019-07-29 04:50:03 +00:00
v-list-item-avatar(v-if='selectedTool === tool.key')
2019-08-03 04:48:55 +00:00
v-icon.animated.fadeInLeft(color='primary', large) mdi-chevron-right
v-divider(v-if='idx < tools.length - 1')
v-flex.animated.fadeInUp.wait-p2s(xs12, lg9)
transition(name='admin-router')
component(:is='selectedTool')
2018-04-07 18:08:36 +00:00
</template>
<script>
2018-04-07 18:08:36 +00:00
export default {
2018-04-07 18:08:36 +00:00
components: {
UtilityAuth: () => import(/* webpackChunkName: "admin" */ './admin-utilities-auth.vue'),
UtilityContent: () => import(/* webpackChunkName: "admin" */ './admin-utilities-content.vue'),
UtilityCache: () => import(/* webpackChunkName: "admin" */ './admin-utilities-cache.vue'),
UtilityImportv1: () => import(/* webpackChunkName: "admin" */ './admin-utilities-importv1.vue'),
UtilityTelemetry: () => import(/* webpackChunkName: "admin" */ './admin-utilities-telemetry.vue')
2018-04-07 18:08:36 +00:00
},
data() {
return {
selectedTool: 'UtilityAuth',
tools: [
{
key: 'UtilityAuth',
2019-08-03 04:48:55 +00:00
icon: 'mdi-lock-open-outline',
i18nKey: 'auth',
isAvailable: true
},
{
key: 'UtilityContent',
2019-08-03 04:48:55 +00:00
icon: 'mdi-content-duplicate',
i18nKey: 'content',
isAvailable: true
},
{
key: 'UtilityCache',
2019-08-03 04:48:55 +00:00
icon: 'mdi-database-refresh',
i18nKey: 'cache',
isAvailable: true
},
2020-05-10 22:29:24 +00:00
// {
// key: 'UtilityGraphEndpoint',
// icon: 'mdi-graphql',
// i18nKey: 'graphEndpoint',
// isAvailable: false
// },
{
key: 'UtilityImportv1',
2019-08-03 04:48:55 +00:00
icon: 'mdi-database-import',
i18nKey: 'importv1',
isAvailable: true
},
{
key: 'UtilityTelemetry',
2019-08-03 04:48:55 +00:00
icon: 'mdi-math-compass',
i18nKey: 'telemetry',
isAvailable: true
}
]
}
}
}
</script>
<style lang='scss'>
</style>