feat: UI improvements
This commit is contained in:
		| @@ -106,6 +106,8 @@ | |||||||
|         v-list-tile(@click='logout') |         v-list-tile(@click='logout') | ||||||
|           v-list-tile-action: v-icon(color='red') exit_to_app |           v-list-tile-action: v-icon(color='red') exit_to_app | ||||||
|           v-list-tile-title Logout |           v-list-tile-title Logout | ||||||
|  |  | ||||||
|  |     page-selector(mode='create', v-model='newPageModal') | ||||||
| </template> | </template> | ||||||
|  |  | ||||||
| <script> | <script> | ||||||
| @@ -129,7 +131,8 @@ export default { | |||||||
|       menuIsShown: true, |       menuIsShown: true, | ||||||
|       searchIsLoading: false, |       searchIsLoading: false, | ||||||
|       searchIsShown: true, |       searchIsShown: true, | ||||||
|       search: '' |       search: '', | ||||||
|  |       newPageModal: false | ||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|   computed: { |   computed: { | ||||||
| @@ -155,7 +158,7 @@ export default { | |||||||
|       this.searchIsLoading = true |       this.searchIsLoading = true | ||||||
|     }, |     }, | ||||||
|     pageNew () { |     pageNew () { | ||||||
|  |       this.newPageModal = true | ||||||
|     }, |     }, | ||||||
|     pageEdit () { |     pageEdit () { | ||||||
|       window.location.assign(`/e/${this.path}`) |       window.location.assign(`/e/${this.path}`) | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| <template lang="pug"> | <template lang="pug"> | ||||||
|   v-dialog(v-model='isShown', lazy, max-width='850px') |   v-dialog(v-model='isShown', lazy, max-width='850px') | ||||||
|     v-card |     v-card.page-selector | ||||||
|       .dialog-header |       .dialog-header | ||||||
|         span Select Page Location |         span Select Page Location | ||||||
|         v-spacer |         v-spacer | ||||||
| @@ -13,36 +13,36 @@ | |||||||
|           ) |           ) | ||||||
|       .d-flex(style='min-height:400px;') |       .d-flex(style='min-height:400px;') | ||||||
|         v-flex(xs4).grey.lighten-3 |         v-flex(xs4).grey.lighten-3 | ||||||
|           v-toolbar(color='grey lighten-2', dense, flat) |           v-toolbar(color='grey darken-3', dark, dense, flat) | ||||||
|             .body-2.grey--text.text--darken-2 Folders |             .body-2 Folders | ||||||
|             v-spacer |             v-spacer | ||||||
|             v-divider.mx-3(vertical) |             v-btn(icon): v-icon create_new_folder | ||||||
|             v-btn(icon): v-icon(color='grey') arrow_upward |           v-treeview( | ||||||
|             v-btn(icon): v-icon(color='grey darken-2') create_new_folder |             v-model='tree' | ||||||
|           v-list.grey.lighten-3(dense) |             :items='treeFolders' | ||||||
|             v-list-tile.primary(dark) |             :load-children='fetchFolders' | ||||||
|               v-list-tile-avatar: v-icon folder_open |             activatable | ||||||
|               v-list-tile-title.white--text / (Site Root) |             open-on-click | ||||||
|             v-divider |             hoverable | ||||||
|             v-list-tile |             ) | ||||||
|               v-list-tile-avatar: v-icon folder |             template(slot='prepend', slot-scope='{ item, open, leaf }') | ||||||
|               v-list-tile-title Folder B |               v-icon {{ open ? 'folder_open' : 'folder' }} | ||||||
|         v-flex(xs8) |         v-flex(xs8) | ||||||
|           v-toolbar(color='grey lighten-4', dense, flat) |           v-toolbar(color='grey darken-2', dark, dense, flat) | ||||||
|             .body-2.grey--text.text--darken-2 Pages |             .body-2 Pages | ||||||
|             v-divider.ml-4(vertical) |             v-divider.ml-4(vertical) | ||||||
|             v-text-field( |             v-text-field( | ||||||
|               prepend-inner-icon='search' |               prepend-inner-icon='search' | ||||||
|               label='Search...' |               label='Search...' | ||||||
|               hide-details |               hide-details | ||||||
|               solo |               solo | ||||||
|  |               background-color='grey darken-2' | ||||||
|               flat |               flat | ||||||
|               background-color='grey lighten-4' |  | ||||||
|               clearable |               clearable | ||||||
|               ) |               ) | ||||||
|             v-divider.mx-3(vertical) |             v-divider.mx-3(vertical) | ||||||
|             v-btn(icon): v-icon(color='grey') forward |             v-btn(icon): v-icon forward | ||||||
|             v-btn(icon): v-icon(color='grey') delete |             v-btn(icon): v-icon delete | ||||||
|           v-list(dense) |           v-list(dense) | ||||||
|             v-list-tile |             v-list-tile | ||||||
|               v-list-tile-avatar: v-icon insert_drive_file |               v-list-tile-avatar: v-icon insert_drive_file | ||||||
| @@ -71,7 +71,7 @@ | |||||||
|       v-card-chin |       v-card-chin | ||||||
|         v-spacer |         v-spacer | ||||||
|         v-btn(outline, @click='close') Cancel |         v-btn(outline, @click='close') Cancel | ||||||
|         v-btn(color='primary') |         v-btn(color='primary', @click='open') | ||||||
|           v-icon(left) check |           v-icon(left) check | ||||||
|           span Select |           span Select | ||||||
| </template> | </template> | ||||||
| @@ -82,24 +82,57 @@ export default { | |||||||
|     value: { |     value: { | ||||||
|       type: Boolean, |       type: Boolean, | ||||||
|       default: false |       default: false | ||||||
|  |     }, | ||||||
|  |     mode: { | ||||||
|  |       type: String, | ||||||
|  |       default: 'create' | ||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|   data() { |   data() { | ||||||
|     return { |     return { | ||||||
|       searchLoading: true, |       searchLoading: false, | ||||||
|       location: '/new-page' |       location: '/new-page', | ||||||
|  |       tree: [], | ||||||
|  |       treeChildren: [] | ||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|   computed: { |   computed: { | ||||||
|     isShown: { |     isShown: { | ||||||
|       get() { return this.value }, |       get() { return this.value }, | ||||||
|       set(val) { this.$emit('input', val) } |       set(val) { this.$emit('input', val) } | ||||||
|  |     }, | ||||||
|  |     treeFolders() { | ||||||
|  |       return [ | ||||||
|  |         { | ||||||
|  |           id: '/', | ||||||
|  |           name: '/ (root)', | ||||||
|  |           children: [] | ||||||
|  |         } | ||||||
|  |       ] | ||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|   methods: { |   methods: { | ||||||
|     close() { |     close() { | ||||||
|       this.isShown = false |       this.isShown = false | ||||||
|  |     }, | ||||||
|  |     open() { | ||||||
|  |       if (this.mode === 'create') { | ||||||
|  |         window.location.assign(`/e${this.location}`) | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     async fetchFolders(item) { | ||||||
|  |       console.info(item) | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
| } | } | ||||||
| </script> | </script> | ||||||
|  |  | ||||||
|  | <style lang='scss'> | ||||||
|  |  | ||||||
|  | .page-selector { | ||||||
|  |   .v-treeview-node__label { | ||||||
|  |     font-size: 13px; | ||||||
|  |   } | ||||||
|  | } | ||||||
|  |  | ||||||
|  | </style> | ||||||
|   | |||||||
| @@ -39,13 +39,13 @@ | |||||||
|             .subheading {{ $t('editor:save.processing') }} |             .subheading {{ $t('editor:save.processing') }} | ||||||
|             .caption.blue--text.text--lighten-3 {{ $t('editor:save.pleaseWait') }} |             .caption.blue--text.text--lighten-3 {{ $t('editor:save.pleaseWait') }} | ||||||
|       v-dialog(v-model='dialogEditorSelector', persistent, max-width='550') |       v-dialog(v-model='dialogEditorSelector', persistent, max-width='550') | ||||||
|         v-card(color='blue darken-3', dark) |         v-card.radius-7(color='blue darken-3', dark) | ||||||
|           v-card-text.text-xs-center.py-4 |           v-card-text.text-xs-center.py-4 | ||||||
|             .subheading Which editor do you want to use? |             .subheading Which editor do you want to use for this page? | ||||||
|             v-container(grid-list-lg, fluid) |             v-container(grid-list-lg, fluid) | ||||||
|               v-layout(row, wrap, justify-center) |               v-layout(row, wrap, justify-center) | ||||||
|                 v-flex(xs4) |                 v-flex(xs4) | ||||||
|                   v-card( |                   v-card.radius-7( | ||||||
|                     hover |                     hover | ||||||
|                     light |                     light | ||||||
|                     ripple |                     ripple | ||||||
| @@ -54,7 +54,7 @@ | |||||||
|                       v-icon(large, color='primary') code |                       v-icon(large, color='primary') code | ||||||
|                       .body-2.mt-2 Code |                       .body-2.mt-2 Code | ||||||
|                 v-flex(xs4) |                 v-flex(xs4) | ||||||
|                   v-card( |                   v-card.radius-7( | ||||||
|                     hover |                     hover | ||||||
|                     light |                     light | ||||||
|                     ripple |                     ripple | ||||||
| @@ -63,7 +63,7 @@ | |||||||
|                       v-icon(large, color='primary') list_alt |                       v-icon(large, color='primary') list_alt | ||||||
|                       .body-2.mt-2 Markdown |                       .body-2.mt-2 Markdown | ||||||
|                 v-flex(xs4) |                 v-flex(xs4) | ||||||
|                   v-card.grey( |                   v-card.radius-7.grey( | ||||||
|                     hover |                     hover | ||||||
|                     light |                     light | ||||||
|                     ripple |                     ripple | ||||||
| @@ -71,6 +71,7 @@ | |||||||
|                     v-card-text.text-xs-center(@click='selectEditor("wysiwyg")') |                     v-card-text.text-xs-center(@click='selectEditor("wysiwyg")') | ||||||
|                       v-icon(large, color='grey darken-1') web |                       v-icon(large, color='grey darken-1') web | ||||||
|                       .body-2.mt-2.grey--text.text--darken-2 Visual Builder |                       .body-2.mt-2.grey--text.text--darken-2 Visual Builder | ||||||
|  |             .caption.blue--text.text--lighten-2 This cannot be changed later. | ||||||
|  |  | ||||||
|     v-snackbar( |     v-snackbar( | ||||||
|       :color='notification.style' |       :color='notification.style' | ||||||
|   | |||||||
| @@ -19,12 +19,14 @@ | |||||||
|         v-btn.pl-0(v-if='$vuetify.breakpoint.xsOnly', flat, @click='toggleNavigation') |         v-btn.pl-0(v-if='$vuetify.breakpoint.xsOnly', flat, @click='toggleNavigation') | ||||||
|           v-icon(color='grey darken-2', left) menu |           v-icon(color='grey darken-2', left) menu | ||||||
|           span Navigation |           span Navigation | ||||||
|         v-breadcrumbs.pl-0(v-else, divider='/') |         v-breadcrumbs.breadcrumbs-nav.pl-0( | ||||||
|           v-breadcrumbs-item: v-icon home |           v-else | ||||||
|           v-breadcrumbs-item Universe |           :items='breadcrumbs' | ||||||
|           v-breadcrumbs-item Galaxy |           divider='/' | ||||||
|           v-breadcrumbs-item Solar System |           ) | ||||||
|           v-breadcrumbs-item Planet Earth |           template(slot='item', slot-scope='props') | ||||||
|  |             v-icon(v-if='props.item.path === "/"', small) home | ||||||
|  |             v-btn.ma-0(v-else, :href='props.item.path', small, flat) {{props.item.name}} | ||||||
|         template(v-if='!isPublished') |         template(v-if='!isPublished') | ||||||
|           v-spacer |           v-spacer | ||||||
|           .caption.red--text Unpublished |           .caption.red--text Unpublished | ||||||
| @@ -150,6 +152,13 @@ export default { | |||||||
|   data() { |   data() { | ||||||
|     return { |     return { | ||||||
|       navOpen: false, |       navOpen: false, | ||||||
|  |       breadcrumbs: [ | ||||||
|  |         { path: '/', name: 'Home' }, | ||||||
|  |         { path: '/universe', name: 'Universe' }, | ||||||
|  |         { path: '/universe/galaxy', name: 'Galaxy' }, | ||||||
|  |         { path: '/universe/galaxy/solar-system', name: 'Solar System' }, | ||||||
|  |         { path: '/universe/galaxy/solar-system/planet-earth', name: 'Planet Earth' } | ||||||
|  |       ], | ||||||
|       toc: [ |       toc: [ | ||||||
|         { |         { | ||||||
|           name: 'Introduction', |           name: 'Introduction', | ||||||
| @@ -220,4 +229,19 @@ export default { | |||||||
|  |  | ||||||
| <style lang="scss"> | <style lang="scss"> | ||||||
|  |  | ||||||
|  | .breadcrumbs-nav { | ||||||
|  |   .v-btn { | ||||||
|  |     min-width: 0; | ||||||
|  |     &__content { | ||||||
|  |       text-transform: none; | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  |   .v-breadcrumbs__divider:nth-child(2n) { | ||||||
|  |     padding: 0 6px; | ||||||
|  |   } | ||||||
|  |   .v-breadcrumbs__divider:nth-child(2) { | ||||||
|  |     padding: 0 6px 0 12px; | ||||||
|  |   } | ||||||
|  | } | ||||||
|  |  | ||||||
| </style> | </style> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user