Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2404845d51 | ||
|
|
bf032bcdf3 | ||
|
|
ff8ae89722 | ||
|
|
80ca7307ce | ||
|
|
a539b0bc6c | ||
|
|
c6b3cad9c8 | ||
|
|
95b7b66390 |
@@ -61,7 +61,6 @@ Effects.attachSchema(Schemas.Effect);
|
|||||||
if (Meteor.isServer) Characters.after.insert(function(userId, char) {
|
if (Meteor.isServer) Characters.after.insert(function(userId, char) {
|
||||||
Effects.insert({
|
Effects.insert({
|
||||||
charId: char._id,
|
charId: char._id,
|
||||||
type: "inate",
|
|
||||||
name: "Constitution modifier for each level",
|
name: "Constitution modifier for each level",
|
||||||
stat: "hitPoints",
|
stat: "hitPoints",
|
||||||
operation: "add",
|
operation: "add",
|
||||||
@@ -69,11 +68,11 @@ if (Meteor.isServer) Characters.after.insert(function(userId, char) {
|
|||||||
parent: {
|
parent: {
|
||||||
id: char._id,
|
id: char._id,
|
||||||
collection: "Characters",
|
collection: "Characters",
|
||||||
|
group: "Inate",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
Effects.insert({
|
Effects.insert({
|
||||||
charId: char._id,
|
charId: char._id,
|
||||||
type: "inate",
|
|
||||||
name: "Proficiency bonus by level",
|
name: "Proficiency bonus by level",
|
||||||
stat: "proficiencyBonus",
|
stat: "proficiencyBonus",
|
||||||
operation: "add",
|
operation: "add",
|
||||||
@@ -81,11 +80,11 @@ if (Meteor.isServer) Characters.after.insert(function(userId, char) {
|
|||||||
parent: {
|
parent: {
|
||||||
id: char._id,
|
id: char._id,
|
||||||
collection: "Characters",
|
collection: "Characters",
|
||||||
|
group: "Inate",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
Effects.insert({
|
Effects.insert({
|
||||||
charId: char._id,
|
charId: char._id,
|
||||||
type: "inate",
|
|
||||||
name: "Dexterity Armor Bonus",
|
name: "Dexterity Armor Bonus",
|
||||||
stat: "armor",
|
stat: "armor",
|
||||||
operation: "add",
|
operation: "add",
|
||||||
@@ -93,11 +92,11 @@ if (Meteor.isServer) Characters.after.insert(function(userId, char) {
|
|||||||
parent: {
|
parent: {
|
||||||
id: char._id,
|
id: char._id,
|
||||||
collection: "Characters",
|
collection: "Characters",
|
||||||
|
group: "Inate",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
Effects.insert({
|
Effects.insert({
|
||||||
charId: char._id,
|
charId: char._id,
|
||||||
type: "inate",
|
|
||||||
name: "Natural Armor",
|
name: "Natural Armor",
|
||||||
stat: "armor",
|
stat: "armor",
|
||||||
operation: "base",
|
operation: "base",
|
||||||
@@ -105,6 +104,7 @@ if (Meteor.isServer) Characters.after.insert(function(userId, char) {
|
|||||||
parent: {
|
parent: {
|
||||||
id: char._id,
|
id: char._id,
|
||||||
collection: "Characters",
|
collection: "Characters",
|
||||||
|
group: "Inate",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
27
rpg-docs/Model/Meta/ChangeLogs.js
Normal file
27
rpg-docs/Model/Meta/ChangeLogs.js
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
ChangeLogs = new Mongo.Collection("changeLogs");
|
||||||
|
|
||||||
|
Schemas.ChangeLog = new SimpleSchema({
|
||||||
|
version: {
|
||||||
|
type: String,
|
||||||
|
},
|
||||||
|
changes: {
|
||||||
|
type: [String],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
ChangeLogs.attachSchema(Schemas.ChangeLog);
|
||||||
|
|
||||||
|
ChangeLogs.allow({
|
||||||
|
insert: function(userId, doc) {
|
||||||
|
var user = Meteor.users.findOne(userId);
|
||||||
|
if (user) return _.contains(user.roles, "admin");
|
||||||
|
},
|
||||||
|
update: function(userId, doc, fields, modifier) {
|
||||||
|
var user = Meteor.users.findOne(userId);
|
||||||
|
if (user) return _.contains(user.roles, "admin");
|
||||||
|
},
|
||||||
|
remove: function(userId, doc) {
|
||||||
|
var user = Meteor.users.findOne(userId);
|
||||||
|
if (user) return _.contains(user.roles, "admin");
|
||||||
|
},
|
||||||
|
});
|
||||||
60
rpg-docs/Model/Meta/Reports.js
Normal file
60
rpg-docs/Model/Meta/Reports.js
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
Reports = new Mongo.Collection("reports");
|
||||||
|
|
||||||
|
Schemas.Report = new SimpleSchema({
|
||||||
|
owner: {
|
||||||
|
type: String,
|
||||||
|
regEx: SimpleSchema.RegEx.Id,
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
trim: false,
|
||||||
|
optional: true,
|
||||||
|
},
|
||||||
|
description: {
|
||||||
|
type: String,
|
||||||
|
trim: false,
|
||||||
|
optional: true,
|
||||||
|
},
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
allowedValues: ["bug", "change", "feature", "general"],
|
||||||
|
defaultValue: "bug",
|
||||||
|
},
|
||||||
|
//the immediate impact of doing this action (eg. -1 rages)
|
||||||
|
severity: {
|
||||||
|
type: Number,
|
||||||
|
defaultValue: 5,
|
||||||
|
min: 1,
|
||||||
|
max: 10,
|
||||||
|
},
|
||||||
|
metaData: {
|
||||||
|
type: Object,
|
||||||
|
blackbox: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
Reports.attachSchema(Schemas.Report);
|
||||||
|
|
||||||
|
Meteor.methods({
|
||||||
|
insertReport: function(report) {
|
||||||
|
check(report, {
|
||||||
|
title: String,
|
||||||
|
description: String,
|
||||||
|
type: String,
|
||||||
|
severity: Number,
|
||||||
|
metaData: Object,
|
||||||
|
});
|
||||||
|
report.owner = this.userId;
|
||||||
|
Reports.insert(report);
|
||||||
|
},
|
||||||
|
deleteReport: function(id) {
|
||||||
|
var user = Meteor.users.findOne(this.userId);
|
||||||
|
if (!_.contains(user.roles, "admin")){
|
||||||
|
throw new Meteor.Error(
|
||||||
|
"not admin",
|
||||||
|
"The user must be an administrator to delete feedback"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
Reports.remove(id);
|
||||||
|
},
|
||||||
|
});
|
||||||
@@ -23,6 +23,9 @@ Router.plugin("dataNotFound", {notFoundTemplate: "notFound"});
|
|||||||
Router.map(function() {
|
Router.map(function() {
|
||||||
this.route("/", {
|
this.route("/", {
|
||||||
name: "home",
|
name: "home",
|
||||||
|
onAfterAction: function() {
|
||||||
|
document.title = appName;
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
this.route("characterList", {
|
this.route("characterList", {
|
||||||
@@ -50,7 +53,7 @@ Router.map(function() {
|
|||||||
data: function() {
|
data: function() {
|
||||||
var data = Characters.findOne(
|
var data = Characters.findOne(
|
||||||
{_id: this.params._id},
|
{_id: this.params._id},
|
||||||
{fields: {_id: 1, name: 1, color: 1}}
|
{fields: {_id: 1, name: 1, color: 1, writers: 1, readers: 1}}
|
||||||
);
|
);
|
||||||
return data;
|
return data;
|
||||||
},
|
},
|
||||||
@@ -74,7 +77,20 @@ Router.map(function() {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
this.route("/loginButtons", {
|
this.route("/changelog", {
|
||||||
name: "loginButtons",
|
name: "changeLog",
|
||||||
})
|
waitOn: function() {
|
||||||
|
return [
|
||||||
|
Meteor.subscribe("changeLog"),
|
||||||
|
]
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
changeLogs: function() {
|
||||||
|
return ChangeLogs.find({}, {sort: {version: -1}});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onAfterAction: function() {
|
||||||
|
document.title = appName;
|
||||||
|
},
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
6
rpg-docs/client/globalHelpers/canEditCharacter.js
Normal file
6
rpg-docs/client/globalHelpers/canEditCharacter.js
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
Template.registerHelper("canEditCharacter", function(charId) {
|
||||||
|
var char = Characters.findOne(charId)
|
||||||
|
var userId = Meteor.userId();
|
||||||
|
return char.owner === userId ||
|
||||||
|
_.contains(char.writers, userId);
|
||||||
|
});
|
||||||
@@ -5,18 +5,24 @@
|
|||||||
<div flex>
|
<div flex>
|
||||||
{{name}}
|
{{name}}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
{{#if canEditCharacter _id}}
|
||||||
{{> colorDropdown}}
|
<div>
|
||||||
</div>
|
{{> colorDropdown}}
|
||||||
<paper-menu-button>
|
</div>
|
||||||
<paper-icon-button icon="more-vert" noink></paper-icon-button>
|
<paper-menu-button>
|
||||||
<paper-dropdown class="dropdown" halign="right">
|
<paper-icon-button icon="more-vert" noink></paper-icon-button>
|
||||||
<core-menu class="menu" style="color: black; color: rgba(0,0,0,0.87);">
|
<paper-dropdown class="dropdown" halign="right">
|
||||||
<paper-item id="deleteCharacter"><core-icon icon="delete"></core-icon>Delete</paper-item>
|
<core-menu class="menu" style="color: black; color: rgba(0,0,0,0.87);">
|
||||||
<paper-item id="shareCharacter"><core-icon icon="social:share"></core-icon>Share</paper-item>
|
<paper-item id="deleteCharacter">
|
||||||
</core-menu>
|
<core-icon icon="delete"></core-icon>Delete
|
||||||
</paper-dropdown>
|
</paper-item>
|
||||||
</paper-menu-button>
|
<paper-item id="shareCharacter">
|
||||||
|
<core-icon icon="social:share"></core-icon>Share
|
||||||
|
</paper-item>
|
||||||
|
</core-menu>
|
||||||
|
</paper-dropdown>
|
||||||
|
</paper-menu-button>
|
||||||
|
{{/if}}
|
||||||
<div class="bottom fit" horizontal layout>
|
<div class="bottom fit" horizontal layout>
|
||||||
<paper-tabs flex horizontal center layout id="characterSheetTabs" selected={{selectedTab}} class="{{colorClass}}">
|
<paper-tabs flex horizontal center layout id="characterSheetTabs" selected={{selectedTab}} class="{{colorClass}}">
|
||||||
<paper-tab name="stats">Stats</paper-tab>
|
<paper-tab name="stats">Stats</paper-tab>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ var getTab = function(charId){
|
|||||||
Template.characterSheet.helpers({
|
Template.characterSheet.helpers({
|
||||||
selectedTab: function(){
|
selectedTab: function(){
|
||||||
return getTab(this._id);
|
return getTab(this._id);
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
Template.characterSheet.events({
|
Template.characterSheet.events({
|
||||||
|
|||||||
@@ -104,14 +104,16 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="fab-buffer"></div>
|
<div class="fab-buffer"></div>
|
||||||
</div>
|
</div>
|
||||||
<paper-fab id="addFeature"
|
{{#if canEditCharacter _id}}
|
||||||
class="floatyButton"
|
<paper-fab id="addFeature"
|
||||||
icon="add"
|
class="floatyButton"
|
||||||
title="Add"
|
icon="add"
|
||||||
role="button"
|
title="Add"
|
||||||
tabindex="0"
|
role="button"
|
||||||
aria-label="Add"
|
tabindex="0"
|
||||||
hero-id="main"></paper-fab>
|
aria-label="Add"
|
||||||
|
hero-id="main"></paper-fab>
|
||||||
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -77,10 +77,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="fab-buffer"></div>
|
<div class="fab-buffer"></div>
|
||||||
</div>
|
</div>
|
||||||
<paper-fab-menu id="inventoryAddMenu" icon="add" closeIcon="close" duration="0.3">
|
{{#if canEditCharacter _id}}
|
||||||
<paper-fab-menu-item id="addItem" icon="note-add" color="#d23f31" tooltip="Item"></paper-fab-menu-item>
|
<paper-fab-menu id="inventoryAddMenu" icon="add" closeIcon="close" duration="0.3">
|
||||||
<paper-fab-menu-item id="addContainer" icon="work" color="#d23f31" tooltip="Container"></paper-fab-menu-item>
|
<paper-fab-menu-item id="addItem" icon="note-add" color="#d23f31" tooltip="Item"></paper-fab-menu-item>
|
||||||
</paper-fab-menu>
|
<paper-fab-menu-item id="addContainer" icon="work" color="#d23f31" tooltip="Container"></paper-fab-menu-item>
|
||||||
|
</paper-fab-menu>
|
||||||
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
<template name="itemDetails">
|
<template name="itemDetails">
|
||||||
<div layout horizontal wrap center justified class="headline">
|
<div layout horizontal wrap center justified class="headline">
|
||||||
{{#if weight}}<div class="sideMargin">{{totalWeight}}lbs</div>{{/if}}
|
{{#if weight}}<div class="sideMargin">{{round totalWeight}}lbs</div>{{/if}}
|
||||||
{{#if value}}<div>{{valueString totalValue}}</div>{{/if}}
|
{{#if value}}<div>{{valueString totalValue}}</div>{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<div layout horizontal wrap class="caption">
|
<div layout horizontal wrap class="caption">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template name="experienceDialog">
|
<template name="experienceDialog">
|
||||||
{{#with experience}}
|
{{#with experience}}
|
||||||
{{#baseDialog title=name class=colorClass hideColor="true" startEditing=../startEditing}}
|
{{#baseDialog title=name class=colorClass hideColor="true" startEditing=../startEditing}}
|
||||||
<div horizontal layout center-justified>
|
<div horizontal layout center-justified class= "display2">
|
||||||
{{value}}
|
{{value}}
|
||||||
</div>
|
</div>
|
||||||
{{#if description}}
|
{{#if description}}
|
||||||
|
|||||||
@@ -68,6 +68,7 @@
|
|||||||
<div class="fab-buffer"></div>
|
<div class="fab-buffer"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{{#if canEditCharacter _id}}
|
||||||
<paper-fab id="addNote"
|
<paper-fab id="addNote"
|
||||||
class="floatyButton"
|
class="floatyButton"
|
||||||
icon="add"
|
icon="add"
|
||||||
@@ -75,4 +76,5 @@
|
|||||||
role="button"
|
role="button"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
hero-id="main"></paper-fab>
|
hero-id="main"></paper-fab>
|
||||||
|
{{/if}}
|
||||||
</template>
|
</template>
|
||||||
@@ -1,5 +1,8 @@
|
|||||||
<template name="raceDialog">
|
<template name="raceDialog">
|
||||||
{{#baseDialog title="Race" class=colorClass hideColor="true" hideDelete="true" startEditing=startEditing}}
|
{{#baseDialog title="Race" class=colorClass hideColor="true" hideDelete="true" startEditing=startEditing}}
|
||||||
|
<div horizontal layout center-justified class= "display2">
|
||||||
|
{{race}}
|
||||||
|
</div>
|
||||||
{{> effectsViewList charId=charId parentId=charId parentGroup="racial"}}
|
{{> effectsViewList charId=charId parentId=charId parentGroup="racial"}}
|
||||||
{{> proficiencyViewList charId=charId parentId=charId parentGroup="racial"}}
|
{{> proficiencyViewList charId=charId parentId=charId parentGroup="racial"}}
|
||||||
{{else}}
|
{{else}}
|
||||||
|
|||||||
@@ -91,8 +91,10 @@
|
|||||||
<div class="fab-buffer"></div>
|
<div class="fab-buffer"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<paper-fab-menu id="inventoryAddMenu" icon="add" closeIcon="close" duration="0.3">
|
{{#if canEditCharacter _id}}
|
||||||
<paper-fab-menu-item id="addSpell" icon="note-add" color="#d23f31" tooltip="Spell"></paper-fab-menu-item>
|
<paper-fab-menu id="inventoryAddMenu" icon="add" closeIcon="close" duration="0.3">
|
||||||
<paper-fab-menu-item id="addSpellList" icon="work" color="#d23f31" tooltip="Spell List"></paper-fab-menu-item>
|
<paper-fab-menu-item id="addSpell" icon="note-add" color="#d23f31" tooltip="Spell"></paper-fab-menu-item>
|
||||||
</paper-fab-menu>
|
<paper-fab-menu-item id="addSpellList" icon="work" color="#d23f31" tooltip="Spell List"></paper-fab-menu-item>
|
||||||
|
</paper-fab-menu>
|
||||||
|
{{/if}}
|
||||||
</template>
|
</template>
|
||||||
@@ -140,7 +140,12 @@ Template.attributeDialogView.helpers({
|
|||||||
return char.attributeValue(this.statName);
|
return char.attributeValue(this.statName);
|
||||||
},
|
},
|
||||||
sourceName: function(){
|
sourceName: function(){
|
||||||
if (this.parent.collection === "Characters") return this.name;
|
if (this.parent.group === "racial"){
|
||||||
|
return this.getParent().race;
|
||||||
|
}
|
||||||
|
if (this.parent.collection === "Characters"){
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
return this.getParent().name;
|
return this.getParent().name;
|
||||||
},
|
},
|
||||||
operationName: function(){
|
operationName: function(){
|
||||||
|
|||||||
@@ -2,10 +2,14 @@
|
|||||||
color: black;
|
color: black;
|
||||||
color: rgba(0, 0, 0, 0.870588);
|
color: rgba(0, 0, 0, 0.870588);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 16px;
|
|
||||||
height: 40px;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding: 12px 0 12px 16px;
|
padding: 8px 0 8px 16px;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.singleLineItem core-icon {
|
||||||
|
height: 8px;
|
||||||
|
margin-right: 8px;
|
||||||
|
width: 8px;
|
||||||
}
|
}
|
||||||
@@ -3,7 +3,11 @@
|
|||||||
{{#if characters.count}}
|
{{#if characters.count}}
|
||||||
<div>
|
<div>
|
||||||
{{#each characters}}
|
{{#each characters}}
|
||||||
<div class="singleLineItem characterRepresentative">{{name}}</div>
|
<div class="singleLineItem characterRepresentative"
|
||||||
|
layout horizontal center>
|
||||||
|
<core-icon icon="image:brightness-1"></core-icon>
|
||||||
|
<div>{{name}}</div>
|
||||||
|
</div>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|||||||
30
rpg-docs/client/views/feedback/feedback.html
Normal file
30
rpg-docs/client/views/feedback/feedback.html
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<template name="feedback">
|
||||||
|
<div class="feedback" style="min-width: 300px; min-height: 370px">
|
||||||
|
<div>
|
||||||
|
<paper-input id="feedbackTitle" label="Title" floatinglabel></paper-input>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<paper-dropdown-menu class="typeDropdown" label="Operation" flex>
|
||||||
|
<paper-dropdown layered class="dropdown">
|
||||||
|
<core-menu class="menu typeMenu" selected="general">
|
||||||
|
<paper-item name="general">General Feedback</paper-item>
|
||||||
|
<paper-item name="bug">Bug</paper-item>
|
||||||
|
<paper-item name="change">Suggested Change</paper-item>
|
||||||
|
<paper-item name="feature">Feature Request</paper-item>
|
||||||
|
</core-menu>
|
||||||
|
</paper-dropdown>
|
||||||
|
</paper-dropdown-menu>
|
||||||
|
</div>
|
||||||
|
<div layout horizontal center>
|
||||||
|
<div>Importance</div>
|
||||||
|
<paper-slider id="severity" max=10 min=1 value=5 snap></paper-slider>
|
||||||
|
</div>
|
||||||
|
<paper-input-decorator label="Description" floatinglabel layout vertical>
|
||||||
|
<paper-autogrow-textarea rows=10 maxRows=10>
|
||||||
|
<textarea id="feedbackDescription"></textarea>
|
||||||
|
</paper-autogrow-textarea>
|
||||||
|
</paper-input-decorator>
|
||||||
|
</div>
|
||||||
|
<paper-button id="cancelButton" affirmative>Cancel</paper-button>
|
||||||
|
<paper-button id="sendButton" affirmative>Send </paper-button>
|
||||||
|
</template>
|
||||||
14
rpg-docs/client/views/feedback/feedback.js
Normal file
14
rpg-docs/client/views/feedback/feedback.js
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
Template.feedback.events({
|
||||||
|
"tap #sendButton": function(event, instance) {
|
||||||
|
var report = {};
|
||||||
|
report.title = instance.find("#feedbackTitle").value;
|
||||||
|
report.severity = instance.find("#severity").value;
|
||||||
|
report.type = instance.find(".typeMenu").selected;
|
||||||
|
report.description = instance.find("#feedbackDescription").value;
|
||||||
|
report.metaData = {
|
||||||
|
url: window.location.href,
|
||||||
|
session: _.pairs(Session.keys),
|
||||||
|
};
|
||||||
|
Meteor.call("insertReport", report);
|
||||||
|
}
|
||||||
|
});
|
||||||
@@ -13,6 +13,8 @@
|
|||||||
<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="feedback" icon="bug-report" label="Send Feedback"></core-item>
|
||||||
|
<core-item id="changeLog" icon="list" label="Change Log"></core-item>
|
||||||
</div>
|
</div>
|
||||||
</core-header-panel>
|
</core-header-panel>
|
||||||
<core-animated-pages main
|
<core-animated-pages main
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
Template.layout.onCreated(function() {
|
||||||
|
this.subscribe("user");
|
||||||
|
});
|
||||||
|
|
||||||
Template.layout.rendered = function() {
|
Template.layout.rendered = function() {
|
||||||
$(window).on("popstate", GlobalUI.popStateHandler);
|
$(window).on("popstate", GlobalUI.popStateHandler);
|
||||||
};
|
};
|
||||||
@@ -23,4 +27,14 @@ Template.layout.events({
|
|||||||
"tap #profileLink": function(event, instance){
|
"tap #profileLink": function(event, instance){
|
||||||
Router.go("profile");
|
Router.go("profile");
|
||||||
},
|
},
|
||||||
|
"tap #feedback": function(event, instance) {
|
||||||
|
GlobalUI.showDialog({
|
||||||
|
heading: "Feedback",
|
||||||
|
template: "feedback",
|
||||||
|
fullOnMobile: true,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
"tap #changeLog": function(event, instance) {
|
||||||
|
Router.go("changeLog");
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
20
rpg-docs/client/views/meta/changeLog/changeLog.html
Normal file
20
rpg-docs/client/views/meta/changeLog/changeLog.html
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<template name="changeLog">
|
||||||
|
<core-toolbar class="blue-grey white-text">
|
||||||
|
<core-icon-button icon="menu" core-drawer-toggle></core-icon-button>
|
||||||
|
<div flex>
|
||||||
|
Change Log
|
||||||
|
</div>
|
||||||
|
</core-toolbar>
|
||||||
|
<div class="changeLog scroll-y" fit>
|
||||||
|
{{#each changeLogs}}
|
||||||
|
<paper-shadow class="white padded" style="margin: 8px;">
|
||||||
|
<h2>{{version}}</h2>
|
||||||
|
<ul>
|
||||||
|
{{#each changes}}
|
||||||
|
<li>{{this}}</li>
|
||||||
|
{{/each}}
|
||||||
|
</ul>
|
||||||
|
</paper-shadow>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
@@ -20,12 +20,12 @@
|
|||||||
aria-label="Delete Feature"
|
aria-label="Delete Feature"
|
||||||
noink></paper-icon-button>
|
noink></paper-icon-button>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#unless hideEdit}}
|
{{#if showEdit}}
|
||||||
<paper-icon-button id="editButton"
|
<paper-icon-button id="editButton"
|
||||||
icon="create"
|
icon="create"
|
||||||
aria-label="Delete Feature"
|
aria-label="Delete Feature"
|
||||||
noink></paper-icon-button>
|
noink></paper-icon-button>
|
||||||
{{/unless}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</core-toolbar>
|
</core-toolbar>
|
||||||
<div class="detailContent">
|
<div class="detailContent">
|
||||||
|
|||||||
@@ -11,6 +11,18 @@ Template.baseDialog.helpers({
|
|||||||
editing: function(){
|
editing: function(){
|
||||||
return Template.instance().editing.get();
|
return Template.instance().editing.get();
|
||||||
},
|
},
|
||||||
|
showEdit: function() {
|
||||||
|
if (this.hideEdit) return false;
|
||||||
|
var charId = Template.parentData().charId;
|
||||||
|
if (charId){
|
||||||
|
var char = Characters.findOne(charId);
|
||||||
|
var userId = Meteor.userId();
|
||||||
|
if (char && userId)
|
||||||
|
return char.owner === userId ||
|
||||||
|
_.contains(char.writers, userId);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
Template.baseDialog.events({
|
Template.baseDialog.events({
|
||||||
|
|||||||
3
rpg-docs/server/publications/changeLog.js
Normal file
3
rpg-docs/server/publications/changeLog.js
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
Meteor.publish("changeLog", function(){
|
||||||
|
return ChangeLogs.find();
|
||||||
|
});
|
||||||
3
rpg-docs/server/publications/user.js
Normal file
3
rpg-docs/server/publications/user.js
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
Meteor.publish("user", function(){
|
||||||
|
return Meteor.users.find(this.userId, {fields: {roles: 1}});
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user