add /ws/2/notify/ socket

This commit is contained in:
j3d1 2023-11-27 01:38:43 +01:00
parent 97503e91e0
commit 101fa7b69d
10 changed files with 138 additions and 81 deletions

View file

@ -84,8 +84,10 @@ const store = new Vuex.Store({
state.loadedItems.push(item);
},
createToast(state, {title, message, color}) {
state.toasts.push({title, message, color, key: state.keyIncrement});
var toast = {title, message, color, key: state.keyIncrement}
state.toasts.push(toast);
state.keyIncrement += 1;
return toast;
},
removeToast(state, key) {
state.toasts = state.toasts.filter(toast => toast.key !== key);