mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 12:02:13 +00:00
add ability to restore lost streaks, also add int() view helper
function (pretty cool actually, https://groups.google.com/forum/?fromgroups#!topic/derbyjs/otFCLu2p7yY)
This commit is contained in:
parent
e21bc9869d
commit
ff2fedda48
2 changed files with 6 additions and 0 deletions
|
|
@ -70,6 +70,9 @@ viewHelpers = (view) ->
|
|||
view.fn "or", -> _.reduce arguments, (cumm, curr) -> cumm || curr
|
||||
view.fn "truarr", (num) -> num-1
|
||||
view.fn 'count', (arr) -> arr?.length or 0
|
||||
view.fn 'int',
|
||||
get: (num) -> num
|
||||
set: (num) -> [parseInt(num)]
|
||||
|
||||
view.fn "gems", (gp) -> return gp/0.25
|
||||
|
||||
|
|
|
|||
|
|
@ -285,6 +285,9 @@
|
|||
<button type="button" class="task-action-btn tile {#if equal(:task.priority,'!!')}active{/}" data-priority='!!' x-bind=click:tasksSetPriority>Medium</button>
|
||||
<button type="button" class="task-action-btn tile {#if equal(:task.priority,'!!!')}active{/}" data-priority='!!!' x-bind=click:tasksSetPriority>Hard</button>
|
||||
</div>
|
||||
|
||||
<legend class="option-title">Restore Streak</legend>
|
||||
<input class='option-content' type=number value={int(:task.streak)} />
|
||||
</fieldset>
|
||||
{/}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue