mirror of https://github.com/requarks/wiki
parent
74aa09f39c
commit
f856da074e
@ -0,0 +1,32 @@
|
||||
.wiki-form {
|
||||
|
||||
&.theme--light {
|
||||
background-color: mc('grey', '50');
|
||||
}
|
||||
|
||||
.v-text-field--outline {
|
||||
.v-input__slot {
|
||||
background-color: #FFF !important;
|
||||
border-color: mc('grey', '300') !important;
|
||||
border-radius: 7px;
|
||||
|
||||
@at-root .theme--dark & {
|
||||
background-color: lighten(mc('grey', '900'), 5%) !important;
|
||||
border-color: mc('grey', '700') !important;
|
||||
|
||||
.v-label.v-label--active.primary--text {
|
||||
color: mc('blue', '500') !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
&.v-input--is-focused .v-input__slot {
|
||||
border-color: mc('blue', '500') !important;
|
||||
}
|
||||
|
||||
@at-root .theme--dark & {
|
||||
.v-icon.primary--text {
|
||||
color: mc('blue', '500') !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
.TreeNavigation.treenav {
|
||||
font-size: 13px;
|
||||
|
||||
li {
|
||||
padding-left: 24px;
|
||||
}
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: mc('grey', '800');
|
||||
}
|
||||
|
||||
.NavigationLevel__parent {
|
||||
// font-weight: 600;
|
||||
}
|
||||
|
||||
.NavigationItem {
|
||||
padding: 3px 0;
|
||||
}
|
||||
|
||||
.NavigationItem--active {
|
||||
color: #42b883;
|
||||
}
|
||||
|
||||
.NavigationToggle__icon {
|
||||
border-color: mc('blue', '600');
|
||||
}
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
import { make } from 'vuex-pathify'
|
||||
import jwt from 'jsonwebtoken'
|
||||
import Cookies from 'js-cookie'
|
||||
|
||||
const state = {
|
||||
id: 0,
|
||||
email: '',
|
||||
name: '',
|
||||
pictureUrl: '',
|
||||
localeCode: '',
|
||||
defaultEditor: '',
|
||||
permissions: [],
|
||||
iat: 0,
|
||||
exp: 0,
|
||||
authenticated: false
|
||||
}
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state,
|
||||
mutations: {
|
||||
...make.mutations(state),
|
||||
REFRESH_AUTH(state) {
|
||||
const jwtCookie = Cookies.get('jwt')
|
||||
if (jwtCookie) {
|
||||
try {
|
||||
const jwtData = jwt.decode(jwtCookie)
|
||||
state.id = jwtData.id
|
||||
state.email = jwtData.email
|
||||
state.name = jwtData.name
|
||||
state.pictureUrl = jwtData.pictureUrl
|
||||
state.localeCode = jwtData.localeCode
|
||||
state.defaultEditor = jwtData.defaultEditor
|
||||
state.permissions = jwtData.permissions
|
||||
state.iat = jwtData.iat
|
||||
state.exp = jwtData.exp
|
||||
state.authenticated = true
|
||||
} catch (err) {
|
||||
console.debug('Invalid JWT. Silent authentication skipped.')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in new issue