Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8f30cee4d3 | ||
|
|
d7f7eb2e6a | ||
|
|
a59cf1162f | ||
|
|
7bc80da99e | ||
|
|
2ddc520bb6 | ||
|
|
d92bb0f4d4 | ||
|
|
abcfe57add |
@@ -691,7 +691,7 @@
|
||||
"level": 1,
|
||||
"range": "Self",
|
||||
"school": "Divination",
|
||||
"ritual": false,
|
||||
"ritual": true,
|
||||
"name": "Comprehend Languages",
|
||||
"components": {
|
||||
"verbal": true,
|
||||
@@ -4240,7 +4240,7 @@
|
||||
},
|
||||
{
|
||||
"castingTime": "1 action",
|
||||
"description": "A creature of your choice that you can see with range perceives everything as ilariously funny and falls into fits of laughter if this spell affects it. The target must succeed on a wisdom saving throw or fall prone, becoming incapacitated and unable to stand up for this duration. A creature with an Intelligence score of 4 or less isn’t affected.\n At the end of each of its turns, and each time it takes damage, the target can make another Wisdom saving throw. The target has an advantage on the saving throw if it’s triggered by damage. On a success, the spell ends.",
|
||||
"description": "A creature of your choice that you can see with range perceives everything as hilariously funny and falls into fits of laughter if this spell affects it. The target must succeed on a wisdom saving throw or fall prone, becoming incapacitated and unable to stand up for this duration. A creature with an Intelligence score of 4 or less isn’t affected.\n At the end of each of its turns, and each time it takes damage, the target can make another Wisdom saving throw. The target has an advantage on the saving throw if it’s triggered by damage. On a success, the spell ends.",
|
||||
"duration": "Concentration, up to 1 minute",
|
||||
"level": 1,
|
||||
"range": "30 feet",
|
||||
|
||||
@@ -47,3 +47,4 @@ ecmascript@0.6.1
|
||||
es5-shim@4.6.15
|
||||
differential:vulcanize
|
||||
reactive-dict
|
||||
percolate:synced-cron
|
||||
|
||||
@@ -87,6 +87,7 @@ oauth2@1.1.11
|
||||
observe-sequence@1.0.14
|
||||
ordered-dict@1.0.9
|
||||
percolate:migrations@0.9.8
|
||||
percolate:synced-cron@1.3.2
|
||||
promise@0.8.8
|
||||
raix:eventemitter@0.1.3
|
||||
random@1.0.10
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
column-gap: 0px;
|
||||
column-width: 304px;
|
||||
padding: 4px;
|
||||
transform: translateZ(0);
|
||||
}
|
||||
|
||||
.column-container.thin-columns {
|
||||
|
||||
@@ -17,11 +17,14 @@ pushDialogStack = function({template, data, element, returnElement, callback}){
|
||||
updateHistory();
|
||||
};
|
||||
|
||||
var currentResult;
|
||||
|
||||
popDialogStack = function(result){
|
||||
if (history && history.state && history.state.openDialogs){
|
||||
currentResult = result;
|
||||
history.back();
|
||||
} else {
|
||||
popDialogStackAction();
|
||||
popDialogStackAction(result);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +32,8 @@ window.onpopstate = function(event){
|
||||
let state = event.state;
|
||||
let numDialogs = dialogs._array.length;
|
||||
if (_.isFinite(state.openDialogs) && numDialogs > state.openDialogs){
|
||||
popDialogStackAction();
|
||||
popDialogStackAction(currentResult);
|
||||
currentResult = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -25,10 +25,10 @@ Template.fabMenu.helpers({
|
||||
});
|
||||
|
||||
Template.fabMenu.events({
|
||||
"tap .expand-menu": function(event, instance) {
|
||||
"click .expand-menu": function(event, instance) {
|
||||
instance.active.set(!instance.active.get());
|
||||
},
|
||||
"tap .mini-holder paper-fab": function(event, instance) {
|
||||
"click .mini-holder paper-fab": function(event, instance) {
|
||||
instance.active.set(false);
|
||||
},
|
||||
});
|
||||
|
||||
45
rpg-docs/server/lib/cron/deleteRemovedDocuments.js
Normal file
45
rpg-docs/server/lib/cron/deleteRemovedDocuments.js
Normal file
@@ -0,0 +1,45 @@
|
||||
Meteor.startup(() => {
|
||||
const collections = [
|
||||
Attacks, Buffs, Classes, Effects, Experiences,
|
||||
Features, Notes, Proficiencies, SpellLists, Spells,
|
||||
Containers, Items,
|
||||
];
|
||||
|
||||
/**
|
||||
* Deletes all soft removed documents that were removed more than 30 minutes ago
|
||||
* and were not restored
|
||||
* @return {Number} Number of documents removed
|
||||
*/
|
||||
const deleteOldSoftRemovedDocs = function(){
|
||||
let numRemoved = 0;
|
||||
const now = new Date();
|
||||
const thirtyMinutesAgo = new Date(now.getTime() - 30*60000);
|
||||
_.each(collections, (collection) => {
|
||||
numRemoved += collection.remove({
|
||||
removed: true,
|
||||
removedAt: {$lt: thirtyMinutesAgo} // dates *before* 30 minutes ago
|
||||
});
|
||||
});
|
||||
return numRemoved;
|
||||
};
|
||||
|
||||
SyncedCron.add({
|
||||
name: "Delete all soft removed items that haven't been restored",
|
||||
schedule: function(parser) {
|
||||
return parser.text('every 6 hours');
|
||||
},
|
||||
job: function() {
|
||||
deleteOldSoftRemovedDocs();
|
||||
}
|
||||
});
|
||||
|
||||
// Add a method to manually trigger removal
|
||||
Meteor.methods({
|
||||
deleteOldSoftRemovedDocs() {
|
||||
const user = Meteor.users.findOne(this.userId);
|
||||
if (user && _.contains(user.roles, "admin")){
|
||||
return deleteOldSoftRemovedDocs();
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user