Skip to content

Commit

Permalink
admin: Fix not found error url resolve (really!)
Browse files Browse the repository at this point in the history
  • Loading branch information
somnisomni committed Oct 30, 2023
1 parent 06a088d commit 43f698d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions projects/Admin/src/pages/NotFoundErrorPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,17 @@ import router from "@/router";
@Component({})
export default class NotFoundErrorPage extends Vue {
readonly rootRouteUrl: string = router.resolve({ name: "admin" })?.path ?? (import.meta.env.BASE_URL ?? "/");
public mounted() {
document.addEventListener("contextmenu", this.prevent);
document.addEventListener("copy", this.prevent);
document.addEventListener("cut", this.prevent);
document.addEventListener("drag", this.prevent);
}
get rootRouteUrl(): string {
return router.resolve({ name: "admin" }).href ?? (import.meta.env.BASE_URL ?? "/");
}
prevent(event: Event) {
event.preventDefault();
event.stopPropagation();
Expand Down

0 comments on commit 43f698d

Please sign in to comment.