This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
<v-col cols="12">
|
<v-col cols="12">
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<v-icon color="red" size="100">fa-dragon</v-icon>
|
<v-icon color="red" size="100">fa-dragon</v-icon>
|
||||||
<div class="headline">
|
<div class="headline mt-8">
|
||||||
{{ msg }}
|
{{ msg }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -14,28 +14,39 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var badPath = "UNKNOWN";
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
msg: "404 - NOT FOUND"
|
msg: "-"
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
beforeCreate() {
|
created() {
|
||||||
|
// debugger;
|
||||||
|
var badPath = this.$router.history.current.path;
|
||||||
//If this happens too early then it might not have all the setup stuf available
|
//If this happens too early then it might not have all the setup stuf available
|
||||||
if (!window || !window.$gz || !window.$gz.eventBus || !window.$gz.locale) {
|
if (!window || !window.$gz || !window.$gz.eventBus || !window.$gz.locale) {
|
||||||
this.msg = '404 - "' + badPath + '" NOT FOUND';
|
//debugger;
|
||||||
|
this.msg = '404 - NOT FOUND: "' + badPath + '"';
|
||||||
} else {
|
} else {
|
||||||
|
//debugger;
|
||||||
|
var notFoundLocalized = window.$gz.locale.get("ErrorAPI2010");
|
||||||
|
//format the message
|
||||||
|
this.msg = "404 - " + notFoundLocalized + ': "' + badPath + '"';
|
||||||
|
//log it in case we need to see it in tech support
|
||||||
|
window.$gz.store.commit("logItem", this.msg);
|
||||||
|
//set the title of the window
|
||||||
window.$gz.eventBus.$emit("menu-change", {
|
window.$gz.eventBus.$emit("menu-change", {
|
||||||
isMain: true,
|
isMain: true,
|
||||||
icon: "fa-dragon",
|
icon: "fa-dragon",
|
||||||
title: '404 - "' + badPath + '"' + window.$gz.locale.get("ErrorAPI2010")
|
title: "404 - " + notFoundLocalized
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
|
||||||
beforeRouteEnter(to, from, next) {
|
|
||||||
badPath = to.path;
|
|
||||||
next();
|
|
||||||
}
|
}
|
||||||
|
// ,
|
||||||
|
// beforeRouteEnter(to, from, next) {
|
||||||
|
// //debugger;
|
||||||
|
// badPath = to.path;
|
||||||
|
// next();
|
||||||
|
// }
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user