diff --git a/app/.meteor/packages b/app/.meteor/packages index 815922ae..6244d270 100644 --- a/app/.meteor/packages +++ b/app/.meteor/packages @@ -25,13 +25,13 @@ chuangbo:marked reywood:iron-router-ga meteor-base@1.4.0 mobile-experience@1.0.5 -mongo@1.6.0 +mongo@1.6.2 blaze-html-templates session@1.2.0 jquery@1.11.10 tracker@1.2.0 logging@1.1.20 -reload@1.2.0 +reload@1.3.0 ejson@1.1.0 spacebars check@1.3.1 @@ -43,11 +43,11 @@ templates:array ecmascript@0.12.4 es5-shim@4.8.0 differential:vulcanize -reactive-dict@1.2.1 +reactive-dict@1.3.0 ongoworks:speakingurl service-configuration@1.0.11 google-config-ui@1.0.1 -dynamic-import@0.5.0 +dynamic-import@0.5.1 ddp-rate-limiter@1.0.7 rate-limit@1.0.9 iron:router diff --git a/app/.meteor/release b/app/.meteor/release index 91e05fc1..97064e19 100644 --- a/app/.meteor/release +++ b/app/.meteor/release @@ -1 +1 @@ -METEOR@1.8.0.2 +METEOR@1.8.1 diff --git a/app/.meteor/versions b/app/.meteor/versions index 73460e95..eecfcb54 100644 --- a/app/.meteor/versions +++ b/app/.meteor/versions @@ -1,4 +1,4 @@ -accounts-base@1.4.3 +accounts-base@1.4.4 accounts-google@1.3.2 accounts-oauth@1.1.16 accounts-password@1.5.1 @@ -10,8 +10,8 @@ aldeed:schema-deny@1.1.0 aldeed:schema-index@1.1.1 aldeed:simple-schema@1.5.4 allow-deny@1.1.0 -autoupdate@1.5.1 -babel-compiler@7.2.4 +autoupdate@1.6.0 +babel-compiler@7.3.4 babel-runtime@1.3.0 base64@1.0.11 binary-heap@1.0.11 @@ -31,12 +31,12 @@ ddp@1.4.0 ddp-client@2.3.3 ddp-common@1.4.0 ddp-rate-limiter@1.0.7 -ddp-server@2.2.0 +ddp-server@2.3.0 deps@1.0.12 diff-sequence@1.1.1 differential:vulcanize@3.0.0 dynamic-import@0.5.1 -ecmascript@0.12.6 +ecmascript@0.12.7 ecmascript-runtime@0.7.0 ecmascript-runtime-client@0.8.0 ecmascript-runtime-server@0.7.1 @@ -103,9 +103,9 @@ promise@0.11.2 raix:eventemitter@0.1.3 random@1.1.0 rate-limit@1.0.9 -reactive-dict@1.2.1 +reactive-dict@1.3.0 reactive-var@1.0.11 -reload@1.2.0 +reload@1.3.0 retry@1.1.0 reywood:iron-router-ga@0.7.1 routepolicy@1.1.0 @@ -133,7 +133,7 @@ url@1.2.0 useraccounts:core@1.14.2 useraccounts:iron-routing@1.14.2 useraccounts:polymer@1.14.2 -webapp@1.7.3 +webapp@1.7.4 webapp-hashing@1.0.9 zimme:collection-behaviours@1.1.3 zimme:collection-softremovable@1.0.5 diff --git a/app/Model/Library/Library.js b/app/Model/Library/Library.js index edcb8cc1..c8f15706 100644 --- a/app/Model/Library/Library.js +++ b/app/Model/Library/Library.js @@ -10,19 +10,21 @@ Schemas.Library = new SimpleSchema({ Libraries.attachSchema(Schemas.Library); -Libraries.after.remove(function(userId, library) { - LibraryItems.remove({library: library._id}); - LibrarySpells.remove({library: library._id}); -}); +if (Meteor.isServer){ + Libraries.after.remove(function(userId, library) { + LibraryItems.remove({library: library._id}); + LibrarySpells.remove({library: library._id}); + }); +} Meteor.methods({ - removeLibrary: function(libraryId) { + unshareLibraryWithMe: function(libraryId) { let library = Libraries.findOne(libraryId); - let userId = Meteor.userId(); + let userId = Meteor.userId(); if (!library) return; if (library.owner === userId){ - Libraries.remove(libraryId); + throw new Meteor.error("Can't unshare, you own this") } else { if (_.contains(library.readers, userId)){ Libraries.update(libraryId, {$pull: {"readers": userId}}); diff --git a/app/Routes/Routes.js b/app/Routes/Routes.js index 49accc2a..b6803480 100644 --- a/app/Routes/Routes.js +++ b/app/Routes/Routes.js @@ -8,6 +8,8 @@ Router.plugin("ensureSignedIn", { only: [ "profile", "characterList", + "library", + "libraries", ] }); @@ -118,11 +120,28 @@ Router.map(function() { }, }); - this.route("library", { + this.route("libraries", { path: "/library", waitOn: function(){ return subsManager.subscribe("customLibraries"); }, + onAfterAction: function() { + document.title = appName + " - Libraries"; + }, + fastRender: true, + }); + + this.route("library", { + path: "/library/:_id", + waitOn: function(){ + return [ + subsManager.subscribe("libraryItems", this.params._id), + subsManager.subscribe("singleLibrary", this.params._id), + ]; + }, + data: function() { + return Libraries.findOne(this.params._id); + }, onAfterAction: function() { document.title = appName + " - Library"; }, diff --git a/app/client/globalHelpers/isTier5.js b/app/client/globalHelpers/isTier5.js new file mode 100644 index 00000000..1802364f --- /dev/null +++ b/app/client/globalHelpers/isTier5.js @@ -0,0 +1,7 @@ +Template.registerHelper("isTier5", function(){ + let user = Meteor.user(); + if (!user) return false; + patreon = user.patreon; + if (!patreon) return false; + return patreon.entitledCents >= 500 || patreon.entitledCentsOverride >= 500; +}); diff --git a/app/client/globalHelpers/patreonLoginUrl.js b/app/client/globalHelpers/patreonLoginUrl.js new file mode 100644 index 00000000..dbce866d --- /dev/null +++ b/app/client/globalHelpers/patreonLoginUrl.js @@ -0,0 +1,19 @@ +const CLIENT_ID = Meteor.settings && + Meteor.settings.public.patreon && + Meteor.settings.public.patreon.clientId; + +Template.registerHelper("patreonLoginUrl", function() { + if (!CLIENT_ID) return; + return formatUrl({ + protocol: 'https', + host: 'patreon.com', + pathname: '/oauth2/authorize', + query: { + response_type: 'code', + client_id: CLIENT_ID, + redirect_uri: Meteor.absoluteUrl() + 'patreon-redirect', + state: Meteor.userId(), + scope: 'identity', + }, + }); +}); diff --git a/app/client/views/character/inventory/inventory.js b/app/client/views/character/inventory/inventory.js index 4234ecff..de5c62ab 100644 --- a/app/client/views/character/inventory/inventory.js +++ b/app/client/views/character/inventory/inventory.js @@ -157,7 +157,7 @@ Template.inventory.events({ } // Make the library item into a regular item let item = _.omit(result, "libraryName", "library", "attacks", "effects"); - delete item.settings.category; + if (item.settings && item.settings.category) delete item.settings.category; // Update the item to match library item Items.update(itemId, {$set: item}); // Copy over attacks and effects diff --git a/app/client/views/character/newUserStepper/newUserStepper.html b/app/client/views/character/newUserStepper/newUserStepper.html index e4cce0e4..444817e3 100644 --- a/app/client/views/character/newUserStepper/newUserStepper.html +++ b/app/client/views/character/newUserStepper/newUserStepper.html @@ -4,19 +4,30 @@
To get started, add a feature
+Add a racial effect to set your speed
+View your speed stat
++ Done! If you get stuck, be sure to check out the guide, or ask for help using the feedback form +
+ With the Item Libraries beta you can create collections of items to use + across your characters, and share them with other players. +
++ You can also subscribe to existing community libraries of items, saving + time and effort manually entering item details. +
+