Browse Source

feat: static navigation menu option

pull/1783/head
NGPixel 5 years ago
parent
commit
bbe64ef6b6
4 changed files with 14 additions and 1 deletions
  1. 11
      client/components/admin/admin-navigation.vue
  2. 1
      client/static/svg/icon-features-list.svg
  3. 2
      client/themes/default/components/nav-sidebar.vue
  4. 1
      server/graph/schemas/navigation.graphql

11
client/components/admin/admin-navigation.vue

@ -39,6 +39,15 @@
v-list-item-avatar v-list-item-avatar
v-icon(v-if='$vuetify.theme.dark', :color='config.mode === `MIXED` ? `teal lighten-3` : `grey darken-2`') mdi-check-circle v-icon(v-if='$vuetify.theme.dark', :color='config.mode === `MIXED` ? `teal lighten-3` : `grey darken-2`') mdi-check-circle
v-icon(v-else, :color='config.mode === `MIXED` ? `teal` : `grey lighten-3`') mdi-check-circle v-icon(v-else, :color='config.mode === `MIXED` ? `teal` : `grey lighten-3`') mdi-check-circle
v-list-item(value='STATIC')
v-list-item-avatar
img(src='/svg/icon-features-list.svg', alt='Static Navigation')
v-list-item-content
v-list-item-title {{$t('admin:navigation.modeStatic.title')}}
v-list-item-subtitle {{$t('admin:navigation.modeStatic.description')}}
v-list-item-avatar
v-icon(v-if='$vuetify.theme.dark', :color='config.mode === `STATIC` ? `teal lighten-3` : `grey darken-2`') mdi-check-circle
v-icon(v-else, :color='config.mode === `STATIC` ? `teal` : `grey lighten-3`') mdi-check-circle
v-list-item(value='NONE') v-list-item(value='NONE')
v-list-item-avatar v-list-item-avatar
img(src='/svg/icon-cancel-dotted.svg', alt='None') img(src='/svg/icon-cancel-dotted.svg', alt='None')
@ -48,7 +57,7 @@
v-list-item-avatar v-list-item-avatar
v-icon(v-if='$vuetify.theme.dark', :color='config.mode === `none` ? `teal lighten-3` : `grey darken-2`') mdi-check-circle v-icon(v-if='$vuetify.theme.dark', :color='config.mode === `none` ? `teal lighten-3` : `grey darken-2`') mdi-check-circle
v-icon(v-else, :color='config.mode === `none` ? `teal` : `grey lighten-3`') mdi-check-circle v-icon(v-else, :color='config.mode === `none` ? `teal` : `grey lighten-3`') mdi-check-circle
v-col(cols='9', v-if='config.mode === `MIXED`')
v-col(cols='9', v-if='config.mode === `MIXED` || config.mode === `STATIC`')
v-card.animated.fadeInUp.wait-p2s v-card.animated.fadeInUp.wait-p2s
v-row(no-gutters, align='stretch') v-row(no-gutters, align='stretch')
v-col(style='flex: 0 0 350px;') v-col(style='flex: 0 0 350px;')

1
client/static/svg/icon-features-list.svg
File diff suppressed because it is too large
View File

2
client/themes/default/components/nav-sidebar.vue

@ -198,6 +198,8 @@ export default {
this.currentParent.title = `/ ${this.$t('common:sidebar.root')}` this.currentParent.title = `/ ${this.$t('common:sidebar.root')}`
if (this.navMode === 'TREE') { if (this.navMode === 'TREE') {
this.currentMode = 'browse' this.currentMode = 'browse'
} else if (this.navMode === 'STATIC') {
this.currentMode = 'custom'
} else { } else {
this.currentMode = window.localStorage.getItem('navPref') || 'custom' this.currentMode = window.localStorage.getItem('navPref') || 'custom'
} }

1
server/graph/schemas/navigation.graphql

@ -76,4 +76,5 @@ enum NavigationMode {
NONE NONE
TREE TREE
MIXED MIXED
STATIC
} }
Loading…
Cancel
Save