Added basic onboarding steps

This commit is contained in:
Stefan Zermatten
2017-09-27 16:19:00 +02:00
parent 44da62a962
commit f6b2dde479
29 changed files with 2036 additions and 16 deletions

View File

@@ -42,9 +42,20 @@
</template>
<template name="featureEdit">
{{#if showNewUserExperience}}
{{# infoBox}}
<p>
Features represent all the permanent things your character can do.
</p><p>
A feature can change a character's stats with effects,
or give the character proficiencies, attacks, and buffs.
</p><p>
Give the feature a name, and close it to continue.
</p>
{{/infoBox}}
{{/if}}
<!--name-->
<paper-input id="featureNameInput" class="fullwidth" label="Name" value={{name}}></paper-input>
<div class="layout horizontal center wrap justified">
<paper-dropdown-menu class=flex label="Enable Feature" style="flex-basis: 150px; max-width: 200px;">
<dicecloud-selector selected={{enabledSelection}} class="dropdown-content enabled-dropdown">

View File

@@ -47,6 +47,9 @@ Template.featureDetails.events({
});
Template.featureEdit.helpers({
showNewUserExperience: function(){
return Session.get("newUserExperienceStep") === 0;
},
usesSet: function(){
return _.isString(this.uses);
},

View File

@@ -102,7 +102,7 @@
</div>
{{#if canEditCharacter _id}}
<paper-fab id="addFeature"
class="floatyButton"
class="floatyButton {{#if shouldFloatyButtonBounce}}bounce{{/if}}"
icon="add">
<paper-tooltip position="left">Add Feature</paper-tooltip>
</paper-fab>

View File

@@ -59,6 +59,10 @@ Template.features.helpers({
hasCharacters: function(string){
return string && string.match(/\S/);
},
shouldFloatyButtonBounce: function(){
const step = Session.get("newUserExperienceStep");
return step === 0 && Features.find({charId: this._id}).count() <= 1;
},
});
Template.features.events({