Commit 6041b169 authored by Nick's avatar Nick

fix: session knex connector + editor UI improvements

parent 4552c6d2
......@@ -6,25 +6,25 @@
.subheading.grey--text {{currentPageTitle}}
v-spacer
template(slot='actions')
v-btn(
outline
v-btn.animated.fadeInDown(
flat
color='green'
@click.native.stop='save'
:class='{ "is-icon": $vuetify.breakpoint.mdAndDown }'
)
v-icon(color='green', :left='$vuetify.breakpoint.lgAndUp') check
span.white--text(v-if='$vuetify.breakpoint.lgAndUp') {{ mode === 'create' ? $t('common:actions.create') : $t('common:actions.save') }}
v-btn(
outline
v-btn.animated.fadeInDown.wait-p1s(
flat
color='blue'
@click.native.stop='openPropsModal'
:class='{ "is-icon": $vuetify.breakpoint.mdAndDown, "mx-0": !welcomeMode, "ml-0": welcomeMode }'
)
v-icon(color='blue', :left='$vuetify.breakpoint.lgAndUp') sort_by_alpha
span.white--text(v-if='$vuetify.breakpoint.lgAndUp') {{ $t('editor:page') }}
v-btn(
v-btn.animated.fadeInDown.wait-p2s(
v-if='!welcomeMode'
outline
flat
color='red'
:class='{ "is-icon": $vuetify.breakpoint.mdAndDown }'
@click.native.stop='exit'
......
......@@ -5,7 +5,7 @@ $use-bounce: true;
@import "~animate-sass/animate";
@for $i from 1 to 9 {
@for $i from 1 to 12 {
.wait-p#{$i}s {
animation-delay: $i * .1s !important;
}
......
......@@ -274,6 +274,10 @@
padding: 1rem 1rem 1rem 3rem;
margin: 1rem 24px;
@at-root .theme--dark & {
background-color: darken(mc('grey', '900'), 5%);
}
> code {
background-color: transparent;
padding: 0;
......
......@@ -57,6 +57,7 @@
"chokidar": "2.1.5",
"clean-css": "4.2.1",
"compression": "1.7.4",
"connect-session-knex": "1.4.0",
"cookie-parser": "1.4.4",
"cors": "2.8.5",
"custom-error-instance": "2.1.1",
......
......@@ -5,6 +5,7 @@ const cookieParser = require('cookie-parser')
const cors = require('cors')
const express = require('express')
const session = require('express-session')
const KnexSessionStore = require('connect-session-knex')(session)
const favicon = require('serve-favicon')
const fs = require('fs-extra')
const http = require('http')
......@@ -69,7 +70,10 @@ module.exports = async () => {
app.use(session({
secret: WIKI.config.sessionSecret,
resave: false,
saveUninitialized: false
saveUninitialized: false,
store: new KnexSessionStore({
knex: WIKI.models.knex
})
}))
app.use(WIKI.auth.passport.initialize())
app.use(WIKI.auth.authenticate)
......
......@@ -88,6 +88,9 @@ module.exports = class Editor extends Model {
} catch (err) {
WIKI.logger.error(`Failed to scan or load new editors: [ FAILED ]`)
WIKI.logger.error(err)
if (trx) {
trx.rollback()
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment