Compare commits
26 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
612e127be4 | ||
|
|
2b0d975cee | ||
|
|
248ab9bb6b | ||
|
|
314ce85410 | ||
|
|
9ff45dbcc2 | ||
|
|
6caf19bc99 | ||
|
|
c2b04d0977 | ||
|
|
9012c4a558 | ||
|
|
65a84937f2 | ||
|
|
eebb88b6b1 | ||
|
|
06ab7c5116 | ||
|
|
89f03c7601 | ||
|
|
9d2eb14c0c | ||
|
|
7b3cb54983 | ||
|
|
a09bad2fed | ||
|
|
afd897edfe | ||
|
|
efc79cb6e7 | ||
|
|
35efe39ea7 | ||
|
|
034067bd6e | ||
|
|
0d75cd5d15 | ||
|
|
4f1376a666 | ||
|
|
78b1d71b9d | ||
|
|
1323d8006c | ||
|
|
87d722adaf | ||
|
|
90e511eb00 | ||
|
|
5b8c25f5de |
@@ -159,6 +159,7 @@ Schemas.Character = new SimpleSchema({
|
|||||||
deathSave: {type: Schemas.DeathSave},
|
deathSave: {type: Schemas.DeathSave},
|
||||||
|
|
||||||
//permissions
|
//permissions
|
||||||
|
party: {type: String, regEx: SimpleSchema.RegEx.Id, optional: true},
|
||||||
owner: {type: String, regEx: SimpleSchema.RegEx.Id},
|
owner: {type: String, regEx: SimpleSchema.RegEx.Id},
|
||||||
readers: {type: [String], regEx: SimpleSchema.RegEx.Id, defaultValue: []},
|
readers: {type: [String], regEx: SimpleSchema.RegEx.Id, defaultValue: []},
|
||||||
writers: {type: [String], regEx: SimpleSchema.RegEx.Id, defaultValue: []},
|
writers: {type: [String], regEx: SimpleSchema.RegEx.Id, defaultValue: []},
|
||||||
@@ -173,6 +174,14 @@ Schemas.Character = new SimpleSchema({
|
|||||||
//slowed down by carrying too much?
|
//slowed down by carrying too much?
|
||||||
"settings.useVariantEncumbrance": {type: Boolean, defaultValue: false},
|
"settings.useVariantEncumbrance": {type: Boolean, defaultValue: false},
|
||||||
"settings.useStandardEncumbrance": {type: Boolean, defaultValue: true},
|
"settings.useStandardEncumbrance": {type: Boolean, defaultValue: true},
|
||||||
|
//hide spellcasting
|
||||||
|
"settings.hideSpellcasting": {type: Boolean, defaultValue: false},
|
||||||
|
//show to anyone with link
|
||||||
|
"settings.viewPermission": {
|
||||||
|
type: String,
|
||||||
|
defaultValue: "whitelist",
|
||||||
|
allowedValues: ["whitelist", "public"],
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
Characters.attachSchema(Schemas.Character);
|
Characters.attachSchema(Schemas.Character);
|
||||||
|
|||||||
@@ -45,7 +45,26 @@ Meteor.methods({
|
|||||||
metaData: Object,
|
metaData: Object,
|
||||||
});
|
});
|
||||||
report.owner = this.userId;
|
report.owner = this.userId;
|
||||||
Reports.insert(report);
|
var id = Reports.insert(report);
|
||||||
|
var user = Meteor.users.findOne(this.userId);
|
||||||
|
var sender = user &&
|
||||||
|
user.emails &&
|
||||||
|
user.emails[0] &&
|
||||||
|
user.emails[0].address ||
|
||||||
|
user.services &&
|
||||||
|
user.services.google &&
|
||||||
|
user.services.google.email ||
|
||||||
|
"reports@dicecloud.com";
|
||||||
|
var bodyText = "Report ID: " + id +
|
||||||
|
"\nSeverity: " + report.severity +
|
||||||
|
"\nType: " + report.type +
|
||||||
|
"\n\n" + report.description;
|
||||||
|
Email.send({
|
||||||
|
from: sender,
|
||||||
|
to: "stefan.zermatten@gmail.com",
|
||||||
|
subject: "DiceCloud feedback - " + report.title,
|
||||||
|
text: bodyText,
|
||||||
|
});
|
||||||
},
|
},
|
||||||
deleteReport: function(id) {
|
deleteReport: function(id) {
|
||||||
var user = Meteor.users.findOne(this.userId);
|
var user = Meteor.users.findOne(this.userId);
|
||||||
|
|||||||
@@ -4,17 +4,9 @@ Router.configure({
|
|||||||
});
|
});
|
||||||
|
|
||||||
Router.plugin("ensureSignedIn", {
|
Router.plugin("ensureSignedIn", {
|
||||||
except: [
|
only: [
|
||||||
"home",
|
"profile",
|
||||||
"atSignIn",
|
"characterList",
|
||||||
"atSignUp",
|
|
||||||
"atForgotPassword",
|
|
||||||
"atResetPwd",
|
|
||||||
"atEnrollAccount",
|
|
||||||
"atVerifyEmail",
|
|
||||||
"atResendVerificationEmail",
|
|
||||||
"loginButtons",
|
|
||||||
"notFound",
|
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -93,4 +85,11 @@ Router.map(function() {
|
|||||||
document.title = appName;
|
document.title = appName;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.route("/guide", {
|
||||||
|
name: "guide",
|
||||||
|
onAfterAction: function() {
|
||||||
|
document.title = appName;
|
||||||
|
},
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -20,6 +20,11 @@ openParentDialog = function(parent, charId, heroId) {
|
|||||||
template: "itemDialog",
|
template: "itemDialog",
|
||||||
data: {itemId: parent.id},
|
data: {itemId: parent.id},
|
||||||
};
|
};
|
||||||
|
} else if (parent.collection === "Spells") {
|
||||||
|
detail = {
|
||||||
|
template: "spellDialog",
|
||||||
|
data: {spellId: parent.id},
|
||||||
|
};
|
||||||
}
|
}
|
||||||
detail.heroId = heroId;
|
detail.heroId = heroId;
|
||||||
detail.charId = charId;
|
detail.charId = charId;
|
||||||
|
|||||||
@@ -1,25 +1,27 @@
|
|||||||
Template.registerHelper("valueString", function(value) {
|
Template.registerHelper("valueString", function(value) {
|
||||||
|
var intValue = Math.round(value * 100);
|
||||||
|
var cp = intValue % 10;
|
||||||
|
intValue -= cp;
|
||||||
|
cp = Math.round(cp);
|
||||||
|
sp = intValue % 100;
|
||||||
|
intValue -= sp;
|
||||||
|
sp = Math.round(sp / 10)
|
||||||
|
gp = Math.floor(value);
|
||||||
|
|
||||||
var resultArray = [];
|
var resultArray = [];
|
||||||
//sp
|
|
||||||
var gp = Math.floor(value);
|
|
||||||
if (gp > 0) {
|
if (gp > 0) {
|
||||||
resultArray.push(gp + "gp");
|
resultArray.push(gp + "gp");
|
||||||
}
|
}
|
||||||
//sp
|
|
||||||
var sp = Math.floor(10 * (value % 1));
|
|
||||||
if (sp > 0) {
|
if (sp > 0) {
|
||||||
resultArray.push(sp + "sp");
|
resultArray.push(sp + "sp");
|
||||||
}
|
}
|
||||||
//cp
|
|
||||||
var cp = 10 * ((value * 10) % 1);
|
|
||||||
cp = Math.round(cp * 1000) / 1000;
|
|
||||||
if (cp > 0) {
|
if (cp > 0) {
|
||||||
resultArray.push(cp + "cp");
|
resultArray.push(cp + "cp");
|
||||||
}
|
}
|
||||||
|
|
||||||
//build string with correct spacing
|
//build string with correct spacing
|
||||||
var result = "";
|
var result = "";
|
||||||
for (var i = 0; i < resultArray.length; i++) {
|
for (var i = 0, l = resultArray.length; i < l; i++) {
|
||||||
//add a space between values
|
//add a space between values
|
||||||
if (i !== 0) {
|
if (i !== 0) {
|
||||||
result += " ";
|
result += " ";
|
||||||
|
|||||||
@@ -70,8 +70,8 @@
|
|||||||
background-color: #9E9E9E;
|
background-color: #9E9E9E;
|
||||||
}
|
}
|
||||||
|
|
||||||
.blue-grey {
|
.app-grey {
|
||||||
background-color: #607D8B;
|
background-color: #424242;
|
||||||
}
|
}
|
||||||
|
|
||||||
.white {
|
.white {
|
||||||
|
|||||||
@@ -19,6 +19,16 @@ body {
|
|||||||
background-color: #E0E0E0;
|
background-color: #E0E0E0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//fix tabs and core-toolbar having box shadow
|
||||||
|
core-toolbar {
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
//give drawer panel a shadow always
|
||||||
|
core-header-panel[drawer] {
|
||||||
|
box-shadow: 2px 0px 5px 0px rgba(0,0,0,0.2);
|
||||||
|
}
|
||||||
|
|
||||||
//Horizontal rule
|
//Horizontal rule
|
||||||
hr {
|
hr {
|
||||||
background-color: #444;
|
background-color: #444;
|
||||||
|
|||||||
@@ -1,13 +1,26 @@
|
|||||||
<template name="characterSettings">
|
<template name="characterSettings">
|
||||||
{{#with character}}
|
{{#with character}}
|
||||||
<div>
|
<div>
|
||||||
<div layout horizontal>
|
<table>
|
||||||
<div>Use variant encumbrance </div>
|
<tr>
|
||||||
<paper-toggle-button id="variantEncumbrance"
|
<td>Hide Spells tab</td>
|
||||||
checked={{settings.useVariantEncumbrance}}
|
<td>
|
||||||
touch-action="pan-y">
|
<paper-toggle-button id="hideSpellcasting"
|
||||||
</paper-toggle-button>
|
checked={{settings.hideSpellcasting}}
|
||||||
</div>
|
touch-action="pan-y">
|
||||||
|
</paper-toggle-button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Use variant encumbrance</td>
|
||||||
|
<td>
|
||||||
|
<paper-toggle-button id="variantEncumbrance"
|
||||||
|
checked={{settings.useVariantEncumbrance}}
|
||||||
|
touch-action="pan-y">
|
||||||
|
</paper-toggle-button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{{/with}}
|
{{/with}}
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -14,4 +14,13 @@ Template.characterSettings.events({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"change #hideSpellcasting": function(event, instance){
|
||||||
|
var value = instance.find("#hideSpellcasting").checked;
|
||||||
|
if (this.settings.hideSpellcasting !== value){
|
||||||
|
Characters.update(
|
||||||
|
this._id,
|
||||||
|
{$set: {"settings.hideSpellcasting": value}}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,5 +1,17 @@
|
|||||||
<template name="shareDialog">
|
<template name="shareDialog">
|
||||||
<div style="width: 360px;">
|
<div style="width: 360px;">
|
||||||
|
<div layout horizontal center>
|
||||||
|
<div>Who can view this character: </div>
|
||||||
|
<paper-dropdown-menu class="visibilityDropdown"
|
||||||
|
label="Visibility">
|
||||||
|
<paper-dropdown layered class="dropdown">
|
||||||
|
<core-menu class="menu visibilityMenu" selected={{viewPermission}}>
|
||||||
|
<paper-item name="whitelist">Only people I share with</paper-item>
|
||||||
|
<paper-item name="public">Anyone with link</paper-item>
|
||||||
|
</core-menu>
|
||||||
|
</paper-dropdown>
|
||||||
|
</paper-dropdown-menu>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{{#if readers.count}}
|
{{#if readers.count}}
|
||||||
<div style="font-weight: 500;">
|
<div style="font-weight: 500;">
|
||||||
@@ -7,7 +19,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{{#each readers}}
|
{{#each readers}}
|
||||||
<div layout horizontal center>
|
<div layout horizontal center>
|
||||||
<div flex>{{username}}</div>
|
<div flex>{{getUserName}}</div>
|
||||||
<paper-icon-button class="deleteShare" icon="delete"></paper-icon-button>
|
<paper-icon-button class="deleteShare" icon="delete"></paper-icon-button>
|
||||||
</div>
|
</div>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|||||||
@@ -3,6 +3,10 @@ Template.shareDialog.onCreated(function(){
|
|||||||
});
|
});
|
||||||
|
|
||||||
Template.shareDialog.helpers({
|
Template.shareDialog.helpers({
|
||||||
|
viewPermission: function() {
|
||||||
|
var char = Characters.findOne(this._id, {fields: {settings: 1}});
|
||||||
|
return char.settings.viewPermission || "whitelist";
|
||||||
|
},
|
||||||
readers: function(){
|
readers: function(){
|
||||||
var char = Characters.findOne(this._id, {fields: {readers: 1}});
|
var char = Characters.findOne(this._id, {fields: {readers: 1}});
|
||||||
return Meteor.users.find({_id: {$in: char.readers}});
|
return Meteor.users.find({_id: {$in: char.readers}});
|
||||||
@@ -19,9 +23,20 @@ Template.shareDialog.helpers({
|
|||||||
return "User not found";
|
return "User not found";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getUserName: function() {
|
||||||
|
return this.username || "user: " + this._id;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Template.shareDialog.events({
|
Template.shareDialog.events({
|
||||||
|
"core-select .visibilityDropdown": function(event){
|
||||||
|
var detail = event.originalEvent.detail;
|
||||||
|
if (!detail.isSelected) return;
|
||||||
|
var value = detail.item.getAttribute("name");
|
||||||
|
var char = Characters.findOne(this._id, {fields: {settings: 1}});
|
||||||
|
if (value == char.settings.viewPermission) return;
|
||||||
|
Characters.update(this._id, {$set: {"settings.viewPermission": value}});
|
||||||
|
},
|
||||||
"input #userNameOrEmailInput":
|
"input #userNameOrEmailInput":
|
||||||
function(event, instance){
|
function(event, instance){
|
||||||
var userName = instance.find("#userNameOrEmailInput").value;
|
var userName = instance.find("#userNameOrEmailInput").value;
|
||||||
|
|||||||
@@ -31,7 +31,9 @@
|
|||||||
<paper-tab name="stats">Stats</paper-tab>
|
<paper-tab name="stats">Stats</paper-tab>
|
||||||
<paper-tab name="features">Features</paper-tab>
|
<paper-tab name="features">Features</paper-tab>
|
||||||
<paper-tab name="inventory">Inventory</paper-tab>
|
<paper-tab name="inventory">Inventory</paper-tab>
|
||||||
|
{{#unless hideSpellcasting}}
|
||||||
<paper-tab name="spells">Spells</paper-tab>
|
<paper-tab name="spells">Spells</paper-tab>
|
||||||
|
{{/unless}}
|
||||||
<paper-tab name="persona">Persona</paper-tab>
|
<paper-tab name="persona">Persona</paper-tab>
|
||||||
<paper-tab name="journal">Journal</paper-tab>
|
<paper-tab name="journal">Journal</paper-tab>
|
||||||
</paper-tabs>
|
</paper-tabs>
|
||||||
@@ -42,7 +44,9 @@
|
|||||||
<section flex name="stats">{{> stats}}</section>
|
<section flex name="stats">{{> stats}}</section>
|
||||||
<section flex name="features">{{> features}}</section>
|
<section flex name="features">{{> features}}</section>
|
||||||
<section flex name="inventory">{{> inventory}}</section>
|
<section flex name="inventory">{{> inventory}}</section>
|
||||||
|
{{#unless hideSpellcasting}}
|
||||||
<section flex name="spells">{{> spells}}</section>
|
<section flex name="spells">{{> spells}}</section>
|
||||||
|
{{/unless}}
|
||||||
<section flex name="persona">{{> persona}}</section>
|
<section flex name="persona">{{> persona}}</section>
|
||||||
<section flex name="journal">{{> journal}}</section>
|
<section flex name="journal">{{> journal}}</section>
|
||||||
</core-animated-pages>
|
</core-animated-pages>
|
||||||
|
|||||||
@@ -17,6 +17,10 @@ Template.characterSheet.helpers({
|
|||||||
selectedTab: function(){
|
selectedTab: function(){
|
||||||
return getTab(this._id);
|
return getTab(this._id);
|
||||||
},
|
},
|
||||||
|
hideSpellcasting: function() {
|
||||||
|
var char = Characters.findOne(this._id);
|
||||||
|
return char && char.settings.hideSpellcasting;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Template.characterSheet.events({
|
Template.characterSheet.events({
|
||||||
|
|||||||
@@ -1,21 +1,13 @@
|
|||||||
body /deep/ #statGroupDropDown {
|
html /deep/ .operationDropDown {
|
||||||
width: 120px;
|
width: 152px;
|
||||||
}
|
}
|
||||||
|
|
||||||
body /deep/ #statDropDown {
|
html /deep/ .statDropDown {
|
||||||
width: 120px;
|
width: 152px;
|
||||||
}
|
}
|
||||||
|
|
||||||
body /deep/ #operationDropDown {
|
html /deep/ .damageMultiplierDropDown {
|
||||||
width: 100px;
|
width: 152px;
|
||||||
}
|
|
||||||
|
|
||||||
body /deep/ #damageMultiplierDropDown {
|
|
||||||
width: 120px;
|
|
||||||
}
|
|
||||||
|
|
||||||
body /deep/ #proficiencyDropDown {
|
|
||||||
width: 120px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
html /deep/ .effectEdit paper-input {
|
html /deep/ .effectEdit paper-input {
|
||||||
@@ -24,6 +16,7 @@ html /deep/ .effectEdit paper-input {
|
|||||||
}
|
}
|
||||||
|
|
||||||
html /deep/ .effectEdit {
|
html /deep/ .effectEdit {
|
||||||
|
height: 64px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,27 +1,23 @@
|
|||||||
<template name="effectEdit">
|
<template name="effectEdit">
|
||||||
<div class="effectEdit" layout horizontal center>
|
<div class="effectEdit" layout horizontal center>
|
||||||
<paper-dropdown-menu class="statGroupDropDown" label="Stat Group" flex>
|
<paper-dropdown-menu class="statDropDown"
|
||||||
<paper-dropdown layered class="dropdown">
|
label="Stat">
|
||||||
<core-menu class="menu statGroupMenu" selected={{selectedStatGroup}}>
|
<paper-dropdown layered
|
||||||
{{#each statGroups}}
|
class="dropdown">
|
||||||
<paper-item class="statGroupSelect" name={{this}}>{{this}}</paper-item>
|
<core-menu class="menu statMenu" selected={{stat}}>
|
||||||
{{/each}}
|
{{#each statGroups}}
|
||||||
</core-menu>
|
<div style="font-weight: bold;
|
||||||
</paper-dropdown>
|
margin-top: 16px;">{{this}}</div>
|
||||||
</paper-dropdown-menu>
|
{{#each stats}}
|
||||||
{{#if stats}}
|
<paper-item name={{stat}}>{{name}}</paper-item>
|
||||||
<paper-dropdown-menu class="statDropDown" label="Stat" flex>
|
{{/each}}
|
||||||
<paper-dropdown layered class="dropdown">
|
|
||||||
<core-menu class="menu statMenu" selected={{stat}} on-tap="onStatMenuTap">
|
|
||||||
{{#each stats}}
|
|
||||||
<paper-item name={{stat}}>{{name}}</paper-item>
|
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</core-menu>
|
</core-menu>
|
||||||
</paper-dropdown>
|
</paper-dropdown>
|
||||||
</paper-dropdown-menu>
|
</paper-dropdown-menu>
|
||||||
{{/if}}
|
|
||||||
{{#if operations}}
|
{{#if operations}}
|
||||||
<paper-dropdown-menu class="operationDropDown" label="Operation" flex>
|
<paper-dropdown-menu class="operationDropDown"
|
||||||
|
label="Operation">
|
||||||
<paper-dropdown layered class="dropdown">
|
<paper-dropdown layered class="dropdown">
|
||||||
<core-menu class="menu operationMenu" selected={{operation}}>
|
<core-menu class="menu operationMenu" selected={{operation}}>
|
||||||
{{#each operations}}
|
{{#each operations}}
|
||||||
@@ -31,24 +27,39 @@
|
|||||||
</paper-dropdown>
|
</paper-dropdown>
|
||||||
</paper-dropdown-menu>
|
</paper-dropdown-menu>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{> Template.dynamic template=effectValueTemplate}}
|
{{#if effectValueTemplate}}
|
||||||
<paper-icon-button class="deleteEffect" role="button" tabindex="0" icon="delete" aria-label="Delete"></paper-icon-button>
|
{{> Template.dynamic template=effectValueTemplate}}
|
||||||
|
{{else}}
|
||||||
|
<div flex></div>
|
||||||
|
{{/if}}
|
||||||
|
<paper-icon-button class="deleteEffect"
|
||||||
|
icon="delete">
|
||||||
|
</paper-icon-button>
|
||||||
<br>
|
<br>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template name="regularEffectValue">
|
<template name="regularEffectValue">
|
||||||
<paper-input class="effectValueInput" label="Value" floatinglabel value={{effectValue}} flex></paper-input>
|
<paper-input class="effectValueInput"
|
||||||
|
label="Value"
|
||||||
|
floatinglabel
|
||||||
|
value={{effectValue}}
|
||||||
|
flex>
|
||||||
|
</paper-input>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template name="multiplierEffectValue">
|
<template name="multiplierEffectValue">
|
||||||
<paper-dropdown-menu class="damageMultiplierDropDown" label="Damage Multiplier" flex>
|
<paper-dropdown-menu class="damageMultiplierDropDown"
|
||||||
<paper-dropdown layered class="dropdown">
|
label="Damage Multiplier">
|
||||||
<core-menu class="menu multiplierMenu" selected={{value}}>
|
<paper-dropdown layered
|
||||||
|
class="dropdown">
|
||||||
|
<core-menu class="menu multiplierMenu"
|
||||||
|
selected={{value}}>
|
||||||
<paper-item name="0.5">Resistance</paper-item>
|
<paper-item name="0.5">Resistance</paper-item>
|
||||||
<paper-item name="2">Vulnerability</paper-item>
|
<paper-item name="2">Vulnerability</paper-item>
|
||||||
<paper-item name="0">Immunity</paper-item>
|
<paper-item name="0">Immunity</paper-item>
|
||||||
</core-menu>
|
</core-menu>
|
||||||
</paper-dropdown>
|
</paper-dropdown>
|
||||||
</paper-dropdown-menu>
|
</paper-dropdown-menu>
|
||||||
|
<div flex></div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -93,24 +93,17 @@ var skillOperations = [
|
|||||||
{name: "Conditional Benefit", operation: "conditional"}
|
{name: "Conditional Benefit", operation: "conditional"}
|
||||||
];
|
];
|
||||||
|
|
||||||
Template.effectEdit.created = function(){
|
|
||||||
var statGroup = statsDict[this.data.stat] && statsDict[this.data.stat].group;
|
|
||||||
this.selectedStatGroup = new ReactiveVar(statGroup);
|
|
||||||
};
|
|
||||||
|
|
||||||
Template.effectEdit.helpers({
|
Template.effectEdit.helpers({
|
||||||
selectedStatGroup: function(){
|
|
||||||
return Template.instance().selectedStatGroup.get();
|
|
||||||
},
|
|
||||||
statGroups: function(){
|
statGroups: function(){
|
||||||
return statGroupNames;
|
return statGroupNames;
|
||||||
},
|
},
|
||||||
stats: function(){
|
stats: function(){
|
||||||
var group = Template.instance().selectedStatGroup.get();
|
var group = this;
|
||||||
return statGroups[group];
|
return statGroups[group];
|
||||||
},
|
},
|
||||||
operations: function(){
|
operations: function(){
|
||||||
var group = Template.instance().selectedStatGroup.get();
|
var stat = statsDict[this.stat];
|
||||||
|
var group = stat && stat.group;
|
||||||
if (group === "Weakness/Resistance") return null;
|
if (group === "Weakness/Resistance") return null;
|
||||||
if (group === "Saving Throws" || group === "Skills"){
|
if (group === "Saving Throws" || group === "Skills"){
|
||||||
return skillOperations;
|
return skillOperations;
|
||||||
@@ -120,7 +113,8 @@ Template.effectEdit.helpers({
|
|||||||
},
|
},
|
||||||
effectValueTemplate: function(){
|
effectValueTemplate: function(){
|
||||||
//resistance/vulnerability template
|
//resistance/vulnerability template
|
||||||
var group = Template.instance().selectedStatGroup.get();
|
var stat = statsDict[this.stat];
|
||||||
|
var group = stat && stat.group;
|
||||||
if (group === "Weakness/Resistance") return "multiplierEffectValue";
|
if (group === "Weakness/Resistance") return "multiplierEffectValue";
|
||||||
|
|
||||||
var op = this.operation;
|
var op = this.operation;
|
||||||
@@ -144,25 +138,6 @@ Template.effectEdit.events({
|
|||||||
Effects.softRemoveNode(this._id);
|
Effects.softRemoveNode(this._id);
|
||||||
GlobalUI.deletedToast(this._id, "Effects", "Effect");
|
GlobalUI.deletedToast(this._id, "Effects", "Effect");
|
||||||
},
|
},
|
||||||
"core-select .statGroupDropDown": function(event, instance){
|
|
||||||
var detail = event.originalEvent.detail;
|
|
||||||
if (!detail.isSelected) return;
|
|
||||||
var groupName = detail.item.getAttribute("name");
|
|
||||||
var oldName = Template.instance().selectedStatGroup.get();
|
|
||||||
if (oldName != groupName){
|
|
||||||
instance.selectedStatGroup.set(groupName);
|
|
||||||
if (groupName === "Weakness/Resistance"){
|
|
||||||
Effects.update(this._id, {$set: {
|
|
||||||
value: 0.5,
|
|
||||||
calculation: "",
|
|
||||||
operation: "mul"}, $unset: {stat: ""}});
|
|
||||||
} else {
|
|
||||||
Effects.update(this._id,
|
|
||||||
{$set: {operation: "add"},
|
|
||||||
$unset: {stat: "", value: "", calculation: ""}});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"core-select .statDropDown": function(event){
|
"core-select .statDropDown": function(event){
|
||||||
var detail = event.originalEvent.detail;
|
var detail = event.originalEvent.detail;
|
||||||
if (!detail.isSelected) return;
|
if (!detail.isSelected) return;
|
||||||
|
|||||||
@@ -57,40 +57,40 @@ var stats = {
|
|||||||
"d12HitDice":{"name":"d12 Hit Dice"},
|
"d12HitDice":{"name":"d12 Hit Dice"},
|
||||||
"acidMultiplier":{"name":"Acid damage", "group": "Weakness/Resistance"},
|
"acidMultiplier":{"name":"Acid damage", "group": "Weakness/Resistance"},
|
||||||
"bludgeoningMultiplier":{
|
"bludgeoningMultiplier":{
|
||||||
"name":"Bludgeoning damage", "group": "Weakness/Resistance"
|
"name":"Bludgeoning damage", "group": "Weakness/Resistance",
|
||||||
},
|
},
|
||||||
"coldMultiplier":{
|
"coldMultiplier":{
|
||||||
"name":"Cold damage", "group": "Weakness/Resistance"
|
"name":"Cold damage", "group": "Weakness/Resistance",
|
||||||
},
|
},
|
||||||
"fireMultiplier":{
|
"fireMultiplier":{
|
||||||
"name":"Fire damage", "group": "Weakness/Resistance"
|
"name":"Fire damage", "group": "Weakness/Resistance",
|
||||||
},
|
},
|
||||||
"forceMultiplier":{
|
"forceMultiplier":{
|
||||||
"name":"Force damage", "group": "Weakness/Resistance"
|
"name":"Force damage", "group": "Weakness/Resistance",
|
||||||
},
|
},
|
||||||
"lightningMultiplier":{
|
"lightningMultiplier":{
|
||||||
"name":"Lightning damage", "group": "Weakness/Resistance"
|
"name":"Lightning damage", "group": "Weakness/Resistance",
|
||||||
},
|
},
|
||||||
"necroticMultiplier":{
|
"necroticMultiplier":{
|
||||||
"name":"Necrotic damage", "group": "Weakness/Resistance"
|
"name":"Necrotic damage", "group": "Weakness/Resistance",
|
||||||
},
|
},
|
||||||
"piercingMultiplier":{
|
"piercingMultiplier":{
|
||||||
"name":"Piercing damage", "group": "Weakness/Resistance"
|
"name":"Piercing damage", "group": "Weakness/Resistance",
|
||||||
},
|
},
|
||||||
"poisonMultiplier":{
|
"poisonMultiplier":{
|
||||||
"name":"Poison damage", "group": "Weakness/Resistance"
|
"name":"Poison damage", "group": "Weakness/Resistance",
|
||||||
},
|
},
|
||||||
"psychicMultiplier":{
|
"psychicMultiplier":{
|
||||||
"name":"Psychic damage", "group": "Weakness/Resistance"
|
"name":"Psychic damage", "group": "Weakness/Resistance",
|
||||||
},
|
},
|
||||||
"radiantMultiplier":{
|
"radiantMultiplier":{
|
||||||
"name":"Radiant damage", "group": "Weakness/Resistance"
|
"name":"Radiant damage", "group": "Weakness/Resistance",
|
||||||
},
|
},
|
||||||
"slashingMultiplier":{
|
"slashingMultiplier":{
|
||||||
"name":"Slashing damage", "group": "Weakness/Resistance"
|
"name":"Slashing damage", "group": "Weakness/Resistance",
|
||||||
},
|
},
|
||||||
"thunderMultiplier":{
|
"thunderMultiplier":{
|
||||||
"name":"Thunder damage", "group": "Weakness/Resistance"
|
"name":"Thunder damage", "group": "Weakness/Resistance",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -110,8 +110,8 @@ var operations = {
|
|||||||
Template.effectView.helpers({
|
Template.effectView.helpers({
|
||||||
sourceName: function(){
|
sourceName: function(){
|
||||||
var id = this.parent.id;
|
var id = this.parent.id;
|
||||||
if(!id) return;
|
if (!id) return;
|
||||||
switch(this.parent.collection){
|
switch (this.parent.collection){
|
||||||
case "Features":
|
case "Features":
|
||||||
return "Feature - " + Features.findOne(id, {fields: {name: 1}}).name;
|
return "Feature - " + Features.findOne(id, {fields: {name: 1}}).name;
|
||||||
case "Classes":
|
case "Classes":
|
||||||
@@ -130,33 +130,39 @@ Template.effectView.helpers({
|
|||||||
return stats[this.stat] && stats[this.stat].name || "No Stat";
|
return stats[this.stat] && stats[this.stat].name || "No Stat";
|
||||||
},
|
},
|
||||||
operationName: function(){
|
operationName: function(){
|
||||||
if(this.operation === "proficiency" ||
|
if (this.operation === "proficiency" ||
|
||||||
this.operation === "conditional") return null;
|
this.operation === "conditional") return null;
|
||||||
if(stats[this.stat].group === "Weakness/Resistance") return null;
|
if (stats[this.stat] && stats[this.stat].group === "Weakness/Resistance")
|
||||||
if(this.operation === "add" && evaluateEffect(this.charId, this) < 0) return null;
|
return null;
|
||||||
return operations[this.operation] && operations[this.operation].name || "No Operation";
|
if (this.operation === "add" && evaluateEffect(this.charId, this) < 0)
|
||||||
|
return null;
|
||||||
|
return operations[this.operation] &&
|
||||||
|
operations[this.operation].name || "No Operation";
|
||||||
},
|
},
|
||||||
statValue: function(){
|
statValue: function(){
|
||||||
if(this.operation === "advantage" ||
|
if (this.operation === "advantage" ||
|
||||||
this.operation === "disadvantage" ||
|
this.operation === "disadvantage" ||
|
||||||
this.operation === "fail"){
|
this.operation === "fail"){
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if(this.operation === "proficiency"){
|
if (this.operation === "proficiency"){
|
||||||
if(this.value == 0.5 || this.calculation == 0.5) return "Half Proficiency";
|
if (this.value == 0.5 || this.calculation == 0.5)
|
||||||
if(this.value == 1 || this.calculation == 1) return "Proficiency";
|
return "Half Proficiency";
|
||||||
if(this.value == 2 || this.calculation == 2) return "Double Proficiency";
|
if (this.value == 1 || this.calculation == 1)
|
||||||
|
return "Proficiency";
|
||||||
|
if (this.value == 2 || this.calculation == 2)
|
||||||
|
return "Double Proficiency";
|
||||||
}
|
}
|
||||||
if(this.operation === "conditional"){
|
if (this.operation === "conditional"){
|
||||||
return this.calculation || this.value;
|
return this.calculation || this.value;
|
||||||
}
|
}
|
||||||
if(stats[this.stat].group === "Weakness/Resistance"){
|
if (stats[this.stat] && stats[this.stat].group === "Weakness/Resistance"){
|
||||||
if(this.value === 0.5) return "Resistance";
|
if (this.value === 0.5) return "Resistance";
|
||||||
if(this.value === 2) return "Vulnerability";
|
if (this.value === 2) return "Vulnerability";
|
||||||
if(this.value === 0) return "Immunity";
|
if (this.value === 0) return "Immunity";
|
||||||
}
|
}
|
||||||
var value = evaluateEffect(this.charId, this);
|
var value = evaluateEffect(this.charId, this);
|
||||||
if(_.isNumber(value)) return value;
|
if (_.isNumber(value)) return value;
|
||||||
return this.calculation || this.value;
|
return this.calculation || this.value;
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -174,6 +174,20 @@ Template.inventory.events({
|
|||||||
heroId: itemId,
|
heroId: itemId,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
"hold .inventoryItem": function(event, instance) {
|
||||||
|
var itemId = this._id;
|
||||||
|
var charId = Template.parentData()._id;
|
||||||
|
var containerId = this.parent.id;
|
||||||
|
GlobalUI.showDialog({
|
||||||
|
template: "moveItemDialog",
|
||||||
|
data: {
|
||||||
|
charId: charId,
|
||||||
|
itemId: itemId,
|
||||||
|
containerId: containerId,
|
||||||
|
},
|
||||||
|
heading: "Move " + this.pluralName(),
|
||||||
|
});
|
||||||
|
},
|
||||||
"tap .incrementButtons": function(event) {
|
"tap .incrementButtons": function(event) {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
html /deep/ .moveItemDialog paper-tabs::shadow #selectionBar {
|
||||||
|
background-color: #D50000;
|
||||||
|
}
|
||||||
|
|
||||||
|
html /deep/ .moveItemDialog paper-tab::shadow #ink {
|
||||||
|
color: #D50000;
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
<template name="moveItemDialog">
|
||||||
|
<div class="moveItemDialog">
|
||||||
|
<paper-tabs selected="{{selectedTab}}">
|
||||||
|
<paper-tab name="containers"
|
||||||
|
class="clickable">
|
||||||
|
Containers
|
||||||
|
</paper-tab>
|
||||||
|
<paper-tab name="characters"
|
||||||
|
class="clickable">
|
||||||
|
Characters
|
||||||
|
</paper-tab>
|
||||||
|
</paper-tabs>
|
||||||
|
<core-animated-pages selected="{{selectedTab}}"
|
||||||
|
transitions="slide-from-right"
|
||||||
|
style="width: 250px;
|
||||||
|
height: 200px;
|
||||||
|
overflow-y: auto;
|
||||||
|
overflow-x: hidden;">
|
||||||
|
<section name="containers">
|
||||||
|
<core-menu id="containerMenu" style="margin: 0;">
|
||||||
|
{{#each containers}}
|
||||||
|
<paper-item name={{_id}}
|
||||||
|
layout horizontal center>
|
||||||
|
<core-icon icon="image:brightness-1"
|
||||||
|
style="color: {{hexColor color}};
|
||||||
|
margin-right: 16px;">
|
||||||
|
</core-icon>
|
||||||
|
<div>{{name}}</div>
|
||||||
|
</paper-item>
|
||||||
|
{{/each}}
|
||||||
|
</core-menu>
|
||||||
|
</section>
|
||||||
|
<section name="characters">
|
||||||
|
<core-menu id="characterMenu" style="margin: 0;">
|
||||||
|
{{#each characters}}
|
||||||
|
<paper-item name={{_id}}
|
||||||
|
layout horizontal center>
|
||||||
|
<div class="item small">
|
||||||
|
{{name}}
|
||||||
|
</div>
|
||||||
|
</paper-item>
|
||||||
|
{{/each}}
|
||||||
|
</core-menu>
|
||||||
|
</section>
|
||||||
|
</core-animated-pages>
|
||||||
|
</div>
|
||||||
|
<paper-button id="cancelButton" affirmative> Cancel </paper-button>
|
||||||
|
<paper-button id="moveButton" affirmative> Move </paper-button>
|
||||||
|
</template>
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
Template.moveItemDialog.onCreated(function() {
|
||||||
|
Session.setDefault("moveItemDialogTab", "containers");
|
||||||
|
});
|
||||||
|
|
||||||
|
Template.moveItemDialog.helpers({
|
||||||
|
selectedTab: function() {
|
||||||
|
return Session.get("moveItemDialogTab");
|
||||||
|
},
|
||||||
|
characters: function() {
|
||||||
|
var userId = Meteor.userId();
|
||||||
|
return Characters.find(
|
||||||
|
{
|
||||||
|
$or: [
|
||||||
|
{readers: userId},
|
||||||
|
{writers: userId},
|
||||||
|
{owner: userId},
|
||||||
|
],
|
||||||
|
_id: {$ne: this.charId},
|
||||||
|
},
|
||||||
|
{fields: {name: 1}}
|
||||||
|
);
|
||||||
|
},
|
||||||
|
containers: function(){
|
||||||
|
return Containers.find(
|
||||||
|
{
|
||||||
|
charId: this.charId,
|
||||||
|
_id: {$ne: this.containerId},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fields: {color: 1, name: 1},
|
||||||
|
sort: {color: 1, name: 1},
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
Template.moveItemDialog.events({
|
||||||
|
"tap paper-tab": function(event) {
|
||||||
|
Session.set("moveItemDialogTab", event.currentTarget.getAttribute("name"));
|
||||||
|
},
|
||||||
|
"tap #moveButton": function(event, instance) {
|
||||||
|
var tab = Session.get("moveItemDialogTab");
|
||||||
|
if (tab === "containers"){
|
||||||
|
var containerId = instance.find("#containerMenu").selected;
|
||||||
|
if (!containerId) throw "no menu selection";
|
||||||
|
Meteor.call("moveItemToContainer", this.itemId, containerId);
|
||||||
|
} else if (tab === "characters"){
|
||||||
|
var characterId = instance.find("#characterMenu").selected;
|
||||||
|
if (!characterId) throw "no menu selection";
|
||||||
|
Meteor.call("moveItemToCharacter", this.itemId, characterId);
|
||||||
|
} else {
|
||||||
|
throw "Move item dialog tab is not set to containers or character," +
|
||||||
|
" it is set to " + tab;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<template name="backgroundDialog">
|
||||||
|
{{#baseDialog title=title class=colorClass hideColor="true" hideDelete="true" startEditing=startEditing}}
|
||||||
|
<div class="pre-wrap">{{evaluateString charId value}}</div>
|
||||||
|
{{> proficiencyViewList charId=charId parentId=charId parentGroup="background"}}
|
||||||
|
{{else}}
|
||||||
|
{{> textDialogEdit}}
|
||||||
|
{{> proficiencyEditList parentId=charId parentCollection="Characters" charId=charId parentGroup="background"}}
|
||||||
|
{{/baseDialog}}
|
||||||
|
</template>
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
Template.backgroundDialog.helpers({
|
||||||
|
value: function(){
|
||||||
|
var fieldSelector = {fields: {}};
|
||||||
|
fieldSelector.fields[this.field] = 1;
|
||||||
|
var char = Characters.findOne(this.charId, fieldSelector);
|
||||||
|
return char[this.field];
|
||||||
|
}
|
||||||
|
});
|
||||||
@@ -40,11 +40,20 @@ Template.persona.helpers({
|
|||||||
|
|
||||||
Template.persona.events({
|
Template.persona.events({
|
||||||
"tap .characterField": function(event){
|
"tap .characterField": function(event){
|
||||||
if (this.field !== "details"){
|
if (this.field === "details"){
|
||||||
|
this.charId = Template.parentData()._id;
|
||||||
|
GlobalUI.setDetail({
|
||||||
|
template: "personaDetailsDialog",
|
||||||
|
data: this,
|
||||||
|
heroId: this._id + this.field,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
var template = "textDialog";
|
||||||
|
if (this.field === "backstory") template = "backgroundDialog";
|
||||||
var charId = Template.parentData()._id;
|
var charId = Template.parentData()._id;
|
||||||
GlobalUI.setDetail({
|
GlobalUI.setDetail({
|
||||||
template: "textDialog",
|
template: template,
|
||||||
data: {
|
data: {
|
||||||
charId: charId,
|
charId: charId,
|
||||||
field: this.field,
|
field: this.field,
|
||||||
title: this.title,
|
title: this.title,
|
||||||
@@ -52,13 +61,6 @@ Template.persona.events({
|
|||||||
},
|
},
|
||||||
heroId: this._id + this.field,
|
heroId: this._id + this.field,
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
this.charId = Template.parentData()._id;
|
|
||||||
GlobalUI.setDetail({
|
|
||||||
template: "personaDetailsDialog",
|
|
||||||
data: this,
|
|
||||||
heroId: this._id + this.field,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
<template name="proficiencyView">
|
<template name="proficiencyView">
|
||||||
<div class="proficiencyView" layout horizontal center>
|
<div class="proficiencyView item small"
|
||||||
<core-icon icon="{{profIcon}}"></core-icon>
|
style="padding: 0;"
|
||||||
<div class="sideMargin">{{getName}}</div>
|
layout horizontal center>
|
||||||
|
<core-icon icon="{{profIcon}}" style="margin-right: 16px;"></core-icon>
|
||||||
|
<div>{{getName}}</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{{#if proficiencies.count}}
|
{{#if proficiencies.count}}
|
||||||
<hr class="vertMargin">
|
<hr class="vertMargin">
|
||||||
<div class="proficiencies">
|
<div class="proficiencies">
|
||||||
<h2 class="spaceAfter">Proficiencies</h2>
|
<h2 style="margin-bottom: 8px;">Proficiencies</h2>
|
||||||
{{#each proficiencies}}
|
{{#each proficiencies}}
|
||||||
{{> proficiencyView}}
|
{{> proficiencyView}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pre-wrap">{{evaluateString charId description}}</div>
|
<div class="pre-wrap">{{evaluateString charId description}}</div>
|
||||||
|
{{> attacksViewList charId=charId parentId=_id}}
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template name="spellEdit">
|
<template name="spellEdit">
|
||||||
@@ -126,4 +127,5 @@
|
|||||||
<textarea id="descriptionInput" placeholder value={{description}}></textarea>
|
<textarea id="descriptionInput" placeholder value={{description}}></textarea>
|
||||||
</paper-autogrow-textarea>
|
</paper-autogrow-textarea>
|
||||||
</paper-input-decorator>
|
</paper-input-decorator>
|
||||||
|
{{> attackEditList parentId=_id parentCollection="Spells" charId=charId enabled=true name=name}}
|
||||||
</template>
|
</template>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
.healthCard paper-slider{
|
.healthCard paper-diff-slider{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,24 +10,24 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="right" flex layout vertical center-justified style="min-width: 180px;">
|
<div class="right" flex layout vertical center-justified style="min-width: 180px;">
|
||||||
<div layout horizontal>
|
<div layout horizontal>
|
||||||
<paper-slider id="hitPointSlider"
|
<paper-diff-slider id="hitPointSlider"
|
||||||
value={{attributeValue "hitPoints"}}
|
value={{attributeValue "hitPoints"}}
|
||||||
max={{attributeBase "hitPoints"}}
|
max={{attributeBase "hitPoints"}}
|
||||||
editable pin
|
editable pin
|
||||||
role="slider"
|
role="slider"
|
||||||
></paper-slider>
|
></paper-diff-slider>
|
||||||
</div>
|
</div>
|
||||||
{{#each tempHitPoints}}
|
{{#each tempHitPoints}}
|
||||||
<div>
|
<div>
|
||||||
{{name}}
|
{{name}}
|
||||||
<div layout horizontal>
|
<div layout horizontal>
|
||||||
<paper-slider class="tempHitPointSlider"
|
<paper-diff-slider class="tempHitPointSlider"
|
||||||
value={{left}}
|
value={{left}}
|
||||||
max={{maximum}}
|
max={{maximum}}
|
||||||
editable pin
|
editable pin
|
||||||
role="slider"
|
role="slider"
|
||||||
flex
|
flex
|
||||||
></paper-slider>
|
></paper-diff-slider>
|
||||||
{{#unless left}}{{#unless deleteOnZero}}
|
{{#unless left}}{{#unless deleteOnZero}}
|
||||||
<paper-icon-button class="deleteTHP" icon="delete"></paper-icon-button>
|
<paper-icon-button class="deleteTHP" icon="delete"></paper-icon-button>
|
||||||
{{/unless}}{{/unless}}
|
{{/unless}}{{/unless}}
|
||||||
|
|||||||
@@ -212,7 +212,15 @@ Template.skillDialogView.helpers({
|
|||||||
return Characters.findOne(this.charId, {fields:{_id: 1}});
|
return Characters.findOne(this.charId, {fields:{_id: 1}});
|
||||||
},
|
},
|
||||||
sourceName: function(){
|
sourceName: function(){
|
||||||
if (this.parent.collection === "Characters") return "inate";
|
if (this.parent.collection === "Characters"){
|
||||||
|
if (this.parent.group === "racial"){
|
||||||
|
return Characters.findOne(this.charId, {fields:{race: 1}}).race || "Race";
|
||||||
|
}
|
||||||
|
if (this.parent.group === "background"){
|
||||||
|
return "Background";
|
||||||
|
}
|
||||||
|
return "Innate";
|
||||||
|
}
|
||||||
return this.getParent().name;
|
return this.getParent().name;
|
||||||
},
|
},
|
||||||
operationName: function(){
|
operationName: function(){
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template name="characterList">
|
<template name="characterList">
|
||||||
<core-toolbar class="blue-grey white-text">
|
<core-toolbar class="app-grey white-text">
|
||||||
<core-icon-button icon="menu" core-drawer-toggle></core-icon-button>
|
<core-icon-button icon="menu" core-drawer-toggle></core-icon-button>
|
||||||
<div flex>
|
<div flex>
|
||||||
Characters
|
Characters
|
||||||
|
|||||||
@@ -25,6 +25,13 @@
|
|||||||
</paper-autogrow-textarea>
|
</paper-autogrow-textarea>
|
||||||
</paper-input-decorator>
|
</paper-input-decorator>
|
||||||
</div>
|
</div>
|
||||||
<paper-button id="cancelButton" affirmative>Cancel</paper-button>
|
<paper-button id="cancelButton"
|
||||||
<paper-button id="sendButton" affirmative>Send </paper-button>
|
affirmative>
|
||||||
|
Cancel
|
||||||
|
</paper-button>
|
||||||
|
<paper-button id="sendButton"
|
||||||
|
affirmative
|
||||||
|
disabled={{invalid}}>
|
||||||
|
Send
|
||||||
|
</paper-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -1,4 +1,23 @@
|
|||||||
|
Template.feedback.onCreated(function() {
|
||||||
|
this.title = new ReactiveVar("");
|
||||||
|
this.description = new ReactiveVar("");
|
||||||
|
});
|
||||||
|
|
||||||
|
Template.feedback.helpers({
|
||||||
|
invalid: function() {
|
||||||
|
var inst = Template.instance();
|
||||||
|
return !inst.title.get() ||
|
||||||
|
!inst.description.get();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
Template.feedback.events({
|
Template.feedback.events({
|
||||||
|
"input #feedbackTitle": function(event, instance) {
|
||||||
|
instance.title.set(instance.find("#feedbackTitle").value);
|
||||||
|
},
|
||||||
|
"input #feedbackDescription": function(event, instance) {
|
||||||
|
instance.description.set(instance.find("#feedbackDescription").value);
|
||||||
|
},
|
||||||
"tap #sendButton": function(event, instance) {
|
"tap #sendButton": function(event, instance) {
|
||||||
var report = {};
|
var report = {};
|
||||||
report.title = instance.find("#feedbackTitle").value;
|
report.title = instance.find("#feedbackTitle").value;
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
<template name="guide">
|
<template name="guide">
|
||||||
|
<core-toolbar class="app-grey white-text">
|
||||||
|
<core-icon-button icon="menu" core-drawer-toggle></core-icon-button>
|
||||||
|
<div flex>Guide</div>
|
||||||
|
</core-toolbar>
|
||||||
<div layout vertical center>
|
<div layout vertical center>
|
||||||
<paper-shadow class="wallOfText card" style="padding: 32px; max-width: 800px;">
|
<paper-shadow class="wallOfText card" style="padding: 32px; max-width: 800px;">
|
||||||
<h1>Dicecloud Beta</h1>
|
|
||||||
<p>Welcome to the Dicecloud beta.</p>
|
|
||||||
<p>The beta is going to start with just the character sheet. You can play D&D without minis and maps, without a pre-written adventure, you can play without a lot of things, but the character sheet is necessary. So I'm starting here and working my way outwards.</p>
|
|
||||||
<p>Leave any comments, feedback and suggestions on <a href="http://reddit.com/r/dicecloud">this subreddit</a>. If you've never used reddit before, all you need is a username and password to sign up. So it should be pretty accessible.</p>
|
|
||||||
<p>If you'd like to see a list of known issues and upcoming features, check out the <a href="https://trello.com/b/94M0SCnq/dicecloud-roadmap">DiceCloud Roadmap</a>.</p>
|
|
||||||
<h2>Character Sheet Philosophy</h2>
|
<h2>Character Sheet Philosophy</h2>
|
||||||
<p>Setting up your character on Dicecloud is going to take you a little longer than just filling it in on a paper character sheet would have. The goal of using an online sheet is to make actually playing the game more streamlined, and ultimately more fun. So putting a little extra effort into setting up your character now will pay off over and over again once you're playing.</p>
|
<p>Setting up your character on Dicecloud is going to take you a little longer than just filling it in on a paper character sheet would have. The goal of using an online sheet is to make actually playing the game more streamlined, and ultimately more fun. So putting a little extra effort into setting up your character now will pay off over and over again once you're playing.</p>
|
||||||
<p>The idea is to track where each number comes from, and allow you to easily make changes on the fly.</p>
|
<p>The idea is to track where each number comes from, and allow you to easily make changes on the fly.</p>
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
<template name="home">
|
<template name="home">
|
||||||
<core-toolbar class="blue-grey white-text">
|
<core-toolbar class="app-grey white-text">
|
||||||
<core-icon-button icon="menu" core-drawer-toggle></core-icon-button>
|
<core-icon-button icon="menu" core-drawer-toggle></core-icon-button>
|
||||||
<div flex>
|
<div flex>
|
||||||
DiceCloud
|
Home
|
||||||
</div>
|
</div>
|
||||||
</core-toolbar>
|
</core-toolbar>
|
||||||
<div class="scroll-y" style="padding: 16px" fit>
|
{{> intro}}
|
||||||
{{> guide}}
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
@@ -1,25 +1,15 @@
|
|||||||
Template.home.helpers({
|
Template.home.helpers({
|
||||||
characterDetails: function(){
|
selectedTab: function(){
|
||||||
var char = Characters.findOne(
|
return Session.get("homePage.selectedTab");
|
||||||
this._id,
|
},
|
||||||
{fields: {name: 1, gender: 1, alignment: 1, race:1}}
|
|
||||||
);
|
|
||||||
char.title = char.name;
|
|
||||||
char.field = "base";
|
|
||||||
char.color = "d";
|
|
||||||
char.class = "characterCard";
|
|
||||||
return char;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Template.home.events({
|
Template.home.events({
|
||||||
"tap .characterCard": function(event, instance){
|
"core-animated-pages-transition-end .tabPages": function(event) {
|
||||||
Router.go("characterSheet", {_id: this._id});
|
event.stopPropagation();
|
||||||
},
|
},
|
||||||
"tap #addCharacter": function(event, template) {
|
"tap .homeTabs paper-tab": function(event, instance){
|
||||||
Characters.insert({owner: Meteor.userId()});
|
Session.set("homePage.selectedTab",
|
||||||
},
|
event.currentTarget.getAttribute("name"));
|
||||||
"tap #deleteChar": function(event, template){
|
|
||||||
Characters.remove(this._id);
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
89
rpg-docs/client/views/home/intro/intro.html
Normal file
89
rpg-docs/client/views/home/intro/intro.html
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
<template name="intro">
|
||||||
|
<div class="intro">
|
||||||
|
<div class="section white-text" style="background: #282828">
|
||||||
|
<div class="display2">
|
||||||
|
Dice Cloud
|
||||||
|
</div>
|
||||||
|
<img style="width:130px; height:130px; background-color: #282828;"
|
||||||
|
src="/crown-dice-logo-cropped-transparent.png">
|
||||||
|
<div class="display1">
|
||||||
|
Unofficial Online Realtime D&D 5e App
|
||||||
|
</div>
|
||||||
|
<h2>
|
||||||
|
Spend less time shuffling paper and more time playing the game
|
||||||
|
</h2>
|
||||||
|
{{#unless currentUser}}
|
||||||
|
<div layout horizontal around-justified wrap>
|
||||||
|
<paper-button class="red white-text signInButton"
|
||||||
|
style="margin: 16px;"
|
||||||
|
raised>
|
||||||
|
Sign In
|
||||||
|
</paper-button>
|
||||||
|
<paper-button class="red white-text signUpButton"
|
||||||
|
style="margin: 16px;"
|
||||||
|
raised>
|
||||||
|
Sign Up
|
||||||
|
</paper-button>
|
||||||
|
</div>
|
||||||
|
{{else}}
|
||||||
|
<div style="padding-bottom: 0;"></div>
|
||||||
|
{{/unless}}
|
||||||
|
</div>
|
||||||
|
<div class="section" style="background-color: #e9e9e9;">
|
||||||
|
<div>
|
||||||
|
<div class="display1">Character Sheet Open Beta</div>
|
||||||
|
<h2 style="margin-bottom: 16px;">
|
||||||
|
Check out the example characters
|
||||||
|
</h2>
|
||||||
|
<div layout horizontal around-justified wrap>
|
||||||
|
<paper-shadow class="card characterCard ssArcher clickable"
|
||||||
|
z="2">
|
||||||
|
<div class="top subhead green white-text">
|
||||||
|
<div class="subhead" flex>
|
||||||
|
Starter Set Archer
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="bottom text">Lawful Good Human</div>
|
||||||
|
</paper-shadow>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section white-text" style="background: #282828">
|
||||||
|
<div class="columns" layout horizontal around-justified wrap>
|
||||||
|
<div>
|
||||||
|
<h1>Check out the guide</h1>
|
||||||
|
<p>
|
||||||
|
Learn how your class gives you features, those features have effects,
|
||||||
|
and those effects determine your stats.
|
||||||
|
<paper-button class="guideButton">View Guide</paper-button>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h1>
|
||||||
|
Discuss
|
||||||
|
</h1>
|
||||||
|
<p>
|
||||||
|
On the official subreddit
|
||||||
|
<paper-button class="redditButton">
|
||||||
|
<a href="http://www.reddit.com/r/dicecloud/">
|
||||||
|
/r/dicecloud
|
||||||
|
</a>
|
||||||
|
</paper-button>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h1>
|
||||||
|
Get involved
|
||||||
|
</h1>
|
||||||
|
<p>Shape upcoming features and track bugs on the Dice Cloud Trello board
|
||||||
|
<paper-button class="trelloButton">
|
||||||
|
<a href="https://trello.com/b/94M0SCnq/dicecloud-roadmap">
|
||||||
|
Trello Roadmap
|
||||||
|
</a>
|
||||||
|
</paper-button>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
14
rpg-docs/client/views/home/intro/intro.js
Normal file
14
rpg-docs/client/views/home/intro/intro.js
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
Template.intro.events({
|
||||||
|
"tap .signInButton": function() {
|
||||||
|
Router.go("/sign-in");
|
||||||
|
},
|
||||||
|
"tap .signUpButton": function() {
|
||||||
|
Router.go("/sign-up");
|
||||||
|
},
|
||||||
|
"tap .ssArcher": function() {
|
||||||
|
Router.go("/character/yBWwt5XQTTHZiRQxq");
|
||||||
|
},
|
||||||
|
"tap .guideButton": function() {
|
||||||
|
Router.go("/guide");
|
||||||
|
},
|
||||||
|
});
|
||||||
33
rpg-docs/client/views/home/intro/intro.scss
Normal file
33
rpg-docs/client/views/home/intro/intro.scss
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
.intro {
|
||||||
|
.section {
|
||||||
|
width: 100%;
|
||||||
|
min-height: 200px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
flex-direction: column;
|
||||||
|
padding-top: 24px;
|
||||||
|
padding-bottom: 24px;
|
||||||
|
& > div, & > h2 {
|
||||||
|
padding: 32px;
|
||||||
|
.display1 {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.columns > div{
|
||||||
|
max-width: 300px;
|
||||||
|
padding: 16px;
|
||||||
|
text-align: center;
|
||||||
|
paper-button {
|
||||||
|
color: #FF5252;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
paper-button {
|
||||||
|
min-width: 200px;
|
||||||
|
a {
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: inherit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,6 +8,7 @@
|
|||||||
<link rel="import" href="/components/core-icons/editor-icons.html">
|
<link rel="import" href="/components/core-icons/editor-icons.html">
|
||||||
<link rel="import" href="/components/core-icons/image-icons.html">
|
<link rel="import" href="/components/core-icons/image-icons.html">
|
||||||
<link rel="import" href="/components/core-icons/social-icons.html">
|
<link rel="import" href="/components/core-icons/social-icons.html">
|
||||||
|
<link rel="import" href="/components/core-image/core-image.html">
|
||||||
<link rel="import" href="/components/core-item/core-item.html">
|
<link rel="import" href="/components/core-item/core-item.html">
|
||||||
<link rel="import" href="/components/core-menu/core-menu.html">
|
<link rel="import" href="/components/core-menu/core-menu.html">
|
||||||
<link rel="import" href="/components/core-scaffold/core-scaffold.html">
|
<link rel="import" href="/components/core-scaffold/core-scaffold.html">
|
||||||
@@ -32,11 +33,12 @@
|
|||||||
<link rel="import" href="/components/paper-radio-group/paper-radio-group.html">
|
<link rel="import" href="/components/paper-radio-group/paper-radio-group.html">
|
||||||
<link rel="import" href="/components/paper-shadow/paper-shadow.html">
|
<link rel="import" href="/components/paper-shadow/paper-shadow.html">
|
||||||
<link rel="import" href="/components/paper-spinner/paper-spinner.html">
|
<link rel="import" href="/components/paper-spinner/paper-spinner.html">
|
||||||
|
<link rel="import" href="/components/paper-slider/paper-slider.html">
|
||||||
<link rel="import" href="/components/paper-tabs/paper-tabs.html">
|
<link rel="import" href="/components/paper-tabs/paper-tabs.html">
|
||||||
<link rel="import" href="/components/paper-toast/paper-toast.html">
|
<link rel="import" href="/components/paper-toast/paper-toast.html">
|
||||||
<link rel="import" href="/components/paper-toggle-button/paper-toggle-button.html">
|
<link rel="import" href="/components/paper-toggle-button/paper-toggle-button.html">
|
||||||
|
|
||||||
<!--custom components-->
|
<!--custom components-->
|
||||||
<link rel="import" href="/custom_components/paper-dropdown-menu/paper-dropdown-menu.html">
|
<link rel="import" href="/custom_components/paper-dropdown-menu/paper-dropdown-menu.html">
|
||||||
<link rel="import" href="/custom_components/paper-slider-diff/paper-slider.html">
|
<link rel="import" href="/custom_components/paper-diff-slider/paper-diff-slider.html">
|
||||||
<link rel="import" href="/custom_components/swipe-detect/swipe-detect.html">
|
<link rel="import" href="/custom_components/swipe-detect/swipe-detect.html">
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
<core-header-panel drawer navigation flex mode="seamed" class="white">
|
<core-header-panel drawer navigation flex mode="seamed" class="white">
|
||||||
<div id="accountSummary">
|
<div id="accountSummary">
|
||||||
{{#if currentUser}}
|
{{#if currentUser}}
|
||||||
<div id="profileLink" style="text-decoration: underline; cursor: pointer;">
|
<div id="profileLink"
|
||||||
|
style="text-decoration: underline; cursor: pointer; font-size: 16px;">
|
||||||
{{profileLink}}
|
{{profileLink}}
|
||||||
</div>
|
</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
@@ -13,6 +14,7 @@
|
|||||||
<div id="navPanel">
|
<div id="navPanel">
|
||||||
<core-item id="homeNav" icon="home" label="Home"></core-item>
|
<core-item id="homeNav" icon="home" label="Home"></core-item>
|
||||||
{{> characterSideList}}
|
{{> characterSideList}}
|
||||||
|
<core-item id="guide" icon="social:school" label="Guide"></core-item>
|
||||||
<core-item id="feedback" icon="bug-report" label="Send Feedback"></core-item>
|
<core-item id="feedback" icon="bug-report" label="Send Feedback"></core-item>
|
||||||
<core-item id="changeLog" icon="list" label="Change Log"></core-item>
|
<core-item id="changeLog" icon="list" label="Change Log"></core-item>
|
||||||
</div>
|
</div>
|
||||||
@@ -23,7 +25,7 @@
|
|||||||
transitions="hero-transition cross-fade"
|
transitions="hero-transition cross-fade"
|
||||||
selected={{globalDetailSelected}}>
|
selected={{globalDetailSelected}}>
|
||||||
<section id="mainContentSection" class={{notSelected}}>
|
<section id="mainContentSection" class={{notSelected}}>
|
||||||
<core-header-panel fit mode="seamed">
|
<core-header-panel fit mode="standard">
|
||||||
{{> yield}}
|
{{> yield}}
|
||||||
</core-header-panel>
|
</core-header-panel>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -41,4 +41,8 @@ Template.layout.events({
|
|||||||
Router.go("changeLog");
|
Router.go("changeLog");
|
||||||
instance.find("core-drawer-panel").closeDrawer();
|
instance.find("core-drawer-panel").closeDrawer();
|
||||||
},
|
},
|
||||||
|
"tap #guide": function(event, instance) {
|
||||||
|
Router.go("guide");
|
||||||
|
instance.find("core-drawer-panel").closeDrawer();
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
.bigSpinner {
|
.bigSpinner {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
|
margin-bottom: 16px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template name="loading">
|
<template name="loading">
|
||||||
<core-toolbar class="blue-grey white-text">
|
<core-toolbar class="app-grey white-text">
|
||||||
<core-icon-button icon="menu" core-drawer-toggle></core-icon-button>
|
<core-icon-button icon="menu" core-drawer-toggle></core-icon-button>
|
||||||
</core-toolbar>
|
</core-toolbar>
|
||||||
<div fit layout vertical center center-justified>
|
<div fit layout vertical center center-justified>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template name="changeLog">
|
<template name="changeLog">
|
||||||
<core-toolbar class="blue-grey white-text">
|
<core-toolbar class="app-grey white-text">
|
||||||
<core-icon-button icon="menu" core-drawer-toggle></core-icon-button>
|
<core-icon-button icon="menu" core-drawer-toggle></core-icon-button>
|
||||||
<div flex>
|
<div flex>
|
||||||
Change Log
|
Change Log
|
||||||
|
|||||||
@@ -14,10 +14,11 @@ Template.baseDialog.helpers({
|
|||||||
showEdit: function() {
|
showEdit: function() {
|
||||||
if (this.hideEdit) return false;
|
if (this.hideEdit) return false;
|
||||||
var charId = Template.parentData().charId;
|
var charId = Template.parentData().charId;
|
||||||
|
var userId = Meteor.userId();
|
||||||
|
if (!userId) return false;
|
||||||
if (charId){
|
if (charId){
|
||||||
var char = Characters.findOne(charId);
|
var char = Characters.findOne(charId);
|
||||||
var userId = Meteor.userId();
|
if (char)
|
||||||
if (char && userId)
|
|
||||||
return char.owner === userId ||
|
return char.owner === userId ||
|
||||||
_.contains(char.writers, userId);
|
_.contains(char.writers, userId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template name="titledAtForm">
|
<template name="titledAtForm">
|
||||||
<core-toolbar class="blue-grey white-text">
|
<core-toolbar class="app-grey white-text">
|
||||||
<core-icon-button icon="menu" core-drawer-toggle></core-icon-button>
|
<core-icon-button icon="menu" core-drawer-toggle></core-icon-button>
|
||||||
<div flex>
|
<div flex>
|
||||||
|
|
||||||
|
|||||||
@@ -133,3 +133,46 @@ ChangeLogs.insert({
|
|||||||
"Added performance monitoring",
|
"Added performance monitoring",
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
ChangeLogs.insert({
|
||||||
|
version: "0.5.3",
|
||||||
|
changes: [
|
||||||
|
"Prevented a harmless error caused by effects which have no stat set",
|
||||||
|
"Added the ability to hide the spells tab",
|
||||||
|
"Feedback forms now give me push notifications",
|
||||||
|
"Feedback forms now won't send unless properly filled out",
|
||||||
|
"Overhauled how effects' stats are chosen",
|
||||||
|
],
|
||||||
|
});
|
||||||
|
|
||||||
|
ChangeLogs.insert({
|
||||||
|
version: "0.5.4",
|
||||||
|
changes: [
|
||||||
|
"Fixed rounding error on net worth calculation",
|
||||||
|
],
|
||||||
|
});
|
||||||
|
|
||||||
|
ChangeLogs.insert({
|
||||||
|
version: "0.5.5",
|
||||||
|
changes: [
|
||||||
|
"Fixed reports from google users not correctly storing the reply-to email address",
|
||||||
|
],
|
||||||
|
});
|
||||||
|
|
||||||
|
ChangeLogs.insert({
|
||||||
|
version: "0.5.6",
|
||||||
|
changes: [
|
||||||
|
"Changed front page",
|
||||||
|
"Moved to a darker style",
|
||||||
|
"Added support for letting characters be viewed by \"anyone with the link\"",
|
||||||
|
],
|
||||||
|
});
|
||||||
|
|
||||||
|
ChangeLogs.insert({
|
||||||
|
version: "0.5.7",
|
||||||
|
changes: [
|
||||||
|
"Added proficiencies to backgrounds",
|
||||||
|
"Added attacks to spells",
|
||||||
|
"Added a move item dialog to mobile devices, but it can't be accessed yet, because long-presses are broken",
|
||||||
|
],
|
||||||
|
});
|
||||||
|
|||||||
BIN
rpg-docs/public/crown-dice-logo-cropped-transparent.png
Normal file
BIN
rpg-docs/public/crown-dice-logo-cropped-transparent.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
@@ -8,55 +8,55 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
`paper-slider` allows user to select a value from a range of values by
|
`paper-diff-slider` allows user to select a value from a range of values by
|
||||||
moving the slider thumb. The interactive nature of the slider makes it a
|
moving the slider thumb. The interactive nature of the slider makes it a
|
||||||
great choice for settings that reflect intensity levels, such as volume,
|
great choice for settings that reflect intensity levels, such as volume,
|
||||||
brightness, or color saturation.
|
brightness, or color saturation.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
<paper-slider></paper-slider>
|
<paper-diff-slider></paper-diff-slider>
|
||||||
|
|
||||||
Use `min` and `max` to specify the slider range. Default is 0 to 100.
|
Use `min` and `max` to specify the slider range. Default is 0 to 100.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
<paper-slider min="10" max="200" value="110"></paper-slider>
|
<paper-diff-slider min="10" max="200" value="110"></paper-diff-slider>
|
||||||
|
|
||||||
Styling slider:
|
Styling slider:
|
||||||
|
|
||||||
To change the slider progress bar color:
|
To change the slider progress bar color:
|
||||||
|
|
||||||
paper-slider::shadow #sliderBar::shadow #activeProgress {
|
paper-diff-slider::shadow #sliderBar::shadow #activeProgress {
|
||||||
background-color: #0f9d58;
|
background-color: #0f9d58;
|
||||||
}
|
}
|
||||||
|
|
||||||
To change the slider knob color:
|
To change the slider knob color:
|
||||||
|
|
||||||
paper-slider::shadow #sliderKnobInner {
|
paper-diff-slider::shadow #sliderKnobInner {
|
||||||
background-color: #0f9d58;
|
background-color: #0f9d58;
|
||||||
}
|
}
|
||||||
|
|
||||||
To change the slider pin color:
|
To change the slider pin color:
|
||||||
|
|
||||||
paper-slider::shadow #sliderKnobInner::before {
|
paper-diff-slider::shadow #sliderKnobInner::before {
|
||||||
background-color: #0f9d58;
|
background-color: #0f9d58;
|
||||||
}
|
}
|
||||||
|
|
||||||
To change the slider pin's font color:
|
To change the slider pin's font color:
|
||||||
|
|
||||||
paper-slider::shadow #sliderKnob > #sliderKnobInner::after {
|
paper-diff-slider::shadow #sliderKnob > #sliderKnobInner::after {
|
||||||
color: #0f9d58
|
color: #0f9d58
|
||||||
}
|
}
|
||||||
|
|
||||||
To change the slider secondary progress bar color:
|
To change the slider secondary progress bar color:
|
||||||
|
|
||||||
paper-slider::shadow #sliderBar::shadow #secondaryProgress {
|
paper-diff-slider::shadow #sliderBar::shadow #secondaryProgress {
|
||||||
background-color: #0f9d58;
|
background-color: #0f9d58;
|
||||||
}
|
}
|
||||||
|
|
||||||
@group Paper Elements
|
@group Paper Elements
|
||||||
@element paper-slider
|
@element paper-diff-slider
|
||||||
@extends core-range
|
@extends core-range
|
||||||
@homepage github.io
|
@homepage github.io
|
||||||
-->
|
-->
|
||||||
@@ -65,10 +65,10 @@ To change the slider secondary progress bar color:
|
|||||||
<link rel="import" href="../../components/paper-progress/paper-progress.html">
|
<link rel="import" href="../../components/paper-progress/paper-progress.html">
|
||||||
<link rel="import" href="../../components/paper-input/paper-input.html">
|
<link rel="import" href="../../components/paper-input/paper-input.html">
|
||||||
|
|
||||||
<polymer-element name="paper-slider" extends="core-range" attributes="snaps pin disabled secondaryProgress editable immediateValue" role="slider" tabindex="0" aria-valuemin="0" aria-valuemax="100">
|
<polymer-element name="paper-diff-slider" extends="core-range" attributes="snaps pin disabled secondaryProgress editable immediateValue" role="slider" tabindex="0" aria-valuemin="0" aria-valuemax="100">
|
||||||
<template>
|
<template>
|
||||||
|
|
||||||
<link rel="stylesheet" href="paper-slider.css">
|
<link rel="stylesheet" href="paper-diff-slider.css">
|
||||||
|
|
||||||
<template if="{{!disabled}}">
|
<template if="{{!disabled}}">
|
||||||
<core-a11y-keys target="{{}}" keys="left down pagedown home" on-keys-pressed="{{decrementKey}}"></core-a11y-keys>
|
<core-a11y-keys target="{{}}" keys="left down pagedown home" on-keys-pressed="{{decrementKey}}"></core-a11y-keys>
|
||||||
@@ -109,7 +109,7 @@ To change the slider secondary progress bar color:
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
Polymer('paper-slider', {
|
Polymer('paper-diff-slider', {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fired when the slider's value changes.
|
* Fired when the slider's value changes.
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 60 KiB |
@@ -1,12 +1,12 @@
|
|||||||
Meteor.publish("singleCharacter", function(characterId){
|
Meteor.publish("singleCharacter", function(characterId){
|
||||||
userId = this.userId;
|
userId = this.userId;
|
||||||
if (!userId) return [];
|
|
||||||
var char = Characters.findOne({
|
var char = Characters.findOne({
|
||||||
_id: characterId,
|
_id: characterId,
|
||||||
$or: [
|
$or: [
|
||||||
{readers: userId},
|
{readers: userId},
|
||||||
{writers: userId},
|
{writers: userId},
|
||||||
{owner: userId},
|
{owner: userId},
|
||||||
|
{"settings.viewPermission": "public"},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
if (char){
|
if (char){
|
||||||
|
|||||||
Reference in New Issue
Block a user