diff --git a/Makefile b/Makefile
index 726d056a..8ae711c4 100644
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,7 @@ stop: ## Stop Wiki.js
restart: ## Restart Wiki.js
node wiki restart
-dev: ## Start Wiki.js in development mode
+dev-up: ## Start Wiki.js in development mode
node wiki dev
build: ## Build Wiki.js client assets
diff --git a/client/client-app.js b/client/client-app.js
index 39d5f3ba..7fe8c56b 100644
--- a/client/client-app.js
+++ b/client/client-app.js
@@ -22,6 +22,7 @@ import VueMoment from 'vue-moment'
import VueTour from 'vue-tour'
import VueTreeNavigation from 'vue-tree-navigation'
import store from './store'
+import Cookies from 'js-cookie'
// ====================================
// Load Modules
@@ -74,7 +75,10 @@ const graphQLLink = createPersistedQueryLink().concat(
options.body = JSON.stringify(body)
// Inject authentication token
- options.headers.Authorization = `Bearer TODO`
+ const jwtToken = Cookies.get('jwt')
+ if (jwtToken) {
+ options.headers.Authorization = `Bearer ${jwtToken}`
+ }
return fetch(uri, options)
}
diff --git a/client/components/common/nav-footer.vue b/client/components/common/nav-footer.vue
index c4d6a94c..0322c8e7 100644
--- a/client/components/common/nav-footer.vue
+++ b/client/components/common/nav-footer.vue
@@ -1,14 +1,14 @@
- v-footer.justify-center(:color='color', inset)
+ v-footer.justify-center(:color='bgColor', inset)
.caption.grey--text.text--darken-1
span(v-if='company && company.length > 0') {{ $t('common:footer.copyright', { company: company, year: currentYear, interpolation: { escapeValue: false } }) }} |
span {{ $t('common:footer.poweredBy') }} #[a(href='https://wiki.js.org', ref='nofollow') Wiki.js]
v-snackbar(
:color='notification.style'
- bottom,
- right,
- multi-line,
+ bottom
+ right
+ multi-line
v-model='notificationState'
)
.text-xs-left
@@ -21,9 +21,13 @@ import { get, sync } from 'vuex-pathify'
export default {
props: {
- altbg: {
- type: Boolean,
- default: false
+ color: {
+ type: String,
+ default: 'grey lighten-3'
+ },
+ darkColor: {
+ type: String,
+ default: 'grey darken-3'
}
},
data() {
@@ -36,13 +40,11 @@ export default {
notification: get('notification'),
darkMode: get('site/dark'),
notificationState: sync('notification@isActive'),
- color() {
- if (this.altbg) {
- return 'altbg'
- } else if (!this.darkMode) {
- return 'grey lighten-3'
+ bgColor() {
+ if (!this.darkMode) {
+ return this.color
} else {
- return ''
+ return this.darkColor
}
}
}
diff --git a/client/components/common/nav-header.vue b/client/components/common/nav-header.vue
index 9801a64e..919970f4 100644
--- a/client/components/common/nav-header.vue
+++ b/client/components/common/nav-header.vue
@@ -103,7 +103,7 @@
v-list-tile(href='/p')
v-list-tile-action: v-icon(color='red') person
v-list-tile-title Profile
- v-list-tile(href='/logout')
+ v-list-tile(@click='logout')
v-list-tile-action: v-icon(color='red') exit_to_app
v-list-tile-title Logout
@@ -111,6 +111,7 @@