diff --git a/server/graph/resolvers/page.js b/server/graph/resolvers/page.js
index c94cdd26..1011f905 100644
--- a/server/graph/resolvers/page.js
+++ b/server/graph/resolvers/page.js
@@ -618,7 +618,7 @@ module.exports = {
return obj.icon || 'las la-file-alt'
},
password (obj) {
- return obj ? '********' : ''
+ return obj.password ? '********' : ''
},
async tags (obj) {
return WIKI.db.pages.relatedQuery('tags').for(obj.id)
diff --git a/ux/public/_assets/icons/color-document.svg b/ux/public/_assets/icons/color-document.svg
new file mode 100644
index 00000000..069015ba
--- /dev/null
+++ b/ux/public/_assets/icons/color-document.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/ux/public/_assets/icons/color-pdf.svg b/ux/public/_assets/icons/color-pdf.svg
new file mode 100644
index 00000000..3c22eb0c
--- /dev/null
+++ b/ux/public/_assets/icons/color-pdf.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/ux/public/_assets/icons/fluent-folder.svg b/ux/public/_assets/icons/fluent-folder.svg
new file mode 100644
index 00000000..e899ab93
--- /dev/null
+++ b/ux/public/_assets/icons/fluent-folder.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/ux/public/_assets/icons/fluent-spring.svg b/ux/public/_assets/icons/fluent-spring.svg
new file mode 100644
index 00000000..52e0f030
--- /dev/null
+++ b/ux/public/_assets/icons/fluent-spring.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/ux/src/components/FileManager.vue b/ux/src/components/FileManager.vue
new file mode 100644
index 00000000..820ca5f6
--- /dev/null
+++ b/ux/src/components/FileManager.vue
@@ -0,0 +1,169 @@
+
+q-layout(view='hHh lpR fFf', container)
+ q-header.card-header
+ q-toolbar(dark)
+ q-icon(name='img:/_assets/icons/fluent-folder.svg', left, size='md')
+ span {{t(`fileman.title`)}}
+ q-toolbar(dark)
+ q-input(
+ dark
+ v-model='state.search'
+ standout='bg-white text-dark'
+ dense
+ ref='searchField'
+ style='width: 100%;'
+ label='Search folder...'
+ )
+ template(v-slot:prepend)
+ q-icon(name='las la-search')
+ template(v-slot:append)
+ q-icon.cursor-pointer(
+ name='las la-times'
+ @click='state.search=``'
+ v-if='state.search.length > 0'
+ :color='$q.dark.isActive ? `blue` : `grey-4`'
+ )
+ q-toolbar(dark)
+ q-space
+ q-btn.q-mr-sm(
+ flat
+ dense
+ color='blue-4'
+ :aria-label='t(`common.actions.upload`)'
+ icon='las la-plus-circle'
+ @click=''
+ )
+ q-tooltip(anchor='bottom middle', self='top middle') {{t(`common.actions.upload`)}}
+ q-btn(
+ flat
+ dense
+ color='positive'
+ :aria-label='t(`common.actions.upload`)'
+ icon='las la-cloud-upload-alt'
+ @click=''
+ )
+ q-tooltip(anchor='bottom middle', self='top middle') {{t(`common.actions.upload`)}}
+ q-separator.q-mx-sm(vertical, dark, inset)
+ q-btn.q-mr-sm(
+ flat
+ dense
+ color='blue-grey-4'
+ :aria-label='t(`common.actions.upload`)'
+ icon='las la-check-square'
+ @click=''
+ )
+ q-tooltip(anchor='bottom middle', self='top middle') {{t(`common.actions.upload`)}}
+ q-btn.q-mr-sm(
+ flat
+ dense
+ color='blue-grey-4'
+ :aria-label='t(`common.actions.upload`)'
+ icon='las la-list'
+ @click=''
+ )
+ q-tooltip(anchor='bottom middle', self='top middle') {{t(`common.actions.upload`)}}
+ q-btn(
+ flat
+ dense
+ color='blue-grey-4'
+ :aria-label='t(`common.actions.refresh`)'
+ icon='las la-redo-alt'
+ @click=''
+ :loading='state.loading > 0'
+ )
+ q-tooltip(anchor='bottom middle', self='top middle') {{t(`common.actions.refresh`)}}
+ q-separator.q-mx-sm(vertical, dark, inset)
+ q-btn(
+ flat
+ dense
+ color='white'
+ :aria-label='t(`common.actions.close`)'
+ icon='las la-times'
+ @click='close'
+ )
+ q-tooltip(anchor='bottom middle', self='top middle') {{t(`common.actions.close`)}}
+ q-drawer.bg-blue-grey-1(:model-value='true', :width='350')
+ q-list(padding, v-if='state.loading < 1')
+ q-drawer.bg-grey-1(:model-value='true', :width='350', side='right')
+ q-list(padding, v-if='state.loading < 1')
+ q-page-container
+ q-page.bg-white
+ q-bar.bg-grey-1
+ small.text-caption.text-grey-7 / foo / bar
+ q-list.fileman-filelist
+ q-item(clickable)
+ q-item-section(avatar)
+ q-icon(name='img:/_assets/icons/fluent-folder.svg', size='xl')
+ q-item-section
+ q-item-label Beep Boop
+ q-item-label(caption) 19 Items
+ q-item-section(side)
+ .text-caption 1
+ q-item(clickable)
+ q-item-section(avatar)
+ q-icon(name='img:/_assets/icons/fluent-folder.svg', size='xl')
+ q-item-section
+ q-item-label Beep Boop
+ q-item-label(caption) 19 Items
+ q-item-section(side)
+ .text-caption 1
+ q-item(clickable)
+ q-item-section(avatar)
+ q-icon(name='img:/_assets/icons/color-document.svg', size='xl')
+ q-item-section
+ q-item-label Beep Boop
+ q-item-label(caption) Markdown
+ q-item-section(side)
+ .text-caption 1
+ q-item(clickable)
+ q-item-section(avatar)
+ q-icon(name='img:/_assets/icons/color-pdf.svg', size='xl')
+ q-item-section
+ q-item-label Beep Boop
+ q-item-label(caption) 4 pages
+ q-item-section(side)
+ .text-caption 2022/01/01
+
+
+
+
+
+
diff --git a/ux/src/components/HeaderNav.vue b/ux/src/components/HeaderNav.vue
index 8a51d3a0..170448b1 100644
--- a/ux/src/components/HeaderNav.vue
+++ b/ux/src/components/HeaderNav.vue
@@ -80,12 +80,22 @@ q-header.bg-header.text-white.site-header(
flat
round
dense
- icon='las la-tools'
+ icon='las la-folder-open'
color='positive'
+ aria-label='File Manager'
+ @click='toggleFileManager'
+ )
+ q-tooltip File Manager
+ q-btn.q-ml-md(
+ flat
+ round
+ dense
+ icon='las la-tools'
+ color='pink'
to='/_admin'
- aria-label='Administration'
+ :aria-label='t(`common.header.admin`)'
)
- q-tooltip Administration
+ q-tooltip {{ t('common.header.admin') }}
account-menu
@@ -116,6 +126,12 @@ const { t } = useI18n()
const state = reactive({
search: ''
})
+
+// METHODS
+
+function toggleFileManager () {
+ siteStore.overlay = 'FileManager'
+}
diff --git a/ux/src/router/routes.js b/ux/src/router/routes.js
index 06a582f9..74a60f91 100644
--- a/ux/src/router/routes.js
+++ b/ux/src/router/routes.js
@@ -48,6 +48,7 @@ const routes = [
// -> System
{ path: 'api', component: () => import('pages/AdminApi.vue') },
{ path: 'extensions', component: () => import('pages/AdminExtensions.vue') },
+ { path: 'icons', component: () => import('pages/AdminIcons.vue') },
{ path: 'instances', component: () => import('pages/AdminInstances.vue') },
{ path: 'mail', component: () => import('pages/AdminMail.vue') },
// { path: 'rendering', component: () => import('pages/AdminRendering.vue') },
diff --git a/ux/src/stores/site.js b/ux/src/stores/site.js
index c9a2e631..a3f58c39 100644
--- a/ux/src/stores/site.js
+++ b/ux/src/stores/site.js
@@ -25,6 +25,7 @@ export const useSiteStore = defineStore('site', {
pageDataTemplates: [],
showSideNav: true,
showSidebar: true,
+ overlay: 'FileManager',
theme: {
dark: false,
injectCSS: '',
@@ -54,7 +55,9 @@ export const useSiteStore = defineStore('site', {
},
docsBase: 'https://next.js.wiki/docs'
}),
- getters: {},
+ getters: {
+ overlayIsShown: (state) => Boolean(state.overlay)
+ },
actions: {
async loadSite (hostname) {
try {