From 3c26bb2fc6afa94a8c0b3e0ff4e102813116adcf Mon Sep 17 00:00:00 2001 From: Stefan Zermatten Date: Sun, 28 Mar 2021 12:31:39 +0200 Subject: [PATCH] Reworked log data format, overhauled snackbar --- .../api/creature/actions/applyAction.js | 2 +- .../api/creature/actions/applyAdjustment.js | 10 +- .../api/creature/actions/applyAttack.js | 3 +- .../api/creature/actions/applyDamage.js | 24 ++-- app/imports/api/creature/actions/applyRoll.js | 3 +- app/imports/api/creature/actions/applySave.js | 13 +- .../api/creature/actions/applyToggle.js | 5 +- .../api/creature/actions/spendResources.js | 6 +- app/imports/api/creature/log/CreatureLogs.js | 47 ++----- .../api/creature/log/LogContentSchema.js | 25 +--- app/imports/parser/parseTree/OperatorNode.js | 4 + app/imports/server/config/SyncedCronConfig.js | 6 + .../ui/components/snackbars/SnackbarQueue.js | 16 +++ .../ui/components/snackbars/SnackbarQueue.vue | 128 ++++++++++++++++++ .../ui/components/snackbars/Snackbars.vue | 46 ------- .../ui/components/snackbars/snackboxStore.js | 47 ------- .../ui/creature/character/CharacterSheet.vue | 8 +- .../CreaturePropertyDialog.vue | 3 +- app/imports/ui/creature/slots/Slots.vue | 3 +- app/imports/ui/layouts/AppLayout.vue | 6 +- app/imports/ui/log/LogContent.vue | 51 +++++++ app/imports/ui/log/LogEntry.vue | 48 +------ app/imports/ui/vueSetup.js | 4 +- app/imports/ui/vuexStore.js | 2 - app/package-lock.json | 5 + app/package.json | 1 + app/server/main.js | 1 + 27 files changed, 273 insertions(+), 244 deletions(-) create mode 100644 app/imports/server/config/SyncedCronConfig.js create mode 100644 app/imports/ui/components/snackbars/SnackbarQueue.js create mode 100644 app/imports/ui/components/snackbars/SnackbarQueue.vue delete mode 100644 app/imports/ui/components/snackbars/Snackbars.vue delete mode 100644 app/imports/ui/components/snackbars/snackboxStore.js create mode 100644 app/imports/ui/log/LogContent.vue diff --git a/app/imports/api/creature/actions/applyAction.js b/app/imports/api/creature/actions/applyAction.js index 82ea824b..1ffb7990 100644 --- a/app/imports/api/creature/actions/applyAction.js +++ b/app/imports/api/creature/actions/applyAction.js @@ -4,7 +4,7 @@ import embedInlineCalculations from '/imports/api/creature/computation/afterComp export default function applyAction({prop, log}){ let content = { name: prop.name }; if (prop.summary){ - content.description = embedInlineCalculations( + content.value = embedInlineCalculations( prop.summary, prop.summaryCalculations ); } diff --git a/app/imports/api/creature/actions/applyAdjustment.js b/app/imports/api/creature/actions/applyAdjustment.js index 88740430..5c106a73 100644 --- a/app/imports/api/creature/actions/applyAdjustment.js +++ b/app/imports/api/creature/actions/applyAdjustment.js @@ -21,7 +21,7 @@ export default function applyAdjustment({ context.errors.forEach(e => { log.content.push({ name: 'Attribute damage error', - error: e.message || e.toString(), + value: e.message || e.toString(), }); }); if (damageTargets) { @@ -41,15 +41,15 @@ export default function applyAdjustment({ }); log.content.push({ name: 'Attribute damage', - resultPrefix: `${prop.stat} ${prop.operation === 'set' ? 'set to' : ''}`, - result: `${result.isNumber ? -result.value : result.toString()}`, + value: `${prop.stat}${prop.operation === 'set' ? ' set to' : ''}` + + ` ${result.isNumber ? -result.value : result.toString()}`, }); }); } else { log.content.push({ name: 'Attribute damage', - resultPrefix: `${prop.stat} ${prop.operation === 'set' ? 'set to' : ''}`, - result: `${result.isNumber ? -result.value : result.toString()}`, + value: `${prop.stat}${prop.operation === 'set' ? ' set to' : ''}` + + ` ${result.isNumber ? -result.value : result.toString()}`, }); } } diff --git a/app/imports/api/creature/actions/applyAttack.js b/app/imports/api/creature/actions/applyAttack.js index 18f4933e..e3774041 100644 --- a/app/imports/api/creature/actions/applyAttack.js +++ b/app/imports/api/creature/actions/applyAttack.js @@ -17,7 +17,6 @@ export default function applyAttack({ log.content.push({ name: criticalHit ? 'Critical Hit!' : 'To Hit', - resultPrefix: `1d20 [${value}] + ${prop.rollBonusResult} = `, - result, + value: `1d20 [${value}] + ${prop.rollBonusResult} = ` + result, }); } diff --git a/app/imports/api/creature/actions/applyDamage.js b/app/imports/api/creature/actions/applyDamage.js index 9704aa6c..04ca05d2 100644 --- a/app/imports/api/creature/actions/applyDamage.js +++ b/app/imports/api/creature/actions/applyDamage.js @@ -42,15 +42,15 @@ export default function applyDamage({ if (result.constructor.name === 'ErrorNode'){ log.content.push({ name: 'Damage error', - error: result.toString(), + value: result.toString(), }); return; } // Memoise the damage suffix for the log - let suffix = (criticalHit ? ' critical ' : '') + + let suffix = (criticalHit ? ' critical ' : ' ') + prop.damageType + - (prop.damageType !== 'healing' ? ' damage': ''); + (prop.damageType !== ' healing ' ? ' damage ': ''); if (damageTargets && damageTargets.length) { // Iterate through all the targets @@ -69,7 +69,7 @@ export default function applyDamage({ if (result.constructor.name === 'ErrorNode' || !result.isNumber){ log.content.push({ name: 'Damage error', - error: result.toString(), + value: result.toString(), }); return; } @@ -86,26 +86,21 @@ export default function applyDamage({ // Target is same as self, log damage as such log.content.push({ name, - result: damageDealt, - details: suffix + ' to self', + value: damageDealt + suffix + ' to self', }); } else { log.content.push({ name, - resultPrefix: 'Dealt ', - result: damageDealt, - details: suffix + `${target.name && ' to '}${target.name}`, + value: 'Dealt ' + damageDealt + suffix + ` ${target.name && ' to '}${target.name}`, }); // Log the damage received on that creature's log as well insertCreatureLog.call({ log: { + creatureId: target._id, content: [{ name, - resultPrefix: 'Recieved ', - result: damageDealt, - details: suffix, + value: 'Recieved ' + damageDealt + suffix, }], - creatureId: target._id, } }); } @@ -114,8 +109,7 @@ export default function applyDamage({ // There are no targets, just log the result log.content.push({ name: prop.damageType === 'healing' ? 'Healing' : 'Damage', - result: result.toString(), - details: suffix, + value: result.toString() + suffix, }); } } diff --git a/app/imports/api/creature/actions/applyRoll.js b/app/imports/api/creature/actions/applyRoll.js index 208cbeb1..8653ba7a 100644 --- a/app/imports/api/creature/actions/applyRoll.js +++ b/app/imports/api/creature/actions/applyRoll.js @@ -20,7 +20,6 @@ export default function applyRoll({ } log.content.push({ name: prop.name, - resultPrefix: prop.variableName + ' = ' + prop.roll + ' = ', - result: result.toString(), + value: prop.variableName + ' = ' + prop.roll + ' = ' + result.toString(), }); } diff --git a/app/imports/api/creature/actions/applySave.js b/app/imports/api/creature/actions/applySave.js index de01a5c5..bb6ce0d3 100644 --- a/app/imports/api/creature/actions/applySave.js +++ b/app/imports/api/creature/actions/applySave.js @@ -22,8 +22,7 @@ export default function applySave({ let dc = result.value; log.content.push({ name: prop.name, - resultPrefix: ' DC ', - result: result.toString(), + value: ' DC ' + result.toString(), }); if (prop.target === 'self'){ let save = CreaturesProperties.findOne({ @@ -36,7 +35,8 @@ export default function applySave({ }); if (!save){ log.content.push({ - error: 'No saving throw found: ' + prop.stat, + name: 'Saving throw error', + value: 'No saving throw found: ' + prop.stat, }); return; } @@ -60,9 +60,7 @@ export default function applySave({ let saveSuccess = result >= dc; log.content.push({ name: 'Save', - resultPrefix, - result, - details: saveSuccess ? 'Passed' : 'Failed' + value: resultPrefix + result + (saveSuccess ? 'Passed' : 'Failed') }); return !saveSuccess; } else { @@ -71,7 +69,8 @@ export default function applySave({ } } catch (e){ log.content.push({ - error: e.toString(), + name: 'Save error', + value: e.toString(), }); } } diff --git a/app/imports/api/creature/actions/applyToggle.js b/app/imports/api/creature/actions/applyToggle.js index 1922978f..79d222ed 100644 --- a/app/imports/api/creature/actions/applyToggle.js +++ b/app/imports/api/creature/actions/applyToggle.js @@ -21,14 +21,13 @@ export default function applyToggle({ if (result.constructor.name === 'ErrorNode') { log.content.push({ name: 'Toggle error', - error: result.toString(), + value: result.toString(), }); return false; } log.content.push({ name: prop.name || 'Toggle', - resultPrefix: prop.condition + ' = ', - result: result.toString(), + value: prop.condition + ' = ' + result.toString(), }); return !!result.value; } diff --git a/app/imports/api/creature/actions/spendResources.js b/app/imports/api/creature/actions/spendResources.js index da8dc653..ef71c04a 100644 --- a/app/imports/api/creature/actions/spendResources.js +++ b/app/imports/api/creature/actions/spendResources.js @@ -61,7 +61,7 @@ export default function spendResources({prop, log}){ }); log.content.push({ name: 'Uses left', - result: prop.usesResult - (prop.usesUsed || 0) - 1, + value: prop.usesResult - (prop.usesUsed || 0) - 1, }); } @@ -84,10 +84,10 @@ export default function spendResources({prop, log}){ // Log all the spending if (gainLog.length) log.content.push({ name: 'Gained', - description: gainLog.join('\n'), + value: gainLog.join('\n'), }); if (spendLog.length) log.content.push({ name: 'Spent', - description: spendLog.join('\n'), + value: spendLog.join('\n'), }); } diff --git a/app/imports/api/creature/log/CreatureLogs.js b/app/imports/api/creature/log/CreatureLogs.js index bd20a1b7..aec3a4c8 100644 --- a/app/imports/api/creature/log/CreatureLogs.js +++ b/app/imports/api/creature/log/CreatureLogs.js @@ -58,6 +58,7 @@ function removeOldLogs(creatureId){ sort: {date: -1}, skip: PER_CREATURE_LOG_LIMIT, }); + if (!firstExpiredLog) return; // Remove all logs older than the one over the limit CreatureLogs.remove({ creatureId, @@ -69,32 +70,10 @@ function logToMessageData(log){ let embed = { fields: [], }; - log.content.forEach(c => { - let field = {}; - let descriptionField = {}; - if (c.name) field.name = c.name; - let valueArray = []; - if (c.error) valueArray.push(`*${c.error}*`); - if (c.resultPrefix) valueArray.push(`${c.resultPrefix}`); - if (c.result) valueArray.push(`\`${c.result}\``); - if (c.details) valueArray.push(c.details); - if (valueArray.length) field.value = valueArray.join(' '); - if (c.description){ - if (!field.value){ - field.value = c.description; - } else { - descriptionField.value = c.description; - } - } - if (field.name || field.value){ - if (!field.name) field.name = '\u200b'; - if (!field.value) field.value = '\u200b'; - embed.fields.push(field); - } - if (descriptionField.value){ - descriptionField.name = '\u200b'; - embed.fields.push(descriptionField); - } + log.content.forEach(field => { + if (!field.name) field.name = '\u200b'; + if (!field.value) field.value = '\u200b'; + embed.fields.push(field); }); return { embeds: [embed] }; } @@ -109,7 +88,7 @@ function logWebhook({log, creature}){ } const insertCreatureLog = new ValidatedMethod({ - name: 'creatureLogs.methods.insertCreatureLog', + name: 'creatureLogs.methods.insert', mixins: [RateLimiterMixin], rateLimit: { numRequests: 5, @@ -138,7 +117,7 @@ const insertCreatureLog = new ValidatedMethod({ export function insertCreatureLogWork({log, creature, method}){ // Build the new log if (typeof log === 'string'){ - log = {text: log}; + log = {content: [{value: log}]}; } log.date = new Date(); // Insert it @@ -190,30 +169,30 @@ const logRoll = new ValidatedMethod({ parsedResult = parse(roll); } catch (e){ let error = prettifyParseError(e); - logContent.push({error}); + logContent.push({name: 'Parse Error', value: error}); } if (parsedResult) try { let rollContext = new CompilationContext(); let compiled = parsedResult.compile(creature.variables, rollContext); let compiledString = compiled.toString(); if (!equalIgnoringWhitespace(compiledString, roll)) logContent.push({ - details: roll + value: roll }); logContent.push({ - details: compiledString + value: compiledString }); let rolled = compiled.roll(creature.variables, rollContext); let rolledString = rolled.toString(); if (rolledString !== compiledString) logContent.push({ - result: rolled.toString() + value: rolled.toString() }); let result = rolled.reduce(creature.variables, rollContext); let resultString = result.toString(); if (resultString !== rolledString) logContent.push({ - result: resultString + value: resultString }); } catch (e){ - logContent = [{error: 'Calculation error'}]; + logContent = [{name: 'Calculation error'}]; } const log = { content: logContent, diff --git a/app/imports/api/creature/log/LogContentSchema.js b/app/imports/api/creature/log/LogContentSchema.js index 80c9994b..b20c7464 100644 --- a/app/imports/api/creature/log/LogContentSchema.js +++ b/app/imports/api/creature/log/LogContentSchema.js @@ -3,31 +3,14 @@ import ErrorSchema from '/imports/api/properties/subSchemas/ErrorSchema.js'; import RollDetailsSchema from '/imports/api/properties/subSchemas/RollDetailsSchema.js'; let LogContentSchema = new SimpleSchema({ + // The name of the field, included in discord webhook message name: { type: String, optional: true, }, - error: { - type: String, - optional: true, - }, - resultPrefix: { - type: String, - optional: true, - }, - result: { - type: String, - optional: true, - }, - expandedResult: { - type: String, - optional: true, - }, - details: { - type: String, - optional: true, - }, - description: { + // The details of the field, included in discord webhook message + // Markdown support + value: { type: String, optional: true, }, diff --git a/app/imports/parser/parseTree/OperatorNode.js b/app/imports/parser/parseTree/OperatorNode.js index 7bd546de..56633993 100644 --- a/app/imports/parser/parseTree/OperatorNode.js +++ b/app/imports/parser/parseTree/OperatorNode.js @@ -53,6 +53,10 @@ export default class OperatorNode extends ParseNode { } toString(){ let {left, right, operator} = this; + // special case of adding a negative number + if (operator === '+' && right.isNumber && right.value < 0){ + return `${left.toString()} - ${-right.value}` + } return `${left.toString()} ${operator} ${right.toString()}`; } traverse(fn){ diff --git a/app/imports/server/config/SyncedCronConfig.js b/app/imports/server/config/SyncedCronConfig.js new file mode 100644 index 00000000..8ef48fec --- /dev/null +++ b/app/imports/server/config/SyncedCronConfig.js @@ -0,0 +1,6 @@ +import { SyncedCron } from 'meteor/percolate:synced-cron'; + +SyncedCron.config({ + // Log job run details to console + log: false, +}); diff --git a/app/imports/ui/components/snackbars/SnackbarQueue.js b/app/imports/ui/components/snackbars/SnackbarQueue.js new file mode 100644 index 00000000..887a219f --- /dev/null +++ b/app/imports/ui/components/snackbars/SnackbarQueue.js @@ -0,0 +1,16 @@ +// 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, + id: ++lastSnackbarId, + enqueuedAt: new Date(), + shown: false, + }); +} + +export {snackbar, globalState} diff --git a/app/imports/ui/components/snackbars/SnackbarQueue.vue b/app/imports/ui/components/snackbars/SnackbarQueue.vue new file mode 100644 index 00000000..0cd0ecd6 --- /dev/null +++ b/app/imports/ui/components/snackbars/SnackbarQueue.vue @@ -0,0 +1,128 @@ + + + diff --git a/app/imports/ui/components/snackbars/Snackbars.vue b/app/imports/ui/components/snackbars/Snackbars.vue deleted file mode 100644 index 711c5e5a..00000000 --- a/app/imports/ui/components/snackbars/Snackbars.vue +++ /dev/null @@ -1,46 +0,0 @@ - - - - - diff --git a/app/imports/ui/components/snackbars/snackboxStore.js b/app/imports/ui/components/snackbars/snackboxStore.js deleted file mode 100644 index 9ea306ef..00000000 --- a/app/imports/ui/components/snackbars/snackboxStore.js +++ /dev/null @@ -1,47 +0,0 @@ -const snackbarStore = { - state: { - snackbars: [], - snackbarTimout: undefined, - }, - mutations: { - addSnackbar(state, value){ - state.snackbars.push(value) - }, - closeCurrentSnackbar (state){ - state.snackbars.shift(); - }, - cancelSnackbarTimeout (state){ - if(state.snackbarTimout){ - clearTimeout(state.snackbarTimout); - } - }, - setSnackbarTimout(state, value){ - state.snackbarTimout = value; - }, - }, - actions: { - snackbar({dispatch, commit}, value){ - // value = { - // text, - // showCloseButton, - // callback, - // callbackName - // } - commit('addSnackbar', value); - commit('setSnackbarTimout', setTimeout(() => { - dispatch('closeSnackbar'); - }, 5000)); - }, - closeSnackbar({dispatch, commit, state}){ - commit('closeCurrentSnackbar'); - commit('cancelSnackbarTimeout'); - if (state.snackbars.length){ - commit('setSnackbarTimout', setTimeout(() => { - dispatch('closeSnackbar'); - }, 5000)); - } - }, - } -}; - -export default snackbarStore; diff --git a/app/imports/ui/creature/character/CharacterSheet.vue b/app/imports/ui/creature/character/CharacterSheet.vue index 639fc237..1d43a1ab 100644 --- a/app/imports/ui/creature/character/CharacterSheet.vue +++ b/app/imports/ui/creature/character/CharacterSheet.vue @@ -78,6 +78,7 @@ import TreeTab from '/imports/ui/creature/character/characterSheetTabs/TreeTab.vue'; import { assertEditPermission } from '/imports/api/creature/creaturePermissions.js'; import CreatureLogs from '/imports/api/creature/log/CreatureLogs.js'; + import { snackbar } from '/imports/ui/components/snackbars/SnackbarQueue.js'; export default { components: { @@ -119,13 +120,10 @@ this.logObserver = CreatureLogs.find({ creatureId: this.creatureId, }).observe({ - added(doc){ + added({content}){ if (!that.$subReady.singleCharacter) return; if (that.$store.state.rightDrawer) return; - that.$store.dispatch('snackbar', { - text: doc.name, - showCloseButton: true, - }); + snackbar({content}); }, }); }, diff --git a/app/imports/ui/creature/creatureProperties/CreaturePropertyDialog.vue b/app/imports/ui/creature/creatureProperties/CreaturePropertyDialog.vue index 0a250bee..1eecafb4 100644 --- a/app/imports/ui/creature/creatureProperties/CreaturePropertyDialog.vue +++ b/app/imports/ui/creature/creatureProperties/CreaturePropertyDialog.vue @@ -80,6 +80,7 @@ import getPropertyTitle from '/imports/ui/properties/shared/getPropertyTitle.js' import { assertEditPermission } from '/imports/api/creature/creaturePermissions.js'; import { get, findLast } from 'lodash'; import equipItem from '/imports/api/creature/creatureProperties/methods/equipItem.js'; +import { snackbar } from '/imports/ui/components/snackbars/SnackbarQueue.js'; let formIndex = {}; for (let key in propertyFormIndex){ @@ -194,7 +195,7 @@ export default { } else { this.$store.dispatch('popDialogStack'); } - this.$store.dispatch('snackbar', { + snackbar({ text: `Deleted ${getPropertyTitle(this.model)}`, callbackName: 'undo', callback(){ diff --git a/app/imports/ui/creature/slots/Slots.vue b/app/imports/ui/creature/slots/Slots.vue index 77af4a26..1e4d5211 100644 --- a/app/imports/ui/creature/slots/Slots.vue +++ b/app/imports/ui/creature/slots/Slots.vue @@ -57,6 +57,7 @@ import softRemoveProperty from '/imports/api/creature/creatureProperties/methods import restoreProperty from '/imports/api/creature/creatureProperties/methods/restoreProperty.js'; import getPropertyTitle from '/imports/ui/properties/shared/getPropertyTitle.js'; import insertPropertyFromLibraryNode from '/imports/api/creature/creatureProperties/methods/insertPropertyFromLibraryNode.js'; +import { snackbar } from '/imports/ui/components/snackbars/SnackbarQueue.js'; export default { components: { @@ -104,7 +105,7 @@ export default { }, remove(model){ softRemoveProperty.call({_id: model._id}); - this.$store.dispatch('snackbar', { + snackbar({ text: `Deleted ${getPropertyTitle(model)}`, callbackName: 'undo', callback(){ diff --git a/app/imports/ui/layouts/AppLayout.vue b/app/imports/ui/layouts/AppLayout.vue index aaf7b1bc..79d356c5 100644 --- a/app/imports/ui/layouts/AppLayout.vue +++ b/app/imports/ui/layouts/AppLayout.vue @@ -65,7 +65,7 @@ name="rightDrawer" /> - + @@ -74,13 +74,13 @@ import Sidebar from '/imports/ui/layouts/Sidebar.vue'; import DialogStack from '/imports/ui/dialogStack/DialogStack.vue'; import { mapMutations } from 'vuex'; - import Snackbars from '/imports/ui/components/snackbars/Snackbars.vue'; + import SnackbarQueue from '/imports/ui/components/snackbars/SnackbarQueue.vue'; export default { components: { Sidebar, DialogStack, - Snackbars, + SnackbarQueue, }, data(){return { name: 'Home', diff --git a/app/imports/ui/log/LogContent.vue b/app/imports/ui/log/LogContent.vue new file mode 100644 index 00000000..658a6ec4 --- /dev/null +++ b/app/imports/ui/log/LogContent.vue @@ -0,0 +1,51 @@ + + + + + + + diff --git a/app/imports/ui/log/LogEntry.vue b/app/imports/ui/log/LogEntry.vue index e310c8ef..90f7087f 100644 --- a/app/imports/ui/log/LogEntry.vue +++ b/app/imports/ui/log/LogEntry.vue @@ -6,42 +6,17 @@ v-if="model.text || (model.content && model.content.length)" class="pa-2" > -
-

- {{ content.name }} -

- {{ content.error }} - {{ content.resultPrefix }} - {{ content.result }} - {{ content.details }} - -
+ - - - - diff --git a/app/imports/ui/vueSetup.js b/app/imports/ui/vueSetup.js index 5dc40baf..be4a5657 100644 --- a/app/imports/ui/vueSetup.js +++ b/app/imports/ui/vueSetup.js @@ -3,6 +3,7 @@ import store from '/imports/ui/vuexStore.js'; import VueMeteorTracker from 'vue-meteor-tracker'; import AppLayout from '/imports/ui/layouts/AppLayout.vue'; import ReactiveProvide from 'vue-reactive-provide'; +import VueObserverUtils from '@tozd/vue-observer-utils'; import router from '/imports/ui/router.js'; import themes from '/imports/ui/themes.js'; import '/imports/ui/components/global/globalIndex.js'; @@ -35,7 +36,8 @@ Vue.use(Vuetify, { }); Vue.use(ReactiveProvide, { name: 'reactiveProvide', // default value -}) +}); +Vue.use(VueObserverUtils); // App start Meteor.startup(() => { diff --git a/app/imports/ui/vuexStore.js b/app/imports/ui/vuexStore.js index 497235a4..a15a49f3 100644 --- a/app/imports/ui/vuexStore.js +++ b/app/imports/ui/vuexStore.js @@ -1,14 +1,12 @@ import Vue from 'vue'; import Vuex from 'vuex'; import dialogStackStore from '/imports/ui/dialogStack/dialogStackStore.js'; -import snackbarStore from '/imports/ui/components/snackbars/snackboxStore.js'; Vue.use(Vuex); const store = new Vuex.Store({ strict: process.env.NODE_ENV !== 'production', modules: { dialogStack: dialogStackStore, - snackbars: snackbarStore, }, state: { drawer: undefined, diff --git a/app/package-lock.json b/app/package-lock.json index 83375293..ab672111 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -79,6 +79,11 @@ "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==" }, + "@tozd/vue-observer-utils": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@tozd/vue-observer-utils/-/vue-observer-utils-0.5.0.tgz", + "integrity": "sha512-HeRxWFJB7FXcQigH2LvauiR0l7hA4qqBC6hK9rBeKf076Ew08C4lx3eo7/YmvADt3b8ZP1j+TN0pGCEhKYOhEA==" + }, "@types/color-name": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", diff --git a/app/package.json b/app/package.json index 34de8f52..da27a6c4 100644 --- a/app/package.json +++ b/app/package.json @@ -19,6 +19,7 @@ "dependencies": { "@babel/runtime": "^7.9.2", "@chenfengyuan/vue-countdown": "^1.1.5", + "@tozd/vue-observer-utils": "^0.5.0", "animejs": "^2.2.0", "bcrypt": "^5.0.0", "core-js": "^2.6.11", diff --git a/app/server/main.js b/app/server/main.js index 3d6b4354..48e85eb4 100644 --- a/app/server/main.js +++ b/app/server/main.js @@ -1,4 +1,5 @@ import '/imports/server/config/SimpleRestConfig.js'; +import '/imports/server/config/SyncedCronConfig.js'; import '/imports/server/publications/index.js'; import '/imports/server/config/simpleSchemaDebug.js'; import '/imports/server/cron/deleteSoftRemovedDocuments.js';