habitica/views/app/rewards.html

74 lines
3.4 KiB
HTML
Raw Normal View History

<rewardsColumn:>
<div class="module rewards-module">
<div class="task-column rewards">
<!-- cash or tokens -->
<span class='option-box pull-right wallet'>
<div class="money">
{gold(floor(_user.stats.gp))}
<span class='shop_gold' rel='tooltip' title='Gold'></span>
</div>
<div class="money">
{silver(_user.stats.gp)}
<span class='shop_silver' rel='tooltip' title='Silver'></span>
</div>
</span>
<h2 class="task-column_title">Rewards</h2>
<!-- add new reward -->
<app:tasks:newTask type="reward" inputValue="{_newReward}" placeHolder="New Reward" />
<!-- Custom Rewards -->
<ul class='rewards' style="{#unless _rewardList}display:none{/}">
{#each _rewardList as :task}<app:tasks:task />{/}
</ul>
<!-- Static Rewards -->
<ul class='items' style="{#unless _user.flags.itemsEnabled}display:none{/}">
{#with _items.weapon as :item}<app:rewards:item />{/}
{#with _items.armor as :item}<app:rewards:item />{/}
{#with _items.head as :item}<app:rewards:item />{/}
{#with _items.shield as :item}<app:rewards:item />{/}
{#with _items.potion as :item}<app:rewards:item />{/}
{#with _items.reroll as :item}<app:rewards:item reroll=true />{/}
</ul>
<app:tasks:ads>
<a href="http://www.amazon.com/gp/product/1594484805/ref=as_li_tf_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1594484805&linkCode=as2&tag=ha0d2-20">Drive: The Surprising Truth About What Motivates Us</a><img src="//www.assoc-amazon.com/e/ir?t=ha0d2-20&l=as2&o=1&a=1594484805" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />
</app:tasks:ads>
</div>
</div>
2013-02-17 05:25:42 +00:00
<userTokens:>
<a class="pull-right token-wallet" rel='popover' data-trigger='hover' data-title='Tokens' data-content="Used for buying special items (reroll, eggs, hatching potions, etc). You'll need to unlock those features before being able to use tokens." data-placement='bottom'>
<span class="task-action-btn tile flush bright add-token-btn" x-bind="click:showStripe"></span>
<span class="task-action-btn tile flush neutral">{tokens(_user.balance)} Tokens</span>
</a>
2013-02-17 05:25:42 +00:00
<item:>
<li class="task reward-item {#if :item.hide}hide{/}">
<!-- right-hand side control buttons -->
<div class="task-meta-controls">
<span rel="popover" data-trigger="hover" data-placement="left" data-content="{:item.notes}" data-original-title="{:item.text}" class='task-notes'><i class="icon-comment"></i></span>
</div>
2013-02-17 05:25:42 +00:00
<!-- left-hand size commands -->
<div class="task-controls">
{#if @reroll}
<a class="task-action-btn btn-reroll" data-toggle="modal" data-target="#reroll-modal"></a>
{else}
<a class="money btn-buy item-btn" x-bind=click:buyItem data-type={:item.type} data-value={:item.value} data-index={:item.index}>
<span class="reward-cost">{:item.value}</span>
<span class='shop_gold'></span>
</a>
{/}
</div>
<!-- main content -->
<span class="shop_{:item.classes} shop-sprite item-img"></span>
<p class="task-text">{:item.text}</p>
</li>