refactor: knex remaining models

This commit is contained in:
NGPixel
2018-05-20 18:50:51 -04:00
parent c9b643fbf0
commit 17b2117b39
22 changed files with 426 additions and 447 deletions

View File

@@ -3,7 +3,7 @@
nav-header
template(slot='actions')
v-btn(outline, color='green', @click.native.stop='save')
v-icon(color='green', left) save
v-icon(color='green', left) check
span.white--text Save
v-btn(icon): v-icon(color='red') close
v-btn(icon, @click.native.stop='openModal(`properties`)'): v-icon(color='white') sort_by_alpha
@@ -11,12 +11,12 @@
v-content
editor-code
component(:is='currentModal')
v-dialog(v-model='dialogProgress', persistent, max-width='300')
v-card
v-progress-linear.my-0(indeterminate, color='primary', height='5')
v-card-text.text-xs-center
.headline Saving
.caption Please wait...
v-dialog(v-model='dialogProgress', persistent, max-width='350')
v-card(color='blue darken-3', dark)
v-card-text.text-xs-center.py-4
v-progress-circular(indeterminate, color='white', width='1')
.subheading Processing
.caption.blue--text.text--lighten-3 Please wait...
</template>
<script>

View File

@@ -1,73 +1,70 @@
<template lang='pug'>
.editor-code
.editor-code-toolbar
.editor-code-toolbar-group
.editor-code-toolbar-item(@click='toggleAround("**", "**")')
v-toolbar.editor-code-toolbar.px-3(dense, color='primary', dark)
v-btn(icon).mx-0
svg.icons.is-18(role='img')
title Bold
use(xlink:href='#fa-bold')
v-btn(icon).mx-0
svg.icons.is-18(role='img')
title Italic
use(xlink:href='#fa-italic')
v-btn(icon).mx-0
svg.icons.is-18(role='img')
title Strikethrough
use(xlink:href='#fa-strikethrough')
v-menu(offset-y, open-on-hover)
v-btn(icon, slot='activator').mx-0
svg.icons.is-18(role='img')
title Bold
use(xlink:href='#fa-bold')
.editor-code-toolbar-item
svg.icons.is-18(role='img')
title Italic
use(xlink:href='#fa-italic')
.editor-code-toolbar-item
svg.icons.is-18(role='img')
title Strikethrough
use(xlink:href='#fa-strikethrough')
.editor-code-toolbar-group
v-menu(offset-y, open-on-hover)
.editor-code-toolbar-item.is-dropdown(slot='activator')
svg.icons.is-18(role='img')
title Heading
use(xlink:href='#fa-heading')
v-list
v-list-tile(v-for='(n, idx) in 6', @click='', :key='idx')
v-list-tile-action: v-icon format_size
v-list-tile-title Heading {{n}}
.editor-code-toolbar-item
svg.icons.is-18(role='img')
title Blockquote
use(xlink:href='#fa-quote-left')
.editor-code-toolbar-group
.editor-code-toolbar-item
svg.icons.is-18(role='img')
title Unordered List
use(xlink:href='#fa-list-ul')
.editor-code-toolbar-item
svg.icons.is-18(role='img')
title Ordered List
use(xlink:href='#fa-list-ol')
.editor-code-toolbar-group
.editor-code-toolbar-item
svg.icons.is-18(role='img')
title Link
use(xlink:href='#fa-link')
.editor-code-toolbar-group
.editor-code-toolbar-item
svg.icons.is-18(role='img')
title Inline Code
use(xlink:href='#fa-terminal')
.editor-code-toolbar-item
svg.icons.is-18(role='img')
title Code Block
use(xlink:href='#fa-code')
.editor-code-toolbar-group
.editor-code-toolbar-item
svg.icons.is-18(role='img')
title Horizontal Bar
use(xlink:href='#fa-minus')
title Heading
use(xlink:href='#fa-heading')
v-list
v-list-tile(v-for='(n, idx) in 6', @click='', :key='idx')
v-list-tile-action
svg.icons.is-18(role='img')
title Heading {{n}}
use(xlink:href='#fa-heading')
v-list-tile-title Heading {{n}}
v-btn(icon).mx-0
svg.icons.is-18(role='img')
title Blockquote
use(xlink:href='#fa-quote-left')
v-btn(icon).mx-0
svg.icons.is-18(role='img')
title Unordered List
use(xlink:href='#fa-list-ul')
v-btn(icon).mx-0
svg.icons.is-18(role='img')
title Ordered List
use(xlink:href='#fa-list-ol')
v-btn(icon).mx-0
svg.icons.is-18(role='img')
title Link
use(xlink:href='#fa-link')
v-btn(icon).mx-0
svg.icons.is-18(role='img')
title Inline Code
use(xlink:href='#fa-terminal')
v-btn(icon).mx-0
svg.icons.is-18(role='img')
title Code Block
use(xlink:href='#fa-code')
v-btn(icon).mx-0
svg.icons.is-18(role='img')
title Horizontal Bar
use(xlink:href='#fa-minus')
.editor-code-main
.editor-code-editor
.editor-code-editor-title(v-if='previewShown', @click='previewShown = false') Editor
.editor-code-editor-title(v-else='previewShown', @click='previewShown = true'): v-icon(dark) search
.editor-code-editor-title(v-else='previewShown', @click='previewShown = true'): v-icon(dark) drag_indicator
codemirror(ref='cm', v-model='code', :options='cmOptions', @ready='onCmReady', @input='onCmInput')
transition(name='editor-code-preview')
.editor-code-preview(v-if='previewShown')
.editor-code-preview-title(@click='previewShown = false') Preview
.editor-code-preview-content.markdown-content(ref='editorPreview', v-html='previewHTML')
v-speed-dial(v-model='fabInsertMenu', :open-on-hover='true', direction='top', transition='slide-y-reverse-transition', fixed, right, bottom)
v-speed-dial(v-model='fabInsertMenu', :open-on-hover='true', direction='top', transition='slide-y-reverse-transition', fixed, left, bottom)
v-btn(color='blue', fab, dark, v-model='fabInsertMenu', slot='activator')
v-icon add_circle
v-icon close
@@ -276,7 +273,7 @@ export default {
background-color: darken(mc('grey', '900'), 4.5%);
flex: 1 1 50%;
display: block;
height: calc(100vh - 100px);
height: calc(100vh - 96px);
position: relative;
&-title {
@@ -361,48 +358,12 @@ export default {
&-toolbar {
background-color: mc('blue', '700');
background-image: linear-gradient(to bottom, mc('blue', '700') 0%, mc('blue','800') 100%);
height: 50px;
color: #FFF;
display: flex;
@include until($tablet) {
justify-content: center;
}
&-group {
display: flex;
+ .editor-code-toolbar-group {
border-left: 1px solid rgba(mc('blue', '600'), .5);
}
}
&-item {
width: 40px;
height: 50px;
display: flex;
justify-content: center;
align-items: center;
transition: all .4s ease;
cursor: pointer;
&:first-child {
padding-left: .5rem;
}
&:last-child {
padding-right: .5rem;
}
&:hover {
background-color: mc('blue', '600');
}
@include until($tablet) {
width: 35px;
}
}
svg {
use {
color: #FFF;

View File

@@ -31,10 +31,7 @@
v-subheader Assets
v-list-tile(avatar, @click='')
v-list-tile-avatar: v-icon(color='blue-grey') burst_mode
v-list-tile-content Images
v-list-tile(avatar, @click='')
v-list-tile-avatar: v-icon(color='blue-grey') description
v-list-tile-content Files
v-list-tile-content Images &amp; Files
v-toolbar-title
span.subheading Wiki.js
v-spacer