webapp: Enforce login for config, firmware and reboot view
This commit is contained in:
parent
510f0c59f9
commit
1530dc6629
@ -112,7 +112,7 @@ import {
|
||||
} from 'bootstrap-icons-vue';
|
||||
import * as bootstrap from 'bootstrap';
|
||||
import BootstrapAlert from "@/components/BootstrapAlert.vue";
|
||||
import { handleResponse, authHeader } from '@/utils/authentication';
|
||||
import { handleResponse, authHeader, isLoggedIn } from '@/utils/authentication';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
@ -137,6 +137,9 @@ export default defineComponent({
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
if (!isLoggedIn()) {
|
||||
this.$router.push({ path: "/login", query: { returnUrl: this.$router.currentRoute.value.fullPath } });
|
||||
}
|
||||
this.modalFactoryReset = new bootstrap.Modal('#factoryReset');
|
||||
this.loading = false;
|
||||
},
|
||||
|
||||
@ -77,7 +77,7 @@ import {
|
||||
BIconArrowRepeat,
|
||||
BIconCheckCircle
|
||||
} from 'bootstrap-icons-vue';
|
||||
import { authHeader } from '@/utils/authentication';
|
||||
import { authHeader, isLoggedIn } from '@/utils/authentication';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
@ -184,6 +184,9 @@ export default defineComponent({
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
if (!isLoggedIn()) {
|
||||
this.$router.push({ path: "/login", query: { returnUrl: this.$router.currentRoute.value.fullPath } });
|
||||
}
|
||||
this.loading = false;
|
||||
},
|
||||
});
|
||||
|
||||
@ -47,7 +47,7 @@ import { defineComponent } from 'vue';
|
||||
import * as bootstrap from 'bootstrap';
|
||||
import BasePage from '@/components/BasePage.vue';
|
||||
import BootstrapAlert from "@/components/BootstrapAlert.vue";
|
||||
import { handleResponse, authHeader } from '@/utils/authentication';
|
||||
import { handleResponse, authHeader, isLoggedIn } from '@/utils/authentication';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
@ -66,6 +66,10 @@ export default defineComponent({
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
if (!isLoggedIn()) {
|
||||
this.$router.push({ path: "/login", query: { returnUrl: this.$router.currentRoute.value.fullPath } });
|
||||
}
|
||||
|
||||
this.performReboot = new bootstrap.Modal('#performReboot');
|
||||
},
|
||||
methods: {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user