Compare commits

..

13 Commits
1.2.2 ... 1.2.8

Author SHA1 Message Date
Stefan Zermatten
398f8a8a2a Merge branch 'bugfix-style' 2017-06-28 09:33:20 +02:00
Stefan Zermatten
812a1784b2 Improved display of home page on smaller devices 2017-06-28 09:27:24 +02:00
Stefan Zermatten
8fa9cd0148 Prevented spell titles from overflowing their item in spell lists
closes #83
2017-06-28 09:26:52 +02:00
Stefan Zermatten
0e0662cc9a Added slightly specific rule to let headings wrap
closes #90
2017-06-28 09:26:13 +02:00
Stefan Zermatten
ad4e3f5b20 Stopped inventory items being separated from their containers
hopefully fixes #91
2017-06-28 09:25:25 +02:00
Stefan Zermatten
4cd058e1fe Set max of slider before value
Prevents unnecessary capping of temp HP to 100
Fixes #89
2017-06-08 09:48:51 +02:00
Stefan Zermatten
8f30cee4d3 Hotfixed column layout with translateZ(0) hack 2017-06-07 09:46:38 +02:00
Stefan Zermatten
d7f7eb2e6a Fixed some spells in the library 2017-06-07 09:35:59 +02:00
Stefan Zermatten
a59cf1162f added return value to remove old soft removed docs 2017-05-29 11:58:19 +02:00
Stefan Zermatten
7bc80da99e Moved cron setup to startup 2017-05-29 11:35:30 +02:00
Stefan Zermatten
2ddc520bb6 Added cron job to remove old documents 2017-05-29 11:16:46 +02:00
Stefan Zermatten
d92bb0f4d4 Replace tap event with click event for mini-FABs
fixes #68, probably
2017-05-16 10:36:40 +02:00
Stefan Zermatten
abcfe57add Fixed results not being used when popping dialogs
Fixes #66
2017-05-11 11:08:00 +02:00
12 changed files with 87 additions and 11 deletions

View File

@@ -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 isnt 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 its 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 isnt 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 its triggered by damage. On a success, the spell ends.",
"duration": "Concentration, up to 1 minute",
"level": 1,
"range": "30 feet",

View File

@@ -47,3 +47,4 @@ ecmascript@0.6.1
es5-shim@4.6.15
differential:vulcanize
reactive-dict
percolate:synced-cron

View File

@@ -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

View File

@@ -4,6 +4,7 @@
column-gap: 0px;
column-width: 304px;
padding: 4px;
transform: translateZ(0);
}
.column-container.thin-columns {
@@ -22,6 +23,7 @@
.card {
background: white;
border-radius: 2px;
position: initial;
}
.card .top {

View File

@@ -1,3 +1,7 @@
body .paper-font-display4, body .paper-font-display3, body .paper-font-title, body .paper-font-caption{
white-space: normal;
}
.white-text {
color: #dedede;
color: rgba(255,255,255,0.87);

View File

@@ -78,6 +78,20 @@
margin-left: 16px;
}
.spell.item > div > div {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.spell.item > div {
min-width: 0;
}
.spell.item iron-icon {
flex-shrink: 0;
}
.spellLevel {
-webkit-backface-visibility: hidden;
-webkit-transform: translateX(0);

View File

@@ -28,8 +28,8 @@
{{/unless}}
</div>
<paper-diff-slider class="tempHitPointSlider flex"
value={{left}}
max={{maximum}}
value={{left}}
editable pin
></paper-diff-slider>
</div>

View File

@@ -21,10 +21,15 @@
max-width: 300px;
padding: 16px;
text-align: center;
min-width: 0;
}
.intro .section .columns {
max-width: 100%;
}
.intro paper-button {
min-width: 200px;
flex-basis: 200px;
}

View File

@@ -64,7 +64,7 @@
</div>
<div class="section white-text" style="background: #282828">
<div class="columns layout horizontal around-justified wrap">
<div>
<div class="layout vertical center">
<div class="paper-font-headline">
Guide
</div>
@@ -78,7 +78,7 @@
</paper-button>
</a>
</div>
<div>
<div class="layout vertical center">
<div class="paper-font-headline">
Discuss
</div>
@@ -91,7 +91,7 @@
</paper-button>
</a>
</div>
<div>
<div class="layout vertical center">
<div class="paper-font-headline">
Get involved
</div>

View File

@@ -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;
}
}

View File

@@ -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);
},
});

View 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();
}
},
});
});