Added change log
This commit is contained in:
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");
|
||||||
|
},
|
||||||
|
});
|
||||||
@@ -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", {
|
||||||
@@ -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;
|
||||||
|
},
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
<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="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
|
||||||
|
|||||||
@@ -34,4 +34,7 @@ Template.layout.events({
|
|||||||
fullOnMobile: true,
|
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>
|
||||||
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();
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user