|
|
@ -246,7 +246,7 @@ export default {
|
|
|
|
pictureUrl: get('user/pictureUrl'),
|
|
|
|
pictureUrl: get('user/pictureUrl'),
|
|
|
|
isAuthenticated: get('user/authenticated'),
|
|
|
|
isAuthenticated: get('user/authenticated'),
|
|
|
|
permissions: get('user/permissions'),
|
|
|
|
permissions: get('user/permissions'),
|
|
|
|
picture() {
|
|
|
|
picture () {
|
|
|
|
if (this.pictureUrl && this.pictureUrl.length > 1) {
|
|
|
|
if (this.pictureUrl && this.pictureUrl.length > 1) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
kind: 'image',
|
|
|
|
kind: 'image',
|
|
|
@ -264,27 +264,44 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
isAdmin() {
|
|
|
|
isAdmin () {
|
|
|
|
return _.intersection(this.permissions, ['manage:system', 'write:users', 'manage:users', 'write:groups', 'manage:groups', 'manage:navigation', 'manage:theme', 'manage:api']).length > 0
|
|
|
|
return _.intersection(this.permissions, ['manage:system', 'write:users', 'manage:users', 'write:groups', 'manage:groups', 'manage:navigation', 'manage:theme', 'manage:api']).length > 0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
created () {
|
|
|
|
if (this.hideSearch || this.dense || this.$vuetify.breakpoint.smAndDown) {
|
|
|
|
if (this.hideSearch || this.dense || this.$vuetify.breakpoint.smAndDown) {
|
|
|
|
this.searchIsShown = false
|
|
|
|
this.searchIsShown = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
mounted () {
|
|
|
|
|
|
|
|
this.$root.$on('pageEdit', () => {
|
|
|
|
|
|
|
|
this.pageEdit()
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
this.$root.$on('pageHistory', () => {
|
|
|
|
|
|
|
|
this.pageHistory()
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
this.$root.$on('pageSource', () => {
|
|
|
|
|
|
|
|
this.pageSource()
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
this.$root.$on('pageMove', () => {
|
|
|
|
|
|
|
|
this.pageMove()
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
this.$root.$on('pageDelete', () => {
|
|
|
|
|
|
|
|
this.pageDelete()
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
searchFocus() {
|
|
|
|
searchFocus () {
|
|
|
|
this.searchIsFocused = true
|
|
|
|
this.searchIsFocused = true
|
|
|
|
},
|
|
|
|
},
|
|
|
|
searchBlur() {
|
|
|
|
searchBlur () {
|
|
|
|
this.searchIsFocused = false
|
|
|
|
this.searchIsFocused = false
|
|
|
|
},
|
|
|
|
},
|
|
|
|
searchClose() {
|
|
|
|
searchClose () {
|
|
|
|
this.search = ''
|
|
|
|
this.search = ''
|
|
|
|
this.searchBlur()
|
|
|
|
this.searchBlur()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
searchToggle() {
|
|
|
|
searchToggle () {
|
|
|
|
this.searchIsShown = !this.searchIsShown
|
|
|
|
this.searchIsShown = !this.searchIsShown
|
|
|
|
if (this.searchIsShown) {
|
|
|
|
if (this.searchIsShown) {
|
|
|
|
_.delay(() => {
|
|
|
|
_.delay(() => {
|
|
|
@ -292,7 +309,7 @@ export default {
|
|
|
|
}, 200)
|
|
|
|
}, 200)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
searchEnter() {
|
|
|
|
searchEnter () {
|
|
|
|
this.$root.$emit('searchEnter', true)
|
|
|
|
this.$root.$emit('searchEnter', true)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
searchMove(dir) {
|
|
|
|
searchMove(dir) {
|
|
|
@ -339,7 +356,7 @@ export default {
|
|
|
|
icon: 'ferry'
|
|
|
|
icon: 'ferry'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
async changeLocale(locale) {
|
|
|
|
async changeLocale (locale) {
|
|
|
|
await this.$i18n.i18next.changeLanguage(locale.code)
|
|
|
|
await this.$i18n.i18next.changeLanguage(locale.code)
|
|
|
|
switch (this.mode) {
|
|
|
|
switch (this.mode) {
|
|
|
|
case 'view':
|
|
|
|
case 'view':
|
|
|
|