diff --git a/frontend/src/API.js b/frontend/src/API.js
index 138ffdc7..e323888c 100644
--- a/frontend/src/API.js
+++ b/frontend/src/API.js
@@ -200,8 +200,8 @@ class Api {
return localStorage.removeItem(tokenKey)
}
- saveToken(username, token) {
- const user = {username: username, token: token}
+ saveToken(username, token, admin) {
+ const user = {username: username, token: token, admin: admin}
localStorage.setItem(tokenKey, JSON.stringify(user));
return user
}
diff --git a/frontend/src/App.vue b/frontend/src/App.vue
index 94586455..69a26c2b 100644
--- a/frontend/src/App.vue
+++ b/frontend/src/App.vue
@@ -22,20 +22,20 @@
app: null
}
},
- async created() {
- this.app = await this.$store.dispatch('loadRequired')
+ async created() {
+ this.app = await this.$store.dispatch('loadRequired')
- this.app = {...this.$store.state}
+ this.app = {...this.$store.state}
- if (this.$store.getters.core.logged_in) {
- await this.$store.dispatch('loadAdmin')
- }
- this.loaded = true
- if (!this.$store.getters.core.setup) {
- this.$router.push('/setup')
- }
- window.console.log('finished loadRequired')
- },
+ if (this.$store.getters.core.logged_in) {
+ await this.$store.dispatch('loadAdmin')
+ }
+ this.loaded = true
+ if (!this.$store.getters.core.setup) {
+ this.$router.push('/setup')
+ }
+ window.console.log('finished loadRequired')
+ },
async mounted() {
if (this.$route.path !== '/setup') {
const tk = localStorage.getItem("statping_user")
diff --git a/frontend/src/components/Dashboard/DashboardMessages.vue b/frontend/src/components/Dashboard/DashboardMessages.vue
index 0b5ac770..b70c90ad 100644
--- a/frontend/src/components/Dashboard/DashboardMessages.vue
+++ b/frontend/src/components/Dashboard/DashboardMessages.vue
@@ -21,7 +21,7 @@
{{niceDate(message.start_on)}} |
-
-
+
diff --git a/frontend/src/components/Dashboard/DashboardServices.vue b/frontend/src/components/Dashboard/DashboardServices.vue
index 8617cdf9..fa1e6e3f 100644
--- a/frontend/src/components/Dashboard/DashboardServices.vue
+++ b/frontend/src/components/Dashboard/DashboardServices.vue
@@ -2,7 +2,7 @@
@@ -34,7 +34,7 @@
PRIVATE
|
-
diff --git a/frontend/src/components/Dashboard/DashboardUsers.vue b/frontend/src/components/Dashboard/DashboardUsers.vue
index d42db99c..d1299156 100644
--- a/frontend/src/components/Dashboard/DashboardUsers.vue
+++ b/frontend/src/components/Dashboard/DashboardUsers.vue
@@ -31,7 +31,7 @@
-
+
diff --git a/frontend/src/components/Dashboard/ServicesList.vue b/frontend/src/components/Dashboard/ServicesList.vue
index a8a1fb0d..8b5539c5 100644
--- a/frontend/src/components/Dashboard/ServicesList.vue
+++ b/frontend/src/components/Dashboard/ServicesList.vue
@@ -12,11 +12,11 @@
-
+
{{service.name}}
|
-
+ |
|
@@ -25,17 +25,19 @@
|
- {{serviceGroup(service)}}
+
+ {{serviceGroup(service)}}
+
|
diff --git a/frontend/src/components/Dashboard/TopNav.vue b/frontend/src/components/Dashboard/TopNav.vue
index 4df6a352..89c6dcef 100644
--- a/frontend/src/components/Dashboard/TopNav.vue
+++ b/frontend/src/components/Dashboard/TopNav.vue
@@ -14,17 +14,16 @@
Services
-
+
Users
Messages
-
-
+
Settings
-
+
Logs
@@ -47,17 +46,18 @@
name: 'TopNav',
data () {
return {
- navopen: false,
+ navopen: false
}
},
- methods: {
- async logout () {
- await Api.logout()
- this.$store.commit('setHasAllData', false)
- this.$store.commit('setToken', null)
- await this.$router.push('/')
+ methods: {
+ async logout () {
+ await Api.logout()
+ this.$store.commit('setHasAllData', false)
+ this.$store.commit('setToken', null)
+ this.$store.commit('setAdmin', false)
+ await this.$router.push('/')
+ }
}
- }
}
diff --git a/frontend/src/forms/Incident.vue b/frontend/src/forms/Incident.vue
index 170dde8c..eee400db 100644
--- a/frontend/src/forms/Incident.vue
+++ b/frontend/src/forms/Incident.vue
@@ -3,7 +3,7 @@
| |