This commit is contained in:
@@ -40,65 +40,30 @@ TODO:
|
||||
|
||||
*/
|
||||
|
||||
//Valid values for notify type are: success, info, warning, and error
|
||||
|
||||
///////////
|
||||
//ERROR
|
||||
window.$gz.eventBus.$on("notify-error", function handleNotifyWarn(msg) {
|
||||
vm.$dialog.notify.info(msg, {
|
||||
position: "bottom-right",
|
||||
icon: "fa-exclamation-triangle",
|
||||
timeout: 8000
|
||||
});
|
||||
vm.$root.$gznotify(msg, { type: "error", timeout: 7000 });
|
||||
});
|
||||
|
||||
///////////
|
||||
//WARNING
|
||||
window.$gz.eventBus.$on("notify-warning", function handleNotifyWarn(msg) {
|
||||
vm.$dialog.notify.warning(msg, {
|
||||
position: "bottom-right",
|
||||
icon: "fa-exclamation",
|
||||
timeout: 7000
|
||||
});
|
||||
vm.$root.$gznotify(msg, { type: "warning", timeout: 7000 });
|
||||
});
|
||||
|
||||
///////////
|
||||
//INFO
|
||||
window.$gz.eventBus.$on("notify-info", function handleNotifyWarn(msg) {
|
||||
// // eslint-disable-next-line no-debugger
|
||||
// debugger;
|
||||
// eslint-disable-next-line no-console
|
||||
//console.log(msg);
|
||||
vm.$root.$gznotify(msg, { color: "info", timeout: 10000 });
|
||||
// if (vm.$root.$gznoitfy(msg, "Are you sure?", { color: "red" })) {
|
||||
// alert("YES");
|
||||
// } else {
|
||||
// alert("CANCEL");
|
||||
// }
|
||||
// vm.$dialog.notify.info(msg, {
|
||||
// position: "bottom-right",
|
||||
// icon: "fa-info-circle",
|
||||
// timeout: 3000,
|
||||
// actions: [
|
||||
// {
|
||||
// text: window.$gz.locale.get("Cancel"),
|
||||
// key: false
|
||||
// },
|
||||
// {
|
||||
// text: window.$gz.locale.get("Delete"),
|
||||
// color: "red",
|
||||
// key: true
|
||||
// }
|
||||
// ]
|
||||
// });
|
||||
vm.$root.$gznotify(msg, { type: "info", timeout: 5000 });
|
||||
});
|
||||
|
||||
///////////
|
||||
//SUCCESS
|
||||
window.$gz.eventBus.$on("notify-success", function handleNotifyWarn(msg) {
|
||||
vm.$dialog.notify.success(msg, {
|
||||
position: "bottom-right",
|
||||
icon: "fa-check-circle ",
|
||||
timeout: 3000
|
||||
});
|
||||
vm.$root.$gznotify(msg, { type: "info", timeout: 3000 });
|
||||
});
|
||||
},
|
||||
/////////////////////////////////////
|
||||
|
||||
@@ -144,7 +144,7 @@ export default function initialize() {
|
||||
if (res.data.timeZoneOffset != localOffset) {
|
||||
//TODO: localize message and also actually have a fix for it here
|
||||
//so this should be a confirm prompt but for now will just show it
|
||||
|
||||
|
||||
//for now just show the message
|
||||
window.$gz.eventBus.$emit(
|
||||
"notify-info",
|
||||
@@ -154,6 +154,19 @@ export default function initialize() {
|
||||
localOffset +
|
||||
". You might want to adjust that under user settings"
|
||||
);
|
||||
|
||||
window.$gz.eventBus.$emit(
|
||||
"notify-warning",
|
||||
"this is a warning test"
|
||||
);
|
||||
window.$gz.eventBus.$emit(
|
||||
"notify-error",
|
||||
"this is an error test"
|
||||
);
|
||||
window.$gz.eventBus.$emit(
|
||||
"notify-success",
|
||||
"this is a success test"
|
||||
);
|
||||
}
|
||||
|
||||
//Store offset in locale data
|
||||
|
||||
Reference in New Issue
Block a user