Moved back to meteor's default loginbuttons until custom buttons are done
This commit is contained in:
@@ -6,17 +6,27 @@
|
|||||||
</div>
|
</div>
|
||||||
</core-toolbar>
|
</core-toolbar>
|
||||||
<div class="scroll-y" fit>
|
<div class="scroll-y" fit>
|
||||||
<div layout horizontal class="characterCards">
|
{{#if currentUser}}
|
||||||
{{# each characters}}
|
{{#if characters.count}}
|
||||||
{{#with characterDetails}}
|
<div layout horizontal class="characterCards">
|
||||||
{{#containerCardHelper this}}{{alignment}} {{gender}} {{race}}{{/containerCardHelper}}
|
{{# each characters}}
|
||||||
{{/with}}
|
{{#with characterDetails}}
|
||||||
{{/each}}
|
{{#containerCardHelper this}}{{alignment}} {{gender}} {{race}}{{/containerCardHelper}}
|
||||||
</div>
|
{{/with}}
|
||||||
{{> gridPadding class="characterCard" num=12}}
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
{{> gridPadding class="characterCard" num=12}}
|
||||||
|
{{else}}
|
||||||
|
<div layout vertical center center-justified>
|
||||||
|
<div>You don't seem to have any characters :(</div>
|
||||||
|
<paper-button class="addCharacter red-button" raised>Add Character</paper-button>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
{{else}}
|
||||||
|
You must sign in first.
|
||||||
|
{{/if}}
|
||||||
<div class="fab-buffer"></div>
|
<div class="fab-buffer"></div>
|
||||||
<paper-fab id="addCharacter"
|
<paper-fab class="floatyButton addCharacter"
|
||||||
class="floatyButton"
|
|
||||||
icon="add"
|
icon="add"
|
||||||
title="Add"
|
title="Add"
|
||||||
role="button"
|
role="button"
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
Template.characterList.helpers({
|
Template.characterList.helpers({
|
||||||
characterDetails: function(){
|
characterDetails: function(){
|
||||||
var char = Characters.findOne(this._id, {fields: {name: 1, gender: 1, alignment: 1, race:1, color: 1}})
|
var char = Characters.findOne(this._id, {fields: {name: 1, gender: 1, alignment: 1, race:1, color: 1}});
|
||||||
char.title = char.name;
|
char.title = char.name;
|
||||||
char.field = "base"
|
char.field = "base";
|
||||||
char.class = "characterCard"
|
char.class = "characterCard";
|
||||||
return char;
|
return char;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -13,7 +13,7 @@ Template.characterList.events({
|
|||||||
console.log(this);
|
console.log(this);
|
||||||
Router.go("characterSheet", {_id: this._id});
|
Router.go("characterSheet", {_id: this._id});
|
||||||
},
|
},
|
||||||
"tap #addCharacter": function (event, template) {
|
"tap .addCharacter": function (event, template) {
|
||||||
Characters.insert({owner: Meteor.userId()});
|
Characters.insert({owner: Meteor.userId()});
|
||||||
},
|
},
|
||||||
"tap #deleteChar": function(event, template){
|
"tap #deleteChar": function(event, template){
|
||||||
|
|||||||
@@ -2,41 +2,7 @@
|
|||||||
|
|
||||||
<core-drawer-panel>
|
<core-drawer-panel>
|
||||||
<core-header-panel drawer navigation flex mode="seamed" class="white">
|
<core-header-panel drawer navigation flex mode="seamed" class="white">
|
||||||
<div id="accountSummary" class="padded white-text">
|
{{> loginButtons}}
|
||||||
{{#if loggingIn}}
|
|
||||||
<paper-spinner active alt="Signing In"></paper-spinner>
|
|
||||||
{{else}}{{#if currentUser}}
|
|
||||||
{{#with currentUser}}
|
|
||||||
<div class="body2">
|
|
||||||
{{username}}
|
|
||||||
</div>
|
|
||||||
<div class="body1">
|
|
||||||
{{#each emails}}
|
|
||||||
{{address}}
|
|
||||||
{{/each}}
|
|
||||||
<paper-menu-button>
|
|
||||||
<paper-icon-button icon="arrow-drop-down" noink></paper-icon-button>
|
|
||||||
<paper-dropdown class="dropdown">
|
|
||||||
<core-menu class="menu">
|
|
||||||
<paper-item id="signOutButton">Sign Out</paper-item>
|
|
||||||
</core-menu>
|
|
||||||
</paper-dropdown>
|
|
||||||
</paper-menu-button>
|
|
||||||
</div>
|
|
||||||
{{/with}}
|
|
||||||
{{else}}
|
|
||||||
<h2>Sign In</h2>
|
|
||||||
<paper-input class="fullwidth" label="Email" id="emailInput"></paper-input><br>
|
|
||||||
<paper-input-decorator class="fullwidth" label="Password">
|
|
||||||
<input class="fullwidth" type="password" is="core-input" id="passwordInput">
|
|
||||||
</paper-input-decorator><br>
|
|
||||||
{{#if session "creatingNewUser"}}
|
|
||||||
<paper-button raised id="createAccountButton">Create Account</paper-button>
|
|
||||||
{{else}}
|
|
||||||
<paper-button raised id="signInButton">Sign In</paper-button>
|
|
||||||
{{/if}}
|
|
||||||
{{/if}}{{/if}}
|
|
||||||
</div>
|
|
||||||
<core-menu theme="core-light-theme">
|
<core-menu theme="core-light-theme">
|
||||||
<paper-item id="charactersMenuButton">Characters</paper-item>
|
<paper-item id="charactersMenuButton">Characters</paper-item>
|
||||||
</core-menu>
|
</core-menu>
|
||||||
|
|||||||
@@ -10,28 +10,9 @@ Template.layout.helpers({
|
|||||||
notSelected: function(){
|
notSelected: function(){
|
||||||
return Session.get("global.ui.detailShow")? "not-selected" : null;
|
return Session.get("global.ui.detailShow")? "not-selected" : null;
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
Template.layout.events({
|
Template.layout.events({
|
||||||
"tap #signInButton": function(event, instance){
|
|
||||||
var email = instance.find("#emailInput").value;
|
|
||||||
var pass = instance.find("#passwordInput").value;
|
|
||||||
Meteor.loginWithPassword(email, pass);
|
|
||||||
},
|
|
||||||
"keypress #emailInput, keypress #passwordInput": function (event, instance) {
|
|
||||||
if (event.which === 13) {
|
|
||||||
var email = instance.find("#emailInput").value;
|
|
||||||
var pass = instance.find("#passwordInput").value;
|
|
||||||
Meteor.loginWithPassword(email, pass);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tap #signOutButton": function(event, instance){
|
|
||||||
Meteor.logout();
|
|
||||||
},
|
|
||||||
"tap #createAccountButton": function(event, instance){
|
|
||||||
console.warn("not yet implemented");
|
|
||||||
//Session.set("creatingNewUser", true);
|
|
||||||
},
|
|
||||||
"tap #charactersMenuButton": function(event, instance){
|
"tap #charactersMenuButton": function(event, instance){
|
||||||
Router.go("/");
|
Router.go("/");
|
||||||
}
|
}
|
||||||
|
|||||||
58
rpg-docs/client/views/user/signIn/signIn.html
Normal file
58
rpg-docs/client/views/user/signIn/signIn.html
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
<template name="/signIn">
|
||||||
|
<div id="accountSummary" class="padded white-text">
|
||||||
|
{{#if loggingIn}}
|
||||||
|
<paper-spinner active alt="Signing In"></paper-spinner>
|
||||||
|
{{else}}{{#if currentUser}}
|
||||||
|
{{#with currentUser}}
|
||||||
|
<div class="body2">
|
||||||
|
{{username}}
|
||||||
|
</div>
|
||||||
|
<div class="body1">
|
||||||
|
{{#each emails}}
|
||||||
|
{{address}}
|
||||||
|
{{/each}}
|
||||||
|
<paper-menu-button>
|
||||||
|
<paper-icon-button icon="arrow-drop-down" noink></paper-icon-button>
|
||||||
|
<paper-dropdown class="dropdown">
|
||||||
|
<core-menu class="menu">
|
||||||
|
<paper-item id="signOutButton">Sign Out</paper-item>
|
||||||
|
</core-menu>
|
||||||
|
</paper-dropdown>
|
||||||
|
</paper-menu-button>
|
||||||
|
</div>
|
||||||
|
{{/with}}
|
||||||
|
{{else}}
|
||||||
|
{{#if session "creatingNewUser"}}
|
||||||
|
{{> creatingUser}}
|
||||||
|
{{else}} {{#if session "forgotPassword"}}
|
||||||
|
{{> forgotPassword}}
|
||||||
|
{{else}}
|
||||||
|
{{> signingIn}}
|
||||||
|
{{/if}}{{/if}}
|
||||||
|
{{/if}}{{/if}}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template name="signingIn">
|
||||||
|
<h2>Sign In</h2>
|
||||||
|
<paper-input class="fullwidth" label="Email" id="emailInput"></paper-input><br>
|
||||||
|
<paper-input-decorator class="fullwidth" label="Password">
|
||||||
|
<input class="fullwidth" type="password" is="core-input" id="passwordInput">
|
||||||
|
</paper-input-decorator><br>
|
||||||
|
<paper-button raised id="signInButton">Sign In</paper-button>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template name="creatingUser">
|
||||||
|
<h2>New Account</h2>
|
||||||
|
<paper-input class="fullwidth" label="Email" id="emailInput"></paper-input><br>
|
||||||
|
<paper-input-decorator class="fullwidth" label="Password">
|
||||||
|
<input class="fullwidth" type="password" is="core-input" id="passwordInput">
|
||||||
|
</paper-input-decorator><br>
|
||||||
|
<paper-button raised id="createAccountButton">Create Account</paper-button>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template name="forgotPasswod">
|
||||||
|
<h2>New Account</h2>
|
||||||
|
<paper-input class="fullwidth" label="Email" id="emailInput"></paper-input><br><br>
|
||||||
|
<paper-button raised id="recoverPasswordButton">Reset Password</paper-button>
|
||||||
|
</template>
|
||||||
21
rpg-docs/client/views/user/signIn/signIn.js
Normal file
21
rpg-docs/client/views/user/signIn/signIn.js
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
Template.signIn.events({
|
||||||
|
"tap #signInButton": function(event, instance){
|
||||||
|
var email = instance.find("#emailInput").value;
|
||||||
|
var pass = instance.find("#passwordInput").value;
|
||||||
|
Meteor.loginWithPassword(email, pass);
|
||||||
|
},
|
||||||
|
"keypress #emailInput, keypress #passwordInput": function (event, instance) {
|
||||||
|
if (event.which === 13) {
|
||||||
|
var email = instance.find("#emailInput").value;
|
||||||
|
var pass = instance.find("#passwordInput").value;
|
||||||
|
Meteor.loginWithPassword(email, pass);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tap #signOutButton": function(event, instance){
|
||||||
|
Meteor.logout();
|
||||||
|
},
|
||||||
|
"tap #createAccountButton": function(event, instance){
|
||||||
|
console.warn("not yet implemented");
|
||||||
|
//Session.set("creatingNewUser", true);
|
||||||
|
},
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user