Files
DiceCloud/app/imports/client/ui/components/snackbars/SnackbarQueue.js
ThaumRystra a40cae1327 Removed stray console logging
closes Creatures summoned to tabletops from libraries are missing their properties #373
2024-11-09 15:49:36 +02:00

17 lines
404 B
JavaScript

// Modified from https://gitlab.com/tozd/vue/snackbar-que
import Vue from 'vue';
const globalState = Vue.observable({ queue: [] });
let lastSnackbarId = 0;
function snackbar(data) {
globalState.queue.push({
data, //{text OR content, callback, callbackName} // content is logContent
id: ++lastSnackbarId,
enqueuedAt: new Date(),
shown: false,
});
}
export { snackbar, globalState }