comparison client/src/components/App.vue @ 4867:5555b77b8c4e

report backenderror due to failing OL loaders
author Thomas Junk <thomas.junk@intevation.de>
date Tue, 17 Dec 2019 14:27:44 +0100
parents 1fd771b08ced
children 8f421cd3c746
comparison
equal deleted inserted replaced
4866:9df7794ec969 4867:5555b77b8c4e
76 * Author(s): 76 * Author(s):
77 * Thomas Junk <thomas.junk@intevation.de> 77 * Thomas Junk <thomas.junk@intevation.de>
78 * Markus Kottländer <markus.kottlaender@intevation.de> 78 * Markus Kottländer <markus.kottlaender@intevation.de>
79 */ 79 */
80 import { mapState } from "vuex"; 80 import { mapState } from "vuex";
81 import { displayError } from "@/lib/errors";
81 82
82 export default { 83 export default {
83 name: "app", 84 name: "app",
84 computed: { 85 computed: {
85 ...mapState("user", ["isAuthenticated"]), 86 ...mapState("user", ["isAuthenticated"]),
86 ...mapState("application", ["contextBoxContent", "showSearchbar"]), 87 ...mapState("application", [
88 "contextBoxContent",
89 "showSearchbar",
90 "backendError"
91 ]),
87 isMapVisible() { 92 isMapVisible() {
88 return /importconfiguration|importoverview|stretches|sections|review|bottlenecks|mainview/.test( 93 return /importconfiguration|importoverview|stretches|sections|review|bottlenecks|mainview/.test(
89 this.$route.name 94 this.$route.name
90 ); 95 );
91 }, 96 },
111 Popup: () => import("./Popup"), 116 Popup: () => import("./Popup"),
112 AvailableFairwayDepthDialogue: () => 117 AvailableFairwayDepthDialogue: () =>
113 import("./fairway/AvailableFairwayDepthDialogue.vue"), 118 import("./fairway/AvailableFairwayDepthDialogue.vue"),
114 MapPopup: () => import("./map/MapPopup"), 119 MapPopup: () => import("./map/MapPopup"),
115 KeyboardHandler: () => import("./KeyboardHandler") 120 KeyboardHandler: () => import("./KeyboardHandler")
121 },
122 watch: {
123 backendError() {
124 if (this.backendError) {
125 displayError({
126 title: this.$gettext("Backend Error"),
127 message: this.$gettext(
128 "The Map information may be corrupted due to a backend error. Please contact your system operator"
129 ),
130 options: {
131 timeout: 0,
132 showProgressBar: false,
133 closeOnClick: true,
134 pauseOnHover: true,
135 oneAtTime: true,
136 bodyMaxLength: 1024
137 }
138 });
139 }
140 }
116 } 141 }
117 }; 142 };
118 </script> 143 </script>