This commit is contained in:
@@ -315,6 +315,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
const vm = this;
|
||||
|
||||
vm.$vuetify.theme.dark = vm.$store.state.darkMode;
|
||||
vm.$root.$gzconfirm = vm.$refs.gzconfirm.open;
|
||||
vm.$root.$gznotify = vm.$refs.gznotify.addNotification;
|
||||
@@ -342,6 +343,7 @@ export default {
|
||||
if (!vm.$store.state.authenticated && !isReset) {
|
||||
//If a direct open path was being used but user is not logged in this will catch it
|
||||
//otherwise they will just go on to that path directly
|
||||
// eslint-disable-next-line no-debugger
|
||||
|
||||
if (toPath != undefined) {
|
||||
vm.$router.push({
|
||||
@@ -353,7 +355,10 @@ export default {
|
||||
});
|
||||
} else {
|
||||
vm.$router.push({
|
||||
name: "login"
|
||||
name: "login",
|
||||
params: {
|
||||
search: window.location.search
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -366,6 +366,7 @@ export default {
|
||||
vm.input.username = vm.$route.params.presetLogin;
|
||||
vm.input.password = vm.$route.params.presetPassword;
|
||||
}
|
||||
|
||||
vm.smallLogoUrl = window.$gz.api.logoUrl("small");
|
||||
vm.mediumLogoUrl = window.$gz.api.logoUrl("medium");
|
||||
vm.largeLogoUrl = window.$gz.api.logoUrl("large");
|
||||
@@ -384,6 +385,19 @@ export default {
|
||||
vm.hasLargeLogo = res.data.ll;
|
||||
vm.lcr = res.data.lcr; //license consent required flag
|
||||
}
|
||||
|
||||
//Live eval from website redirects here with generated creds set
|
||||
// ...login?usr={username}&pw={pw}
|
||||
//anything in window.location.search is placed in the 'search' route parameter by app.vue for parsing here because they are lost when the redirect happens to the login form as it's actually app.vue that gets hit first not login
|
||||
//Note that the $route.query system does not work no matter what I tried and seems to be broken in vue router so have to do it ourselves from the
|
||||
//Handle search query params
|
||||
if (vm.$route.params.search != undefined) {
|
||||
let params = new URLSearchParams(vm.$route.params.search);
|
||||
if (params.has("usr")) {
|
||||
vm.input.username = params.get("usr");
|
||||
vm.input.password = params.get("pw");
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
//squash it, this isn't critical
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user