diff --git a/client/components/common/nav-header.vue b/client/components/common/nav-header.vue index 9dd3addc..0e0a13e5 100644 --- a/client/components/common/nav-header.vue +++ b/client/components/common/nav-header.vue @@ -241,12 +241,6 @@ 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-convert(v-model='convertPageModal', v-if='path && path.length') - - .nav-header-dev(v-if='isDevMode') - v-icon mdi-alert - div - .overline DEVELOPMENT VERSION - .overline This code base is NOT for production use! diff --git a/ux/src/components/PageDeleteDialog.vue b/ux/src/components/PageDeleteDialog.vue new file mode 100644 index 00000000..9e3e4100 --- /dev/null +++ b/ux/src/components/PageDeleteDialog.vue @@ -0,0 +1,109 @@ + + + diff --git a/ux/src/components/PageSaveDialog.vue b/ux/src/components/PageSaveDialog.vue index 103475e0..a929fdfc 100644 --- a/ux/src/components/PageSaveDialog.vue +++ b/ux/src/components/PageSaveDialog.vue @@ -1,57 +1,376 @@ - diff --git a/ux/src/components/TreeLevel.vue b/ux/src/components/TreeLevel.vue index dbf46b04..31efee46 100644 --- a/ux/src/components/TreeLevel.vue +++ b/ux/src/components/TreeLevel.vue @@ -6,6 +6,7 @@ ul.treeview-level q-icon(name='img:/_assets/icons/fluent-ftp.svg', size='sm') .treeview-label-text(:class='$q.dark.isActive ? `text-purple-4` : `text-purple`') root q-menu( + v-if='rootContextActionList.length > 0' touch-position context-menu auto-close @@ -14,10 +15,15 @@ ul.treeview-level ) q-card.q-pa-sm q-list(dense, style='min-width: 150px;') - q-item(clickable, @click='createRootFolder') + q-item( + v-for='action of rootContextActionList' + :key='action.key' + clickable + @click='action.handler(null)' + ) q-item-section(side) - q-icon(name='las la-plus-circle', color='primary') - q-item-section New Folder + q-icon(:name='action.icon', :color='action.iconColor') + q-item-section(:class='action.labelColor && (`text-` + action.labelColor)') {{action.label}} q-icon( v-if='!selection' name='las la-angle-right' @@ -62,9 +68,15 @@ const roots = inject('roots') const nodes = inject('nodes') const selection = inject('selection') const emitContextAction = inject('emitContextAction') +const contextActionList = inject('contextActionList') // COMPUTED +const rootContextActionList = computed(() => { + if (props.parentId) { return [] } + return contextActionList.filter(c => c.key === 'newFolder') +}) + const level = computed(() => { const items = [] if (!props.parentId) { diff --git a/ux/src/components/TreeNav.vue b/ux/src/components/TreeNav.vue index ac25e5fd..4b42de0e 100644 --- a/ux/src/components/TreeNav.vue +++ b/ux/src/components/TreeNav.vue @@ -7,6 +7,7 @@