mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 03:52:14 +00:00
Merge branch 'develop'
This commit is contained in:
commit
710e45cc84
22 changed files with 426 additions and 309 deletions
17
CHANGELOG.md
17
CHANGELOG.md
|
|
@ -1,17 +0,0 @@
|
|||
## 3/27/2013
|
||||
* Drop system + pets overhaul
|
||||
* http://www.kickstarter.com/projects/lefnire/habitrpg-mobile/posts/439433
|
||||
* https://trello.com/card/pets/50e5d3684fe3a7266b0036d6/166
|
||||
|
||||
## 3/21/2013
|
||||
* More design tweaks to header & avatars: https://github.com/lefnire/habitrpg/issues/585
|
||||
|
||||
## 3/20/2013
|
||||
* New Design: https://github.com/lefnire/habitrpg/issues/585
|
||||
* Toggle helm visible: https://trello.com/card/toggle-helm-visible/50e5d3684fe3a7266b0036d6/153
|
||||
* Toggle Header: https://trello.com/card/toggle-header/50e5d3684fe3a7266b0036d6/241
|
||||
* Deletable Accounts: https://trello.com/card/deletable-accounts/50e5d3684fe3a7266b0036d6/69
|
||||
* Undo Button: https://trello.com/card/undo-button/50e5d3684fe3a7266b0036d6/20
|
||||
|
||||
## 3/3/2013
|
||||
* Add custom day start: https://trello.com/card/custom-day-start/50e5d3684fe3a7266b0036d6/15
|
||||
BIN
public/img/npcs/alex.png
Normal file
BIN
public/img/npcs/alex.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
BIN
public/img/npcs/bailey-face.png
Normal file
BIN
public/img/npcs/bailey-face.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.1 KiB |
BIN
public/img/npcs/bailey.png
Normal file
BIN
public/img/npcs/bailey.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
BIN
public/img/npcs/daniel.png
Normal file
BIN
public/img/npcs/daniel.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
|
|
@ -53,9 +53,10 @@ setupSortable = (model) ->
|
|||
# or the item's id property
|
||||
model.at("_#{type}List").pass(ignore: domId).move {id}, to
|
||||
|
||||
setupTooltips = module.exports.setupTooltips = (model) ->
|
||||
setupTooltips = module.exports.setupTooltips = ->
|
||||
$('[rel=tooltip]').tooltip()
|
||||
$('[rel=popover]').popover()
|
||||
$('.popover-auto-show').popover('show')
|
||||
|
||||
$('.priority-multiplier-help').popover
|
||||
title: "How difficult is this task?"
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ viewHelpers = (view) ->
|
|||
classes += ' color-best'
|
||||
return classes
|
||||
|
||||
view.fn 'ownsPet', (pet, userPets) -> userPets?.indexOf(pet) != -1
|
||||
view.fn 'ownsPet', (pet, userPets) -> !!userPets && userPets.indexOf(pet) != -1
|
||||
|
||||
view.fn 'count', (arr) -> arr?.length or 0
|
||||
|
||||
|
|
|
|||
|
|
@ -19,9 +19,18 @@ module.exports.app = (appExports, model) ->
|
|||
sites.splice(i,1)
|
||||
user.set 'profile.websites', sites
|
||||
|
||||
|
||||
toggleGamePane = ->
|
||||
model.set '_gamePane', !model.get('_gamePane'), ->
|
||||
browser.setupTooltips()
|
||||
|
||||
appExports.profileChangeActive = (e, el) ->
|
||||
uid = $(el).attr('data-uid')
|
||||
model.ref '_profileActive', model.at("users.#{uid}")
|
||||
model.set '_profileActiveMain', user.get('id') is uid
|
||||
browser.setupTooltips(model)
|
||||
if uid is model.get('_userId') # clicked self
|
||||
toggleGamePane()
|
||||
else
|
||||
model.ref '_profileActive', model.at("users.#{uid}")
|
||||
$('#avatar-modal').modal('show')
|
||||
|
||||
appExports.toggleGamePane = -> toggleGamePane()
|
||||
|
||||
|
|
|
|||
|
|
@ -47,10 +47,8 @@ module.exports.app = (appExports, model) ->
|
|||
|
||||
user.on 'set', 'flags.partyEnabled', (after, before) ->
|
||||
return if user.get('party.current') or alreadyShown(before,after)
|
||||
$('.user-menu').popover('destroy') #remove previous popovers
|
||||
html = """
|
||||
<img src='/img/party-unlocked.png' style='float:right;padding:5px;' />
|
||||
Be social, join a party and play Habit with your friends! You'll be better at your habits with accountability partners. LFG anyone?
|
||||
Be social, join a party and play Habit with your friends! You'll be better at your habits with accountability partners. Click User -> Options -> Party, and follow the instructions. LFG anyone?
|
||||
"""
|
||||
showPopover '.user-menu', 'Party System', html, 'bottom'
|
||||
|
||||
|
|
|
|||
|
|
@ -83,4 +83,18 @@ borderDarken = 20%
|
|||
z-index: 3000
|
||||
position:absolute
|
||||
left:5px
|
||||
top:5px
|
||||
top:5px
|
||||
|
||||
// Bailey
|
||||
|
||||
.rewards-module
|
||||
z-index:2000
|
||||
|
||||
.hiding-bailey
|
||||
cursor: pointer
|
||||
position:absolute
|
||||
right: 50px
|
||||
top: 117px //FIXME this isn't a good method, but i suck at css - tyler
|
||||
|
||||
.new-stuff-word-bubble-container
|
||||
height: 90px
|
||||
20
styles/app/game-pane.styl
Normal file
20
styles/app/game-pane.styl
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
.full-width
|
||||
width: 100%
|
||||
|
||||
.border-right
|
||||
border-right: 1px solid #ddd
|
||||
|
||||
.game-tabs a
|
||||
cursor:pointer
|
||||
|
||||
.tab-notification
|
||||
color: #fff;
|
||||
background-color: #51a351
|
||||
|
||||
.tavern-pane
|
||||
position:relative
|
||||
height:500px
|
||||
|
||||
#market-tab
|
||||
position: relative
|
||||
height: 500px
|
||||
|
|
@ -59,7 +59,7 @@
|
|||
overflow: visible
|
||||
|
||||
.flyout .tile {
|
||||
min-width: 5em;
|
||||
min-width: 6.5em;
|
||||
}
|
||||
.stacked .tile {
|
||||
outline: 0
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@
|
|||
@import "./header.styl";
|
||||
@import "./scrollbars.styl";
|
||||
|
||||
@import "./game-pane.styl";
|
||||
|
||||
// fix exploding to very wide for some reason
|
||||
.datepicker
|
||||
width: 210px
|
||||
|
|
@ -145,3 +147,6 @@ hr
|
|||
top: 0;
|
||||
right: 0px;
|
||||
z-index: 1001;
|
||||
|
||||
.modal-body
|
||||
margin: 10px
|
||||
|
|
@ -1,11 +1,60 @@
|
|||
<newStuff:>
|
||||
{#if equal(_user.flags.newStuff,'show')}
|
||||
<div class='new-stuff'>
|
||||
<p class='alert alert-success'>
|
||||
<a href="https://github.com/lefnire/habitrpg/blob/develop/CHANGELOG.md" target="_blank">New Stuff!</a> <a x-bind="click:closeNewStuff"><i class='icon-remove'></i></a>
|
||||
</p>
|
||||
<modals:>
|
||||
<app:modals:modal modalId='new-stuff-modal' header="New Stuff">
|
||||
<p class='new-stuff-word-bubble-container'>
|
||||
<img src="/img/npcs/bailey.png" />
|
||||
|
||||
</div>
|
||||
<div class="popover fade right in" style="top: 0px; left: 100px; display: block;">
|
||||
<div class="arrow"></div>
|
||||
<h3 class="popover-title">Bailey</h3>
|
||||
<div class="popover-content"><a target="_blank" href="http://www.kickstarter.com/profile/mihakuu">Bailey</a> the Crier here! Announcing new stuff!</div>
|
||||
</div>
|
||||
</p>
|
||||
|
||||
<hr/>
|
||||
|
||||
<p>
|
||||
<h4>5/2/2013</h4>
|
||||
<ul>
|
||||
<li><a target="_blank" href="https://trello.com/card/rest-in-tavern/50e5d3684fe3a7266b0036d6/14">Rest in Tavern</a> (basic implementation, more to come)</li>
|
||||
<li>NPCs! <a target="_blank" href="http://www.kickstarter.com/profile/mihakuu">Bailey</a> the Town Crier, <a target="_blank" href="http://www.kickstarter.com/profile/523661924">Alexander</a> the <a target="_blank" href="https://trello.com/card/marketplace/50e5d3684fe3a7266b0036d6/167">Merchant</a>, <a target="_blank" href="http://www.kickstarter.com/profile/2014640723">Daniel</a> the <a target="_blank" href="http://goo.gl/FkSib">Tavern Keep</a></li>
|
||||
<li><a href="https://github.com/lefnire/habitrpg/issues/828">New "Game Options" layout</a> (click your avatar to see)</li>
|
||||
</ul>
|
||||
<h4>3/27/2013</h4>
|
||||
<ul>
|
||||
<li>Drop system + pets overhaul (<a href="http://www.kickstarter.com/projects/lefnire/habitrpg-mobile/posts/439433">Blog Post</a> | <a href="https://trello.com/card/pets/50e5d3684fe3a7266b0036d6/166">Trello Card</a>)</li>
|
||||
</ul>
|
||||
|
||||
<h4>3/21/2013</h4>
|
||||
<ul>
|
||||
<li><a href="https://github.com/lefnire/habitrpg/issues/585">More design tweaks to header & avatars</a></li>
|
||||
</ul>
|
||||
|
||||
<h4>3/20/2013</h4>
|
||||
<ul>
|
||||
<li><a href="https://github.com/lefnire/habitrpg/issues/585">New Design</a></li>
|
||||
<li><a href="https://trello.com/card/toggle-helm-visible/50e5d3684fe3a7266b0036d6/153">Toggle helm visible</a></li>
|
||||
<li><a href="https://trello.com/card/toggle-header/50e5d3684fe3a7266b0036d6/241">Toggle Header</a></li>
|
||||
<li><a href="https://trello.com/card/deletable-accounts/50e5d3684fe3a7266b0036d6/69">Deletable Accounts</a></li>
|
||||
<li><a href="https://trello.com/card/undo-button/50e5d3684fe3a7266b0036d6/20">Undo Button</a></li>
|
||||
</ul>
|
||||
|
||||
<h4>3/3/2013</h4>
|
||||
<ul>
|
||||
<li><a href="https://trello.com/card/custom-day-start/50e5d3684fe3a7266b0036d6/15">Add custom day start</a></li>
|
||||
</ul>
|
||||
|
||||
</p>
|
||||
<@footer>
|
||||
<button class="btn" data-dismiss="modal" aria-hidden="true" x-bind="click:closeNewStuff">Close</button>
|
||||
</@footer>
|
||||
</app:modals:modal>
|
||||
|
||||
<hiding-bailey:>
|
||||
{#if equal(_user.flags.newStuff,'show')}
|
||||
<img class='hiding-bailey' src="/img/npcs/bailey-face.png"
|
||||
rel=tooltip title=Psst data-placement=top
|
||||
data-toggle=modal data-target='#new-stuff-modal'
|
||||
/>
|
||||
{/}
|
||||
|
||||
<flash:>
|
||||
|
|
@ -13,4 +62,4 @@
|
|||
<ul class="unstyled alert alert-error">
|
||||
{#each _flash.error as :error}<li>{:error}</li>{/}
|
||||
</ul>
|
||||
{/}
|
||||
{/}
|
||||
|
|
|
|||
|
|
@ -1,46 +1,6 @@
|
|||
<modals:>
|
||||
<app:modals:modal modalId="avatar-modal">
|
||||
{#if _profileActiveMain}
|
||||
<span class='option-box pull-right wallet'>
|
||||
<app:rewards:userTokens />
|
||||
</span>
|
||||
|
||||
{#with _user.preferences}
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a data-toggle='tab' href="#profileCustomize">Avatar</a></li>
|
||||
<li><a data-toggle='tab' href="#profileEdit">Profile</a></li>
|
||||
{#if _user.flags.dropsEnabled}
|
||||
<li><a data-toggle='tab' data-target="#profileInventory">Inventory</a></li>
|
||||
<li><a data-toggle='tab' data-target="#profileMarket">Market</a></li>
|
||||
<li><a data-toggle='tab' data-target="#profileStable">Stable</a></li>
|
||||
{/if}
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="profileCustomize">
|
||||
<app:avatar:customize />
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="profileEdit">
|
||||
<app:avatar:profile user="{_user}" main="true" />
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="profileInventory">
|
||||
<app:avatar:inventory />
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="profileMarket">
|
||||
<app:avatar:market />
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="profileStable">
|
||||
<app:pets:stable />
|
||||
</div>
|
||||
</div>
|
||||
{/}
|
||||
{else}
|
||||
<app:avatar:profile profile={_profileActive} />
|
||||
{/}
|
||||
<app:avatar:profile profile={_profileActive} />
|
||||
<@footer>
|
||||
<button data-dismiss="modal" class="btn btn-success">Ok</button>
|
||||
</@footer>
|
||||
|
|
@ -52,7 +12,7 @@
|
|||
data-level="{@profile.stats.lvl}"
|
||||
data-checkpet="{#if @profile.items.pet}hasPet{/}"
|
||||
data-checkuser="{{#if equal(@profile.id, _user.id)}}isUser{{/}}"
|
||||
data-toggle='modal' data-target='#avatar-modal' data-uid="{{@profile.id}}" x-bind="click:profileChangeActive"
|
||||
data-uid="{{@profile.id}}" x-bind="click:profileChangeActive"
|
||||
rel="popover" data-placement="bottom" data-trigger="hover" data-html="true" data-content="
|
||||
<div>
|
||||
<div class='progress progress-danger' style='height:5px;'>
|
||||
|
|
@ -86,10 +46,6 @@
|
|||
</figure>
|
||||
|
||||
<customize:>
|
||||
<!-- user avatar preview -->
|
||||
<figure class="avatar-window">
|
||||
<app:avatar:avatar profile={_user} minimal="true" />
|
||||
</figure>
|
||||
|
||||
<!-- customization options -->
|
||||
{#with _user.preferences as :p}
|
||||
|
|
@ -140,91 +96,78 @@
|
|||
{/}
|
||||
{/}
|
||||
|
||||
<profile-edit:>
|
||||
<!--<a class='btn btn-success' x-bind="click:profileSave">Save</a>-->
|
||||
<!-- TODO use photo-upload instead: https://groups.google.com/forum/?fromgroups=#!topic/derbyjs/xMmADvxBOak -->
|
||||
<img class='pull-right' src="{_user.profile.imageUrl}" />
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="profileImageUrl">Photo Url</label>
|
||||
<div class="controls">
|
||||
<input type="url" id="profileImageUrl" value="{_user.profile.imageUrl}" placeholder="Image Url"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="profileFullName">Full Name</label>
|
||||
<div class="controls">
|
||||
<input type="text" id="profileFullName" placeholder="Full Name" value="{_user.profile.name}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="profileBlurb">Blurb</label>
|
||||
<div class="controls">
|
||||
<textarea id="profileBlurb" placeholder="Blurb" >{_user.profile.blurb}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="profileWebsite">Websites</label>
|
||||
<div class="controls">
|
||||
<form x-bind="submit:profileAddWebsite">
|
||||
<input type="url" id="profileWebsite" value="{_newProfileWebsite}" placeholder="Add Website"/>
|
||||
</form>
|
||||
</div>
|
||||
<ul>
|
||||
<!-- would prefer if there were and index in #each, instead using data-website to search with indexOf -->
|
||||
{#each _user.profile.websites as :website}
|
||||
<li>{:website} <a data-website="{:website}" x-bind="click:profileRemoveWebsite"><i class='icon-remove'></i></a></li>
|
||||
{/}
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<profile:>
|
||||
<div class='row-fluid'>
|
||||
<div class='span6 well'>
|
||||
{#if and(_profileEditing, _profileActiveMain)}
|
||||
<a class='btn btn-success' x-bind="click:profileSave">Save</a>
|
||||
<!-- TODO use photo-upload instead: https://groups.google.com/forum/?fromgroups=#!topic/derbyjs/xMmADvxBOak -->
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="profileImageUrl">Photo Url</label>
|
||||
<div class="controls">
|
||||
<input type="url" id="profileImageUrl" value="{_user.profile.imageUrl}" placeholder="Image Url"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="profileFullName">Full Name</label>
|
||||
<div class="controls">
|
||||
<input type="text" id="profileFullName" placeholder="Full Name" value="{_user.profile.name}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="profileBlurb">Blurb</label>
|
||||
<div class="controls">
|
||||
<textarea id="profileBlurb" placeholder="Blurb" >{_user.profile.blurb}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="profileWebsite">Websites</label>
|
||||
<div class="controls">
|
||||
<form x-bind="submit:profileAddWebsite">
|
||||
<input type="url" id="profileWebsite" value="{_newProfileWebsite}" placeholder="Add Website"/>
|
||||
</form>
|
||||
</div>
|
||||
<ul>
|
||||
<!-- would prefer if there were and index in #each, instead using data-website to search with indexOf -->
|
||||
{#each _user.profile.websites as :website}
|
||||
<li>{:website} <a data-website="{:website}" x-bind="click:profileRemoveWebsite"><i class='icon-remove'></i></a></li>
|
||||
{/}
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<a class='btn btn-success' x-bind="click:profileSave">Save</a>
|
||||
{else}
|
||||
<h3>
|
||||
{#if _profileActive.profile.name}
|
||||
{_profileActive.profile.name}
|
||||
{else}
|
||||
{username(_profileActive.auth, _profileActive.profile.name)}
|
||||
<div class='span6'>
|
||||
<h3>
|
||||
{#if _profileActive.profile.name}
|
||||
{_profileActive.profile.name}
|
||||
{else}
|
||||
{username(_profileActive.auth, _profileActive.profile.name)}
|
||||
{/}
|
||||
{#if _profileActiveMain}<a class='btn pull-right' x-bind="click:profileEdit">Edit</a>{/}
|
||||
</h3>
|
||||
{#if _profileActive.profile.imageUrl}
|
||||
<img src="{_profileActive.profile.imageUrl}" />
|
||||
{/}
|
||||
{#if _profileActive.profile.blurb}
|
||||
<p>{_profileActive.profile.blurb}</p>
|
||||
{/}
|
||||
{#if _profileActive.profile.websites}
|
||||
<ul>
|
||||
{#each _profileActive.profile.websites as :website}
|
||||
<li>{:website}</li>
|
||||
{/}
|
||||
{#if _profileActiveMain}<a class='btn pull-right' x-bind="click:profileEdit">Edit</a>{/}
|
||||
</h3>
|
||||
{#if _profileActive.profile.imageUrl}
|
||||
<img src="{@user.profile.imageUrl}" />
|
||||
{/}
|
||||
{#if _profileActive.profile.blurb}
|
||||
<p>{_profileActive.profile.blurb}</p>
|
||||
{/}
|
||||
{#if _profileActive.profile.websites}
|
||||
<ul>
|
||||
{#each _profileActive.profile.websites as :website}
|
||||
<li>{:website}</li>
|
||||
{/}
|
||||
</ul>
|
||||
{/}
|
||||
</ul>
|
||||
{/}
|
||||
</div>
|
||||
|
||||
<div class='span6'>
|
||||
<h3>Achievements</h3>
|
||||
<app:avatar:achievements />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<rest:>
|
||||
<form>
|
||||
<fieldset>
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" name="rest" checked={_user.flags.rest} >Temporarily freeze account
|
||||
</label>
|
||||
<small>Useful if you're going on vacation for or get sick.</small>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<achievements:>
|
||||
<!--TODO replce this in the future with HTML from BrowserQuest's index.html, which properly handles the achievements
|
||||
sprite-sheets (see BQ's achievements.css, main.css) -->
|
||||
|
|
@ -234,54 +177,3 @@
|
|||
<!-- we'll have other inventory here later too, like enchantments, quest scrolls, etc -->
|
||||
<app:pets:inventory/>
|
||||
|
||||
<market:>
|
||||
|
||||
<!-- pets pane -->
|
||||
<div class="tab-pane pet-grid" id="market-tab">
|
||||
|
||||
<h4>Welcome to the market!</h4>
|
||||
<small>Dying to get that particular pet you're after, but don't want to wait for it to drop? Buy it here!</small>
|
||||
<h4>Eggs</h4>
|
||||
{#with _items.pets as :egg}
|
||||
<table>
|
||||
<tr>
|
||||
{#with :egg[0]}<app:pets:egg />{/}
|
||||
{#with :egg[1]}<app:pets:egg />{/}
|
||||
{#with :egg[2]}<app:pets:egg />{/}
|
||||
{#with :egg[3]}<app:pets:egg />{/}
|
||||
</tr>
|
||||
<tr>
|
||||
{#with :egg[4]}<app:pets:egg />{/}
|
||||
{#with :egg[5]}<app:pets:egg />{/}
|
||||
{#with :egg[6]}<app:pets:egg />{/}
|
||||
{#with :egg[7]}<app:pets:egg />{/}
|
||||
</tr>
|
||||
<tr>
|
||||
{#with :egg[8]}<app:pets:egg />{/}
|
||||
</tr>
|
||||
</table>
|
||||
{/}
|
||||
<h4>Hatching Potions</h4>
|
||||
{#with _items.hatchingPotions as :hatchingPotion}
|
||||
<table>
|
||||
<tr>
|
||||
{#with :hatchingPotion[0]}<app:pets:hatchingPotion />{/}
|
||||
{#with :hatchingPotion[1]}<app:pets:hatchingPotion />{/}
|
||||
{#with :hatchingPotion[2]}<app:pets:hatchingPotion />{/}
|
||||
{#with :hatchingPotion[3]}<app:pets:hatchingPotion />{/}
|
||||
</tr>
|
||||
<tr>
|
||||
{#with :hatchingPotion[4]}<app:pets:hatchingPotion />{/}
|
||||
{#with :hatchingPotion[5]}<app:pets:hatchingPotion />{/}
|
||||
{#with :hatchingPotion[6]}<app:pets:hatchingPotion />{/}
|
||||
{#with :hatchingPotion[7]}<app:pets:hatchingPotion />{/}
|
||||
</tr>
|
||||
<tr>
|
||||
{#with :hatchingPotion[8]}<app:pets:hatchingPotion />{/}
|
||||
{#with :hatchingPotion[9]}<app:pets:hatchingPotion />{/}
|
||||
</tr>
|
||||
</table>
|
||||
{/}
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
|||
149
views/app/game-pane.html
Normal file
149
views/app/game-pane.html
Normal file
|
|
@ -0,0 +1,149 @@
|
|||
<main:>
|
||||
<div class="module full-width">
|
||||
|
||||
<span class='option-box pull-right wallet'>
|
||||
<app:rewards:userTokens />
|
||||
</span>
|
||||
|
||||
<ul class="nav nav-tabs game-tabs">
|
||||
<li class="active"><a data-toggle='tab' data-target="#profileCustomize"><i class='icon-user'></i> Profile</a></li>
|
||||
<li class='{#if _user.party.invitation}tab-notification{/}'>
|
||||
<a data-toggle='tab' data-target="#profileParty"><i class='icon-heart'></i> Party</a>
|
||||
</li>
|
||||
{#if _user.flags.dropsEnabled}
|
||||
<li><a data-toggle='tab' data-target="#profileInventory"><i class='icon-gift'></i> Inventory</a></li>
|
||||
<li><a data-toggle='tab' data-target="#profileStable"><i class='icon-leaf'></i> Stable</a></li>
|
||||
{/if}
|
||||
<li><a data-toggle='tab' data-target="#profileTavern"><i class='icon-glass'></i> Tavern</a></li>
|
||||
<li><a data-toggle='tab' data-target="#profileAchievements"><i class='icon-certificate'></i> Achievements</a></li>
|
||||
{{#if _loggedIn}}
|
||||
<li><a data-toggle='tab' data-target="#profileSettings"><i class='icon-wrench'></i> Settings</a></li>
|
||||
{{/}}
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
|
||||
<div class="tab-pane active" id="profileCustomize">
|
||||
<div class='row-fluid'>
|
||||
<div class='span6 border-right'>
|
||||
<app:avatar:customize />
|
||||
</div>
|
||||
<div class='span6'>
|
||||
<app:avatar:profile-edit />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="profileParty">
|
||||
<app:party:party />
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="profileAchievements">
|
||||
<app:avatar:achievements />
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="profileInventory">
|
||||
<div class='row-fluid'>
|
||||
<div class='span6 border-right'>
|
||||
<h2>Inventory</h2>
|
||||
<app:avatar:inventory />
|
||||
</div>
|
||||
<div class='span6'>
|
||||
<h2>Market</h2>
|
||||
<app:game-pane:market />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="profileStable">
|
||||
<app:pets:stable />
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="profileTavern">
|
||||
<app:game-pane:tavern />
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="profileSettings">
|
||||
{{#if _loggedIn}}
|
||||
<app:settings:settings-pane />
|
||||
{{/}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<tavern:>
|
||||
<div class='row-fluid tavern-pane'>
|
||||
<div class='span6'>
|
||||
<img src='/img/npcs/daniel.png' />
|
||||
<div class="popover fade right in" style="top: 0px; left: 135px; display: block;">
|
||||
<div class="arrow"></div>
|
||||
<h3 class="popover-title">Daniel Johansson</h3>
|
||||
<div class="popover-content">Welcome to the Tavern! I'm the bar keep, <a target="_blank" href="http://www.kickstarter.com/profile/2014640723">Daniel</a>. If you would like to rest a while (going on vacation?), I can set you up at the inn for 10gp. While you're resting, your dailies won't hurt you. The minimum stay is 24h, but you can check out whenever you want. In the future, you may find other adventurers here, looking meet and mingle (LFG anyone?)</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='span6'>
|
||||
<form>
|
||||
<fieldset>
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" name="rest" checked={_user.flags.rest} >Rest in the inn
|
||||
</label>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<market:>
|
||||
|
||||
<!-- pets pane -->
|
||||
<div class="tab-pane pet-grid" id="market-tab">
|
||||
<img src='/img/npcs/alex.png' />
|
||||
<div class="popover fade right in" style="top: 0px; left: 170px; display: block;">
|
||||
<div class="arrow"></div>
|
||||
<h3 class="popover-title">Alexander Augustin</h3>
|
||||
<div class="popover-content">Welcome to the Market! I'm the merchant, <a target="_blank" href="http://www.kickstarter.com/profile/523661924">Alexander</a>. Dying to get that particular pet you're after, but don't want to wait for it to drop? Buy it here!</div>
|
||||
</div>
|
||||
|
||||
<h4>Eggs</h4>
|
||||
{#with _items.pets as :egg}
|
||||
<table>
|
||||
<tr>
|
||||
{#with :egg[0]}<app:pets:egg />{/}
|
||||
{#with :egg[1]}<app:pets:egg />{/}
|
||||
{#with :egg[2]}<app:pets:egg />{/}
|
||||
{#with :egg[3]}<app:pets:egg />{/}
|
||||
</tr>
|
||||
<tr>
|
||||
{#with :egg[4]}<app:pets:egg />{/}
|
||||
{#with :egg[5]}<app:pets:egg />{/}
|
||||
{#with :egg[6]}<app:pets:egg />{/}
|
||||
{#with :egg[7]}<app:pets:egg />{/}
|
||||
</tr>
|
||||
<tr>
|
||||
{#with :egg[8]}<app:pets:egg />{/}
|
||||
</tr>
|
||||
</table>
|
||||
{/}
|
||||
<h4>Hatching Potions</h4>
|
||||
{#with _items.hatchingPotions as :hatchingPotion}
|
||||
<table>
|
||||
<tr>
|
||||
{#with :hatchingPotion[0]}<app:pets:hatchingPotion />{/}
|
||||
{#with :hatchingPotion[1]}<app:pets:hatchingPotion />{/}
|
||||
{#with :hatchingPotion[2]}<app:pets:hatchingPotion />{/}
|
||||
{#with :hatchingPotion[3]}<app:pets:hatchingPotion />{/}
|
||||
</tr>
|
||||
<tr>
|
||||
{#with :hatchingPotion[4]}<app:pets:hatchingPotion />{/}
|
||||
{#with :hatchingPotion[5]}<app:pets:hatchingPotion />{/}
|
||||
{#with :hatchingPotion[6]}<app:pets:hatchingPotion />{/}
|
||||
{#with :hatchingPotion[7]}<app:pets:hatchingPotion />{/}
|
||||
</tr>
|
||||
<tr>
|
||||
{#with :hatchingPotion[8]}<app:pets:hatchingPotion />{/}
|
||||
{#with :hatchingPotion[9]}<app:pets:hatchingPotion />{/}
|
||||
</tr>
|
||||
</table>
|
||||
{/}
|
||||
</div>
|
||||
|
|
@ -8,6 +8,7 @@
|
|||
<import: src="settings">
|
||||
<import: src="party">
|
||||
<import: src="pets">
|
||||
<import: src="game-pane">
|
||||
|
||||
<Title:>
|
||||
HabitRPG | Gamify Your Life
|
||||
|
|
@ -22,13 +23,13 @@
|
|||
<Header:>
|
||||
<app:modals:modals />
|
||||
<ui:connectionAlert>
|
||||
<app:alerts:newStuff />
|
||||
<div class="header-wrap">
|
||||
|
||||
{#if _undo}<a x-bind="click:undo" class='label undo-button'>Undo</a>{/}
|
||||
|
||||
<app:settings:menu />
|
||||
<app:header:header />
|
||||
<app:alerts:hiding-bailey />
|
||||
</div>
|
||||
|
||||
<Body:>
|
||||
|
|
@ -36,9 +37,14 @@
|
|||
<div id="notification-area"></div>
|
||||
<div id="wrap">
|
||||
<app:alerts:flash />
|
||||
<div id="exp-chart" style="display:none;"></div>
|
||||
<div id="exp-chart" style="display:none;"></div>
|
||||
|
||||
<div id=main class="grid">
|
||||
<app:tasks:taskLists />
|
||||
{#if _gamePane}
|
||||
<app:game-pane:main />
|
||||
{else}
|
||||
<app:tasks:taskLists />
|
||||
{/}
|
||||
</div>
|
||||
</div>
|
||||
<app:footer:footer />
|
||||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
<app:avatar:modals />
|
||||
<app:settings:modals />
|
||||
<app:party:modals />
|
||||
<app:pets:modals />
|
||||
<app:alerts:modals />
|
||||
|
||||
<!-- Game Over Modal -->
|
||||
<div style="{#unless equal(_user.stats.lvl,0)}display:none;{/}">
|
||||
|
|
|
|||
|
|
@ -1,46 +1,41 @@
|
|||
<modals:>
|
||||
<app:modals:modal modalId="party-modal">
|
||||
{#if _user.party.current}
|
||||
<h2>{{_party.name}}</h2>
|
||||
<table class="table table-striped">
|
||||
{{#each _partyMembers as :member}}
|
||||
<tr><td>{{username(:member.auth, :member.profile.name)}}</td><td>({{:member.id}})</td></tr>
|
||||
{{/}}
|
||||
</table>
|
||||
<form class=form-inline x-bind="submit: partyInvite">
|
||||
{#if _partyError}
|
||||
<div class='alert alert-danger'>{_partyError}</div>
|
||||
{/}
|
||||
<div class='control-group'>
|
||||
<input type="text" class="input-medium" placeholder="User Id" value="{_newPartyMember}">
|
||||
<input type="submit" class="btn" value="Invite" />
|
||||
</div>
|
||||
</form>
|
||||
<a class='btn btn-danger' x-bind="click: partyLeave">Leave</a>
|
||||
|
||||
{else if _user.party.invitation}
|
||||
<!-- TODO show by whom -->
|
||||
<h2>You're Invited To {_party.name}</h2>
|
||||
<a class='btn btn-success' x-bind="click: partyAccept">Accept</a>
|
||||
<a class='btn btn-danger' x-bind="click: partyReject">Reject</a>
|
||||
|
||||
{else}
|
||||
<h2>Create A Party</h2>
|
||||
<!-- Not in a party , no invites - create a new one -->
|
||||
<p>You are not in a party. You can either create one and invite friends, or if you want to join an existing party, have them enter:</p>
|
||||
<pre class=prettyprint>{_user.id}</pre>
|
||||
<form class=form-inline x-bind="submit: partyCreate">
|
||||
{#if _partyError}
|
||||
<div class='alert alert-danger'>{_partyError}</div>
|
||||
{/}
|
||||
<div class=control-group>
|
||||
<input type="text" class="input-medium" placeholder="Party Name" value="{_newParty}" />
|
||||
<input type="submit" class="btn" value="Create" />
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<party:>
|
||||
{#if _user.party.current}
|
||||
<h2>{{_party.name}}</h2>
|
||||
<table class="table table-striped">
|
||||
{{#each _partyMembers as :member}}
|
||||
<tr><td>{{username(:member.auth, :member.profile.name)}}</td><td>({{:member.id}})</td></tr>
|
||||
{{/}}
|
||||
</table>
|
||||
<form class=form-inline x-bind="submit: partyInvite">
|
||||
{#if _partyError}
|
||||
<div class='alert alert-danger'>{_partyError}</div>
|
||||
{/}
|
||||
<@footer>
|
||||
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
|
||||
</@footer>
|
||||
</app:modals:modal>
|
||||
<div class='control-group'>
|
||||
<input type="text" class="input-medium" placeholder="User Id" value="{_newPartyMember}">
|
||||
<input type="submit" class="btn" value="Invite" />
|
||||
</div>
|
||||
</form>
|
||||
<a class='btn btn-danger' x-bind="click: partyLeave">Leave</a>
|
||||
|
||||
{else if _user.party.invitation}
|
||||
<!-- TODO show by whom -->
|
||||
<h2>You're Invited To {_party.name}</h2>
|
||||
<a class='btn btn-success' x-bind="click: partyAccept">Accept</a>
|
||||
<a class='btn btn-danger' x-bind="click: partyReject">Reject</a>
|
||||
|
||||
{else}
|
||||
<h2>Create A Party</h2>
|
||||
<!-- Not in a party , no invites - create a new one -->
|
||||
<p>You are not in a party. You can either create one and invite friends, or if you want to join an existing party, have them enter:</p>
|
||||
<pre class=prettyprint>{_user.id}</pre>
|
||||
<form class=form-inline x-bind="submit: partyCreate">
|
||||
{#if _partyError}
|
||||
<div class='alert alert-danger'>{_partyError}</div>
|
||||
{/}
|
||||
<div class=control-group>
|
||||
<input type="text" class="input-medium" placeholder="Party Name" value="{_newParty}" />
|
||||
<input type="submit" class="btn" value="Create" />
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{/}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
<inventory:>
|
||||
<div class='row-fluid'>
|
||||
<div class='span6 well'>
|
||||
<div class='{#if _hatchEgg}span6{/}'>
|
||||
<menu type="list" class="inventory-list">
|
||||
<li class="customize-menu">
|
||||
<menu label="Eggs" class='pets-menu'>
|
||||
|
|
@ -66,7 +66,7 @@
|
|||
</menu>
|
||||
</div>
|
||||
{#if _hatchEgg}
|
||||
<div class='span6 well'>
|
||||
<div class='span6'>
|
||||
<h3>Hatch Your Egg</h3>
|
||||
{#if not(_user.items.hatchingPotions)}
|
||||
<p>You don't have any hatching potions yet.</p>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<rewardsColumn:>
|
||||
<div class="module">
|
||||
<div class="module rewards-module">
|
||||
<div class="task-column rewards">
|
||||
<!-- cash or tokens -->
|
||||
<span class='option-box pull-right wallet'>
|
||||
|
|
|
|||
|
|
@ -1,55 +1,48 @@
|
|||
<modals:>
|
||||
{{#if _loggedIn}}
|
||||
<app:modals:modal modalId="settings-modal" header="Settings">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a data-toggle="tab" href="#" data-target="#settings-settings">General</a></li>
|
||||
<li><a data-toggle="tab" href="#" data-target="#settings-api">API</a></li>
|
||||
</ul>
|
||||
<settings-pane:>
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a data-toggle="tab" href="#" data-target="#settings-settings">General</a></li>
|
||||
<li><a data-toggle="tab" href="#" data-target="#settings-api">API</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active personal-options" id="settings-settings">
|
||||
<h4>Custom Day Start</h4>
|
||||
<div class="option-group option-short">
|
||||
<input class="option-content option-time" type="number" min=0 max=24 value={_user.preferences.dayStart}>
|
||||
<span class="input-suffix">:00 (24h clock)</span>
|
||||
</div>
|
||||
<div>
|
||||
<small>Habit defaults to check and reset your dailies at midnight each day. You can customize that here (Enter number between 0 and 24).</small>
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
<h4>Misc</h4>
|
||||
<button x-bind="click:toggleHeader" class="btn">{#if _user.preferences.hideHeader}Show Header{else}Hide Header{/}</button>
|
||||
<br/><br/>
|
||||
<app:avatar:rest />
|
||||
|
||||
{{#if _user.auth.local}}
|
||||
<hr/>
|
||||
<h4>Change Password</h4>
|
||||
<derby-auth:changePassword />
|
||||
{{/}}
|
||||
|
||||
<hr/>
|
||||
<h4>Danger Zone</h4>
|
||||
<a class='btn btn-danger' data-target="#reset-modal" data-toggle="modal" rel=tooltip title="Resets your entire account (dangerous).">Reset</a>
|
||||
<a class='btn btn-danger' data-target="#restore-modal" data-toggle="modal" rel=tooltip title="Restores attributes to your character.">Restore</a>
|
||||
<a class='btn btn-danger' data-target="#delete-modal" data-toggle="modal" rel=tooltip title="Delete your account.">Delete</a>
|
||||
</div>
|
||||
<div class="tab-pane" id="settings-api">
|
||||
<small>Copy these for use in third party applications.</small>
|
||||
<h6>User ID</h6>
|
||||
<pre class=prettyprint>{_user.id}</pre>
|
||||
|
||||
<h6>API Token</h6>
|
||||
<pre class=prettyprint>{_user.apiToken}</pre>
|
||||
</div>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active personal-options" id="settings-settings">
|
||||
<h4>Custom Day Start</h4>
|
||||
<div class="option-group option-short">
|
||||
<input class="option-content option-time" type="number" min=0 max=24 value={_user.preferences.dayStart}>
|
||||
<span class="input-suffix">:00 (24h clock)</span>
|
||||
</div>
|
||||
<div>
|
||||
<small>Habit defaults to check and reset your dailies at midnight each day. You can customize that here (Enter number between 0 and 24).</small>
|
||||
</div>
|
||||
|
||||
<@footer>
|
||||
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
|
||||
</@footer>
|
||||
</app:modals:modal>
|
||||
<hr/>
|
||||
<h4>Misc</h4>
|
||||
<button x-bind="click:toggleHeader" class="btn">{#if _user.preferences.hideHeader}Show Header{else}Hide Header{/}</button>
|
||||
|
||||
{{#if _user.auth.local}}
|
||||
<hr/>
|
||||
<h4>Change Password</h4>
|
||||
<derby-auth:changePassword />
|
||||
{{/}}
|
||||
|
||||
<hr/>
|
||||
<h4>Danger Zone</h4>
|
||||
<a class='btn btn-danger' data-target="#reset-modal" data-toggle="modal" rel=tooltip title="Resets your entire account (dangerous).">Reset</a>
|
||||
<a class='btn btn-danger' data-target="#restore-modal" data-toggle="modal" rel=tooltip title="Restores attributes to your character.">Restore</a>
|
||||
<a class='btn btn-danger' data-target="#delete-modal" data-toggle="modal" rel=tooltip title="Delete your account.">Delete</a>
|
||||
</div>
|
||||
<div class="tab-pane" id="settings-api">
|
||||
<small>Copy these for use in third party applications.</small>
|
||||
<h6>User ID</h6>
|
||||
<pre class=prettyprint>{_user.id}</pre>
|
||||
|
||||
<h6>API Token</h6>
|
||||
<pre class=prettyprint>{_user.apiToken}</pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<modals:>
|
||||
{{#if _loggedIn}}
|
||||
<app:modals:modal modalId="reset-modal" header="Reset">
|
||||
<p>This resets your entire account - your tasks will be deleted and your character will start over.</p>
|
||||
<p>This is highly discouraged because you'll lose historical data, which is useful for graphing your progress over time. However, some people find it useful in the beginning after playing with the app for a while.</p>
|
||||
|
|
@ -137,14 +130,17 @@
|
|||
<menu:>
|
||||
<div class="user-menu">
|
||||
{{#unless _loggedIn}}
|
||||
<button class="task-action-btn tile solid" href="#" data-target="#login-modal" data-toggle="modal">Login / Register</button>
|
||||
<button class="task-action-btn tile solid" style='cursor:pointer' data-target="#login-modal" data-toggle="modal">Login / Register</button>
|
||||
{{else}}
|
||||
<ul class="nav site-nav">
|
||||
<li class="flyout">
|
||||
<h1 class="task-action-btn tile solid user-reporter">{#if _user.party.invitation}<i class='icon-bell'></i> {/}{{username(_user.auth, _user.profile.name)}}</h1>
|
||||
<ul class="flyout-content nav stacked">
|
||||
<li><a class="task-action-btn tile solid" data-target="#settings-modal" data-toggle="modal">Settings</a></li>
|
||||
<li><a class="task-action-btn tile solid" data-target="#party-modal" data-toggle="modal">{#if _user.party.invitation}<i class='icon-bell'></i> {/}Party</a></li>
|
||||
<li>
|
||||
<a class="task-action-btn tile solid" x-bind='click:toggleGamePane'>
|
||||
{#if _gamePane}Tasks{else}{#if _user.party.invitation}<i class='icon-bell'></i> {/}Options{/}
|
||||
</a>
|
||||
</li>
|
||||
<li><a class="task-action-btn tile solid" href="/logout">Logout</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
|||
Loading…
Reference in a new issue