|
|
@ -132,6 +132,9 @@
|
|
|
|
v-list-item.pl-4(@click='pageSource', v-if='mode !== `source`')
|
|
|
|
v-list-item.pl-4(@click='pageSource', v-if='mode !== `source`')
|
|
|
|
v-list-item-avatar(size='24'): v-icon(color='indigo') mdi-code-tags
|
|
|
|
v-list-item-avatar(size='24'): v-icon(color='indigo') mdi-code-tags
|
|
|
|
v-list-item-title.body-2 {{$t('common:header.viewSource')}}
|
|
|
|
v-list-item-title.body-2 {{$t('common:header.viewSource')}}
|
|
|
|
|
|
|
|
v-list-item.pl-4(@click='pageDuplicate', v-if='isAuthenticated')
|
|
|
|
|
|
|
|
v-list-item-avatar(size='24'): v-icon(color='indigo') mdi-content-duplicate
|
|
|
|
|
|
|
|
v-list-item-title.body-2 {{$t('common:header.duplicate')}}
|
|
|
|
v-list-item.pl-4(@click='pageMove', v-if='isAuthenticated')
|
|
|
|
v-list-item.pl-4(@click='pageMove', v-if='isAuthenticated')
|
|
|
|
v-list-item-avatar(size='24'): v-icon(color='indigo') mdi-content-save-move-outline
|
|
|
|
v-list-item-avatar(size='24'): v-icon(color='indigo') mdi-content-save-move-outline
|
|
|
|
v-list-item-content
|
|
|
|
v-list-item-content
|
|
|
@ -197,6 +200,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
page-selector(mode='create', v-model='newPageModal', :open-handler='pageNewCreate', :locale='locale')
|
|
|
|
page-selector(mode='create', v-model='newPageModal', :open-handler='pageNewCreate', :locale='locale')
|
|
|
|
page-selector(mode='move', v-model='movePageModal', :open-handler='pageMoveRename', :path='path', :locale='locale')
|
|
|
|
page-selector(mode='move', v-model='movePageModal', :open-handler='pageMoveRename', :path='path', :locale='locale')
|
|
|
|
|
|
|
|
page-selector(mode='create', v-model='duplicateOpts.modal', :open-handler='pageDuplicateHandle', :path='duplicateOpts.path', :locale='duplicateOpts.locale')
|
|
|
|
page-delete(v-model='deletePageModal', v-if='path && path.length')
|
|
|
|
page-delete(v-model='deletePageModal', v-if='path && path.length')
|
|
|
|
|
|
|
|
|
|
|
|
.nav-header-dev(v-if='isDevMode')
|
|
|
|
.nav-header-dev(v-if='isDevMode')
|
|
|
@ -238,7 +242,12 @@ export default {
|
|
|
|
movePageModal: false,
|
|
|
|
movePageModal: false,
|
|
|
|
deletePageModal: false,
|
|
|
|
deletePageModal: false,
|
|
|
|
locales: siteLangs,
|
|
|
|
locales: siteLangs,
|
|
|
|
isDevMode: false
|
|
|
|
isDevMode: false,
|
|
|
|
|
|
|
|
duplicateOpts: {
|
|
|
|
|
|
|
|
locale: 'en',
|
|
|
|
|
|
|
|
path: 'new-page',
|
|
|
|
|
|
|
|
modal: false
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
computed: {
|
|
|
@ -298,6 +307,9 @@ export default {
|
|
|
|
this.$root.$on('pageMove', () => {
|
|
|
|
this.$root.$on('pageMove', () => {
|
|
|
|
this.pageMove()
|
|
|
|
this.pageMove()
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
this.$root.$on('pageDuplicate', () => {
|
|
|
|
|
|
|
|
this.pageDuplicate()
|
|
|
|
|
|
|
|
})
|
|
|
|
this.$root.$on('pageDelete', () => {
|
|
|
|
this.$root.$on('pageDelete', () => {
|
|
|
|
this.pageDelete()
|
|
|
|
this.pageDelete()
|
|
|
|
})
|
|
|
|
})
|
|
|
@ -346,6 +358,17 @@ export default {
|
|
|
|
pageSource () {
|
|
|
|
pageSource () {
|
|
|
|
window.location.assign(`/s/${this.locale}/${this.path}`)
|
|
|
|
window.location.assign(`/s/${this.locale}/${this.path}`)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
pageDuplicate () {
|
|
|
|
|
|
|
|
const pathParts = this.path.split('/')
|
|
|
|
|
|
|
|
this.duplicateOpts = {
|
|
|
|
|
|
|
|
locale: this.locale,
|
|
|
|
|
|
|
|
path: (pathParts.length > 1) ? _.initial(pathParts).join('/') + `/new-page` : `new-page`,
|
|
|
|
|
|
|
|
modal: true
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
pageDuplicateHandle ({ locale, path }) {
|
|
|
|
|
|
|
|
window.location.assign(`/e/${locale}/${path}?from=${this.$store.get('page/id')}`)
|
|
|
|
|
|
|
|
},
|
|
|
|
pageMove () {
|
|
|
|
pageMove () {
|
|
|
|
this.movePageModal = true
|
|
|
|
this.movePageModal = true
|
|
|
|
},
|
|
|
|
},
|
|
|
|