diff --git a/rpg-docs/.meteor/.finished-upgraders b/rpg-docs/.meteor/.finished-upgraders index 68df3d8d..8a761038 100644 --- a/rpg-docs/.meteor/.finished-upgraders +++ b/rpg-docs/.meteor/.finished-upgraders @@ -5,3 +5,4 @@ notices-for-0.9.0 notices-for-0.9.1 0.9.4-platform-file +notices-for-facebook-graph-api-2 diff --git a/rpg-docs/.meteor/packages b/rpg-docs/.meteor/packages index e35c0bc6..f650cbb2 100644 --- a/rpg-docs/.meteor/packages +++ b/rpg-docs/.meteor/packages @@ -14,7 +14,6 @@ reactive-var underscore aldeed:collection2 differential:vulcanize -msavin:mongol matb33:collection-hooks zimme:collection-softremovable momentjs:moment diff --git a/rpg-docs/.meteor/release b/rpg-docs/.meteor/release index 41f2e623..151347b8 100644 --- a/rpg-docs/.meteor/release +++ b/rpg-docs/.meteor/release @@ -1 +1 @@ -METEOR@1.0.4.2 +METEOR@1.0.5 diff --git a/rpg-docs/.meteor/versions b/rpg-docs/.meteor/versions index 568d1425..9c7ed8b9 100644 --- a/rpg-docs/.meteor/versions +++ b/rpg-docs/.meteor/versions @@ -4,10 +4,8 @@ accounts-ui@1.1.5 accounts-ui-unstyled@1.1.7 aldeed:collection2@2.3.2 aldeed:simple-schema@1.3.0 -aldeed:template-extension@3.4.3 amplify@1.0.0 autoupdate@1.2.0 -babrahams:editable-json@0.3.11 base64@1.0.3 binary-heap@1.0.3 blaze@2.1.0 @@ -16,8 +14,7 @@ boilerplate-generator@1.0.3 callback-hook@1.0.3 check@1.0.5 coffeescript@1.0.6 -dburles:collection-helpers@1.0.2 -dburles:mongo-collection-instances@0.3.3 +dburles:collection-helpers@1.0.3 ddp@1.1.0 deps@1.0.7 differential:vulcanize@0.0.3 @@ -25,7 +22,6 @@ ejson@1.0.6 email@1.0.6 fastclick@1.0.3 geojson-utils@1.0.3 -gwendall:session-json@0.1.7 html-tools@1.0.4 htmljs@1.0.4 http@1.1.0 @@ -41,7 +37,6 @@ iron:router@1.0.7 iron:url@1.0.7 jquery@1.11.3_2 json@1.0.3 -lai:collection-extensions@0.1.3 launch-screen@1.0.2 less@1.0.13 livedata@1.0.13 @@ -50,14 +45,12 @@ logging@1.0.7 matb33:collection-hooks@0.7.11 meteor@1.1.5 meteor-platform@1.2.2 -meteortoys:toykit@0.2.1 mike:mocha@0.5.2 minifiers@1.1.4 minimongo@1.0.7 mobile-status-bar@1.0.3 momentjs:moment@2.9.0 mongo@1.1.0 -msavin:mongol@1.0.5 npm-bcrypt@0.7.8_1 observe-sequence@1.0.5 ordered-dict@1.0.3 diff --git a/rpg-docs/Model/Users/Users.js b/rpg-docs/Model/Users/Users.js new file mode 100644 index 00000000..95d0c399 --- /dev/null +++ b/rpg-docs/Model/Users/Users.js @@ -0,0 +1,35 @@ +Schema = {}; + +Schema.User = new SimpleSchema({ + username: { + type: String, + regEx: /^[a-z0-9A-Z_]{3,15}$/ + }, + emails: { + type: [Object], + // this must be optional if you also use other login services like facebook, + // but if you use only accounts-password, then it can be required + optional: true + }, + "emails.$.address": { + type: String, + regEx: SimpleSchema.RegEx.Email + }, + "emails.$.verified": { + type: Boolean + }, + createdAt: { + type: Date + }, + services: { + type: Object, + optional: true, + blackbox: true + }, + roles: { + type: [String], + optional: true + } +}); + +Meteor.users.attachSchema(Schema.User); diff --git a/rpg-docs/client/views/GeneralCSS/globalDetail.css b/rpg-docs/client/views/GeneralCSS/globalDetail.css index 318ceb8c..d1fb07ec 100644 --- a/rpg-docs/client/views/GeneralCSS/globalDetail.css +++ b/rpg-docs/client/views/GeneralCSS/globalDetail.css @@ -29,7 +29,7 @@ padding: 24px; } -.red-button { +html /deep/ .red-button { background: #d23f31; color: #fff; margin-top: 16px; diff --git a/rpg-docs/client/views/character/characterSettings/characterSettings.html b/rpg-docs/client/views/character/characterSettings/characterSettings.html new file mode 100644 index 00000000..56f713b5 --- /dev/null +++ b/rpg-docs/client/views/character/characterSettings/characterSettings.html @@ -0,0 +1,3 @@ + diff --git a/rpg-docs/client/views/character/characterSettings/characterSettings.js b/rpg-docs/client/views/character/characterSettings/characterSettings.js new file mode 100644 index 00000000..b07cd07a --- /dev/null +++ b/rpg-docs/client/views/character/characterSettings/characterSettings.js @@ -0,0 +1,3 @@ +Template.characterSettings.events({ + +}); diff --git a/rpg-docs/client/views/character/characterSettings/deleteCharacterConfirmation.html b/rpg-docs/client/views/character/characterSettings/deleteCharacterConfirmation.html new file mode 100644 index 00000000..a941445c --- /dev/null +++ b/rpg-docs/client/views/character/characterSettings/deleteCharacterConfirmation.html @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/rpg-docs/client/views/character/characterSettings/deleteCharacterConfirmation.js b/rpg-docs/client/views/character/characterSettings/deleteCharacterConfirmation.js new file mode 100644 index 00000000..d53049dd --- /dev/null +++ b/rpg-docs/client/views/character/characterSettings/deleteCharacterConfirmation.js @@ -0,0 +1,26 @@ +Template.deleteCharacterConfirmation.onCreated(function(){ + this.canDelete = new ReactiveVar(false); +}); + +Template.deleteCharacterConfirmation.helpers({ + cantDelete: function(){ + return !Template.instance().canDelete.get(); + }, + getStyle: function(){ + if(Template.instance().canDelete.get()) return "background: #d23f31; color: white;"; + } +}); + +Template.deleteCharacterConfirmation.events({ + "change #nameInput, input #nameInput": function(event, instance){ + var canDel = instance.find("#nameInput").value === this.name; + instance.canDelete.set(canDel); + }, + "tap #deleteButton": function(event, instance){ + if(instance.find("#nameInput").value === this.name){ + GlobalUI.closeDialog(); + Router.go("/"); + Characters.remove(this._id); + } + } +}); diff --git a/rpg-docs/client/views/character/characterSheet.html b/rpg-docs/client/views/character/characterSheet.html index 24e58deb..853fbab2 100644 --- a/rpg-docs/client/views/character/characterSheet.html +++ b/rpg-docs/client/views/character/characterSheet.html @@ -8,6 +8,15 @@
{{> colorDropdown}}
+ + + + + Delete + Share + + +
Stats diff --git a/rpg-docs/client/views/character/characterSheet.js b/rpg-docs/client/views/character/characterSheet.js index 1f4ec519..cb60c37d 100644 --- a/rpg-docs/client/views/character/characterSheet.js +++ b/rpg-docs/client/views/character/characterSheet.js @@ -1,6 +1,6 @@ Template.characterSheet.created = function(){ Session.setDefault(this.data._id + ".selectedTab", "stats"); -} +}; var setTab = function(charId, tab){ return Session.set(charId + ".selectedTab", tab); @@ -26,4 +26,11 @@ Template.characterSheet.events({ "color-change": function(event, instance){ Characters.update(this._id, {$set: {color: event.color}}); }, + "tap #deleteCharacter": function(event, instance){ + GlobalUI.showDialog({ + heading: "Delete " + this.name, + data: this, + template: "deleteCharacterConfirmation", + }); + }, }); diff --git a/rpg-docs/client/views/character/inventory/inventory.html b/rpg-docs/client/views/character/inventory/inventory.html index 08f0d26f..2ffc2ab1 100644 --- a/rpg-docs/client/views/character/inventory/inventory.html +++ b/rpg-docs/client/views/character/inventory/inventory.html @@ -36,7 +36,7 @@ {{#each attuned}} {{>inventoryItem}} {{/each}} -
{{name}}
+ {{#if attuned.count}}
Equipment
{{/if}} {{#each equipment}} {{>inventoryItem}} {{/each}} diff --git a/rpg-docs/client/views/characterList/characterList.css b/rpg-docs/client/views/characterList/characterList.css index df0e77b4..e457e32e 100644 --- a/rpg-docs/client/views/characterList/characterList.css +++ b/rpg-docs/client/views/characterList/characterList.css @@ -5,4 +5,6 @@ .characterCard{ width: 272px; margin: 4px; + min-width: 272px; + flex-grow: 1; } diff --git a/rpg-docs/client/views/characterList/characterList.html b/rpg-docs/client/views/characterList/characterList.html index 75ff8a81..1a5b4bed 100644 --- a/rpg-docs/client/views/characterList/characterList.html +++ b/rpg-docs/client/views/characterList/characterList.html @@ -8,14 +8,14 @@
{{#if currentUser}} {{#if characters.count}} -
+
{{# each characters}} {{#with characterDetails}} {{#containerCardHelper this}}{{alignment}} {{gender}} {{race}}{{/containerCardHelper}} {{/with}} {{/each}} + {{> gridPadding class="characterCard" num=12}}
- {{> gridPadding class="characterCard" num=12}} {{else}}
You don't seem to have any characters :(
diff --git a/rpg-docs/client/views/characterList/characterList.js b/rpg-docs/client/views/characterList/characterList.js index 83c8dbd5..222dc02e 100644 --- a/rpg-docs/client/views/characterList/characterList.js +++ b/rpg-docs/client/views/characterList/characterList.js @@ -10,14 +10,9 @@ Template.characterList.helpers({ Template.characterList.events({ "tap .characterCard": function(event, instance){ - console.log(this); Router.go("characterSheet", {_id: this._id}); }, "tap .addCharacter": function (event, template) { Characters.insert({owner: Meteor.userId()}); }, - "tap #deleteChar": function(event, template){ - console.log("deleting", this); - Characters.remove(this._id); - } }); diff --git a/rpg-docs/client/views/layout/layout.html b/rpg-docs/client/views/layout/layout.html index a77e3cc6..c7a24fbd 100644 --- a/rpg-docs/client/views/layout/layout.html +++ b/rpg-docs/client/views/layout/layout.html @@ -3,9 +3,7 @@ {{> loginButtons}} - - Characters - + Characters +