From 5d7509acdfc908b3113df1c9f31f105fc8239514 Mon Sep 17 00:00:00 2001 From: NGPixel Date: Sun, 1 Dec 2019 22:45:37 -0500 Subject: [PATCH] feat: api docs editor (wip) + deps update --- client/components/admin.vue | 3 + client/components/admin/admin-theme.vue | 84 +- .../admin/admin-utilities-importv1.vue | 1 + client/components/editor.vue | 4 + .../components/editor/api/server-selector.vue | 9 + client/components/editor/editor-api.vue | 433 +++ .../editor/editor-modal-editorselect.vue | 20 +- client/static/svg/icon-graphql.svg | 1 + client/static/svg/icon-transaction-list.svg | 1 + .../themes/default/components/nav-sidebar.vue | 30 +- client/themes/default/theme.yml | 44 + package.json | 133 +- server/modules/editor/api/definition.yml | 6 + yarn.lock | 2362 +++++++++-------- 14 files changed, 1913 insertions(+), 1218 deletions(-) create mode 100644 client/components/editor/api/server-selector.vue create mode 100644 client/components/editor/editor-api.vue create mode 100644 client/static/svg/icon-graphql.svg create mode 100644 client/static/svg/icon-transaction-list.svg create mode 100644 server/modules/editor/api/definition.yml diff --git a/client/components/admin.vue b/client/components/admin.vue index b063278e..6de48bcf 100644 --- a/client/components/admin.vue +++ b/client/components/admin.vue @@ -29,6 +29,9 @@ v-list-item-action(style='min-width:auto;') v-chip(x-small, :color='darkMode ? `grey darken-3-d4` : `grey lighten-5`') .caption.grey--text {{ info.pagesTotal }} + v-list-item(to='/tags', v-if='hasPermission([`manage:system`])', disabled) + v-list-item-avatar(size='24'): v-icon(color='grey lighten-2') mdi-tag-multiple + v-list-item-title {{ $t('admin:tags.title') }} v-list-item(to='/theme', v-if='hasPermission([`manage:system`, `manage:theme`])') v-list-item-avatar(size='24'): v-icon mdi-palette-outline v-list-item-title {{ $t('admin:theme.title') }} diff --git a/client/components/admin/admin-theme.vue b/client/components/admin/admin-theme.vue index 083f8aa7..67a4c27e 100644 --- a/client/components/admin/admin-theme.vue +++ b/client/components/admin/admin-theme.vue @@ -52,21 +52,49 @@ :hint='$t(`admin:theme.darkModeHint`)' ) - //- v-card.mt-3.animated.fadeInUp.wait-p1s - //- v-toolbar(color='primary', dark, dense, flat) - //- v-toolbar-title.subtitle-1 {{$t(`admin:theme.options`)}} - //- v-spacer - //- v-chip(label, color='white', small).primary--text coming soon - //- v-card-text - //- v-select( - //- :items='iconsets' - //- outlined - //- prepend-icon='mdi-border-vertical' - //- v-model='config.iconset' - //- label='Table of Contents Position' - //- persistent-hint - //- hint='Select whether the table of contents is shown on the left, right or not at all.' - //- ) + v-card.mt-3.animated.fadeInUp.wait-p1s + v-toolbar(color='primary', dark, dense, flat) + v-toolbar-title.subtitle-1 {{$t(`admin:theme.options`)}} + v-spacer + v-chip(label, color='white', small).primary--text coming soon + v-card-text + v-select( + :items='[]' + outlined + prepend-icon='mdi-border-vertical' + v-model='config.iconset' + label='Table of Contents Position' + persistent-hint + hint='Select whether the table of contents is shown on the left, right or not at all.' + disabled + ) + + v-flex(lg6 xs12) + v-card.animated.fadeInUp.wait-p2s + v-toolbar(color='teal', dark, dense, flat) + v-toolbar-title.subtitle-1 {{$t('admin:theme.downloadThemes')}} + v-spacer + v-chip(label, color='white', small).teal--text coming soon + v-data-table( + :headers='headers', + :items='themes', + hide-default-footer, + item-key='value', + :items-per-page='1000' + ) + template(v-slot:item='thm') + td + strong {{thm.item.text}} + td + span {{ thm.item.author }} + td.text-xs-center + v-progress-circular(v-if='thm.item.isDownloading', indeterminate, color='blue', size='20', :width='2') + v-btn(v-else-if='thm.item.isInstalled && thm.item.installDate < thm.item.updatedAt', icon) + v-icon.blue--text mdi-cached + v-btn(v-else-if='thm.item.isInstalled', icon) + v-icon.green--text mdi-check-bold + v-btn(v-else, icon) + v-icon.grey--text mdi-cloud-download v-card.mt-3.animated.fadeInUp.wait-p2s v-toolbar(color='primary', dark, dense, flat) @@ -102,32 +130,6 @@ :hint='$t(`admin:theme.bodyHtmlInjectionHint`)' auto-grow ) - v-flex(lg6 xs12) - v-card.animated.fadeInUp.wait-p2s - v-toolbar(color='teal', dark, dense, flat) - v-toolbar-title.subtitle-1 {{$t('admin:theme.downloadThemes')}} - v-spacer - v-chip(label, color='white', small).teal--text coming soon - v-data-table( - :headers='headers', - :items='themes', - hide-default-footer, - item-key='value', - :items-per-page='1000' - ) - template(v-slot:item='thm') - td - strong {{thm.item.text}} - td - span {{ thm.item.author }} - td.text-xs-center - v-progress-circular(v-if='thm.item.isDownloading', indeterminate, color='blue', size='20', :width='2') - v-btn(v-else-if='thm.item.isInstalled && thm.item.installDate < thm.item.updatedAt', icon) - v-icon.blue--text mdi-cached - v-btn(v-else-if='thm.item.isInstalled', icon) - v-icon.green--text mdi-check-bold - v-btn(v-else, icon) - v-icon.grey--text mdi-cloud-download diff --git a/client/components/editor/editor-api.vue b/client/components/editor/editor-api.vue new file mode 100644 index 00000000..6eee8741 --- /dev/null +++ b/client/components/editor/editor-api.vue @@ -0,0 +1,433 @@ + + + + + diff --git a/client/components/editor/editor-modal-editorselect.vue b/client/components/editor/editor-modal-editorselect.vue index 404b6867..d10b7945 100644 --- a/client/components/editor/editor-modal-editorselect.vue +++ b/client/components/editor/editor-modal-editorselect.vue @@ -1,6 +1,6 @@