From 342747c860f5dc167487dbe5e74d46807f19508f Mon Sep 17 00:00:00 2001 From: Nick Date: Wed, 20 Mar 2019 00:37:33 -0400 Subject: [PATCH] feat: markdown editor UI fix + insert media (wip) --- client/components/common/nav-header.vue | 128 +++++++++--------- client/components/editor.vue | 12 +- client/components/editor/editor-markdown.vue | 89 +++++++++--- .../components/editor/editor-modal-media.vue | 69 ++++++++++ client/store/editor.js | 3 +- package.json | 4 + yarn.lock | 20 +++ 7 files changed, 242 insertions(+), 83 deletions(-) create mode 100644 client/components/editor/editor-modal-media.vue diff --git a/client/components/common/nav-header.vue b/client/components/common/nav-header.vue index 99399fcc..aed52948 100644 --- a/client/components/common/nav-header.vue +++ b/client/components/common/nav-header.vue @@ -57,72 +57,74 @@ v-list-tile-content Images & Files v-toolbar-title(:class='{ "ml-2": $vuetify.breakpoint.mdAndUp, "ml-0": $vuetify.breakpoint.smAndDown }') span.subheading {{title}} - v-flex(md4, v-if='searchIsShown && $vuetify.breakpoint.mdAndUp') + v-flex(md4, v-if='$vuetify.breakpoint.mdAndUp') v-toolbar.nav-header-inner(color='black', dark, flat) - transition(name='navHeaderSearch') - v-text-field( - ref='searchField', - v-if='searchIsShown && $vuetify.breakpoint.mdAndUp', - v-model='search', - color='white', - label='Search...', - single-line, - solo - flat - hide-details, - prepend-inner-icon='search', - :loading='searchIsLoading', - @keyup.enter='searchEnter' - @keyup.esc='searchClose' - @focus='searchFocus' - @blur='searchBlur' - @keyup.down='searchMove(`down`)' - @keyup.up='searchMove(`up`)' - ) - v-progress-linear( - indeterminate, - slot='progress', - height='2', - color='blue' + slot(name='mid') + transition(name='navHeaderSearch', v-if='searchIsShown') + v-text-field( + ref='searchField', + v-if='searchIsShown && $vuetify.breakpoint.mdAndUp', + v-model='search', + color='white', + label='Search...', + single-line, + solo + flat + hide-details, + prepend-inner-icon='search', + :loading='searchIsLoading', + @keyup.enter='searchEnter' + @keyup.esc='searchClose' + @focus='searchFocus' + @blur='searchBlur' + @keyup.down='searchMove(`down`)' + @keyup.up='searchMove(`up`)' ) - v-menu( - v-model='searchAdvMenuShown' - left - offset-y - min-width='450' - :close-on-content-click='false' - nudge-bottom='7' - nudge-right='5' - ) - v-btn.nav-header-search-adv(icon, outline, color='grey darken-2', slot='activator') - v-icon(color='white') expand_more - v-card.radius-0(dark) - v-toolbar(flat, color='grey darken-4', dense) - v-icon.mr-2 search - v-subheader.pl-0 Advanced Search - v-spacer - v-chip(label, small, color='primary') Coming soon - v-card-text.pa-4 - v-checkbox.mt-0( - label='Restrict to current language' - color='white' - v-model='searchRestrictLocale' - hide-details + v-progress-linear( + indeterminate, + slot='progress', + height='2', + color='blue' ) - v-checkbox( - label='Search below current path only' - color='white' - v-model='searchRestrictPath' - hide-details - ) - v-divider - v-card-actions.grey.darken-3-d4 - v-btn(depressed, color='grey darken-3', block) - v-icon(left) chevron_right - span Save as defaults - v-btn(depressed, color='grey darken-3', block) - v-icon(left) cached - span Reset + v-menu( + v-model='searchAdvMenuShown' + left + offset-y + min-width='450' + :close-on-content-click='false' + nudge-bottom='7' + nudge-right='5' + v-if='searchIsShown' + ) + v-btn.nav-header-search-adv(icon, outline, color='grey darken-2', slot='activator') + v-icon(color='white') expand_more + v-card.radius-0(dark) + v-toolbar(flat, color='grey darken-4', dense) + v-icon.mr-2 search + v-subheader.pl-0 Advanced Search + v-spacer + v-chip(label, small, color='primary') Coming soon + v-card-text.pa-4 + v-checkbox.mt-0( + label='Restrict to current language' + color='white' + v-model='searchRestrictLocale' + hide-details + ) + v-checkbox( + label='Search below current path only' + color='white' + v-model='searchRestrictPath' + hide-details + ) + v-divider + v-card-actions.grey.darken-3-d4 + v-btn(depressed, color='grey darken-3', block) + v-icon(left) chevron_right + span Save as defaults + v-btn(depressed, color='grey darken-3', block) + v-icon(left) cached + span Reset v-flex(xs6, :md4='searchIsShown', :md6='!searchIsShown') v-toolbar.nav-header-inner(color='black', dark, flat) v-spacer diff --git a/client/components/editor.vue b/client/components/editor.vue index 1090e0ad..f22e35c7 100644 --- a/client/components/editor.vue +++ b/client/components/editor.vue @@ -1,6 +1,10 @@