mirror of https://github.com/Requarks/wiki.git
25 changed files with 327 additions and 194 deletions
Unified View
Diff Options
-
2client/client-app.js
-
13client/components/admin.vue
-
2client/components/admin/admin-auth.vue
-
2client/components/admin/admin-editor.vue
-
15client/components/admin/admin-general.vue
-
6client/components/admin/admin-locale.vue
-
2client/components/admin/admin-logging.vue
-
23client/components/admin/admin-navigation.vue
-
4client/components/admin/admin-rendering.vue
-
4client/components/admin/admin-theme.vue
-
77client/components/common/criterias-item.vue
-
77client/components/common/nav-header.vue
-
2client/components/editor/editor-modal-properties.vue
-
2client/scss/app.scss
-
32client/scss/components/v-form.scss
-
27client/scss/components/vue-tree-navigation.scss
-
4client/store/index.js
-
44client/store/user.js
-
23client/themes/default/components/page.vue
-
1package.json
-
104server/controllers/auth.js
-
2server/core/auth.js
-
6server/models/users.js
-
25server/setup.js
-
22yarn.lock
@ -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.') |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
Write
Preview
Loading…
Cancel
Save