This commit is contained in:
@@ -156,6 +156,11 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$root.$gzconfirm = this.$refs.gzconfirm.open;
|
this.$root.$gzconfirm = this.$refs.gzconfirm.open;
|
||||||
this.$root.$gznotify = this.$refs.gznotify.addNotification;
|
this.$root.$gznotify = this.$refs.gznotify.addNotification;
|
||||||
|
|
||||||
|
//weird bastardization thing
|
||||||
|
//basically I want to access $gz in vue components where I can't access Window
|
||||||
|
//this smells bad but it works
|
||||||
|
this.$root.$gz = window.$gz;
|
||||||
|
|
||||||
//redirect to login if not authenticated
|
//redirect to login if not authenticated
|
||||||
if (!this.$store.state.authenticated) {
|
if (!this.$store.state.authenticated) {
|
||||||
|
|||||||
@@ -18,19 +18,30 @@ export default {
|
|||||||
///////////
|
///////////
|
||||||
//ERROR
|
//ERROR
|
||||||
window.$gz.eventBus.$on("notify-error", function handleNotifyWarn(msg) {
|
window.$gz.eventBus.$on("notify-error", function handleNotifyWarn(msg) {
|
||||||
|
window.$gz.store.commit("logItem", "notify-error: " + msg);
|
||||||
vm.$root.$gznotify({ message: msg, type: "error", timeout: 5000 });
|
vm.$root.$gznotify({ message: msg, type: "error", timeout: 5000 });
|
||||||
});
|
});
|
||||||
|
|
||||||
///////////
|
///////////
|
||||||
//WARNING
|
//WARNING
|
||||||
window.$gz.eventBus.$on("notify-warning", function handleNotifyWarn(msg) {
|
window.$gz.eventBus.$on("notify-warning", function handleNotifyWarn(msg) {
|
||||||
|
window.$gz.store.commit("logItem", "notify-warning: " + msg);
|
||||||
vm.$root.$gznotify({ message: msg, type: "warning", timeout: 4000 });
|
vm.$root.$gznotify({ message: msg, type: "warning", timeout: 4000 });
|
||||||
});
|
});
|
||||||
|
|
||||||
///////////
|
///////////
|
||||||
//INFO
|
//INFO
|
||||||
window.$gz.eventBus.$on("notify-info", function handleNotifyWarn(msg) {
|
window.$gz.eventBus.$on("notify-info", function handleNotifyWarn(
|
||||||
vm.$root.$gznotify({ message: msg, type: "info", timeout: 3000 });
|
msg,
|
||||||
|
helpUrl
|
||||||
|
) {
|
||||||
|
window.$gz.store.commit("logItem", "notify-info: " + msg);
|
||||||
|
vm.$root.$gznotify({
|
||||||
|
message: msg,
|
||||||
|
type: "info",
|
||||||
|
timeout: 3000,
|
||||||
|
helpUrl: helpUrl
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
///////////
|
///////////
|
||||||
|
|||||||
@@ -151,7 +151,8 @@ export default function initialize() {
|
|||||||
"Time zone offset for your account is set to " +
|
"Time zone offset for your account is set to " +
|
||||||
res.data.timeZoneOffset +
|
res.data.timeZoneOffset +
|
||||||
" which doesn't match the local timezone offset of " +
|
" which doesn't match the local timezone offset of " +
|
||||||
localOffset
|
localOffset,
|
||||||
|
window.$gz.store.state.helpUrl + "intro/#searching"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ export default {
|
|||||||
"Operations",
|
"Operations",
|
||||||
"HelpAboutAyaNova",
|
"HelpAboutAyaNova",
|
||||||
"MenuHelp",
|
"MenuHelp",
|
||||||
|
"More",
|
||||||
"Logout",
|
"Logout",
|
||||||
//form required options
|
//form required options
|
||||||
"Active",
|
"Active",
|
||||||
|
|||||||
@@ -3,14 +3,14 @@
|
|||||||
<v-alert :type="currentNotification.type" transition="scale-transition">
|
<v-alert :type="currentNotification.type" transition="scale-transition">
|
||||||
{{ currentNotification.message }}
|
{{ currentNotification.message }}
|
||||||
</v-alert>
|
</v-alert>
|
||||||
<!-- <v-btn icon @click="isVisible = false">
|
<v-btn text v-if="currentNotification.helpUrl" @click="helpClick()">
|
||||||
<v-icon color="white">fa-times-circle</v-icon>
|
{{ this.$root.$gz.locale.get("More") }}
|
||||||
</v-btn> -->
|
</v-btn>
|
||||||
</v-snackbar>
|
</v-snackbar>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
/* Xeslint-disable */
|
/* XXXeslint-disable */
|
||||||
const DEFAULT_NOTIFY_OPTIONS = { type: "info", timeout: 3000 };
|
const DEFAULT_NOTIFY_OPTIONS = { type: "info", timeout: 3000 };
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -21,7 +21,8 @@ export default {
|
|||||||
currentNotification: {
|
currentNotification: {
|
||||||
type: "info", //one of success, info, warning, and error, see v-alert docs for more info
|
type: "info", //one of success, info, warning, and error, see v-alert docs for more info
|
||||||
timeout: 3000,
|
timeout: 3000,
|
||||||
message: null
|
message: null,
|
||||||
|
helpUrl: null
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
methods: {
|
methods: {
|
||||||
@@ -65,6 +66,9 @@ export default {
|
|||||||
this.processing = false;
|
this.processing = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
helpClick() {
|
||||||
|
window.open(this.currentNotification.helpUrl, "_blank");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user