mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-01 23:40:25 +00:00
overhaul tasks.html so we can start generalizing task-lists,
ground-work for challenges
This commit is contained in:
parent
f7145bb951
commit
4347ba52ba
4 changed files with 49 additions and 74 deletions
|
|
@ -55,7 +55,7 @@
|
|||
"Delete": "Delete",
|
||||
"Progress": "Progress",
|
||||
"Score": "Score",
|
||||
"Daily": "Dailys",
|
||||
"Dailies": "Dailies",
|
||||
"NewDaily": "New Daily",
|
||||
"Repeat": "Repeat",
|
||||
"Su": "Su",
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
<div id="exp-chart" style="display:none;"></div>
|
||||
|
||||
<div id=main class="grid">
|
||||
<div class='{#if _gamePane}hidden{/}'><app:tasks:taskLists /></div>
|
||||
<div class='{#if _gamePane}hidden{/}'><app:tasks:task-lists /></div>
|
||||
<div class='{#unless _gamePane}hidden{/}'><app:game-pane:main /></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
</app:modals:modal>
|
||||
|
||||
|
||||
<rewardsColumn:>
|
||||
<rewards-column:>
|
||||
<div class="module rewards-module">
|
||||
<div class="task-column rewards">
|
||||
<!-- cash or gems -->
|
||||
|
|
@ -24,29 +24,20 @@
|
|||
</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{/}">
|
||||
<app:rewards:item item={_items.next.weapon} />
|
||||
<app:rewards:item item={_items.next.armor} />
|
||||
<app:rewards:item item={_items.next.head} />
|
||||
<app:rewards:item item={_items.next.shield} />
|
||||
<app:rewards:item item={_items.potion} />
|
||||
<app:rewards:item item={_items.reroll} />
|
||||
</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>
|
||||
<app:tasks:task-list header="Rewards" type="reward" inputValue="{_newReward}" placeHolder="New Reward" list={_rewardList} >
|
||||
<@extra>
|
||||
<!-- Static Rewards -->
|
||||
<ul class='items {#unless _user.flags.itemsEnabled}hidden{/}'>
|
||||
<app:rewards:item item={_items.next.weapon} />
|
||||
<app:rewards:item item={_items.next.armor} />
|
||||
<app:rewards:item item={_items.next.head} />
|
||||
<app:rewards:item item={_items.next.shield} />
|
||||
<app:rewards:item item={_items.potion} />
|
||||
<app:rewards:item item={_items.reroll} />
|
||||
</ul>
|
||||
</@extra>
|
||||
<@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;" /></@ads>
|
||||
</app:tasks:task-list>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -8,47 +8,24 @@
|
|||
</@footer>
|
||||
</app:modals:modal>
|
||||
|
||||
<ads: nonvoid>
|
||||
{{#if and( _loggedIn, notEqual(_user.flags.ads,'hide') )}}
|
||||
<span class='pull-right'>
|
||||
<a x-bind="click:showStripe" rel='tooltip' title='Remove Ads'><i class='icon-remove'></i></a><br/>
|
||||
<a href="#" data-target="#why-ads-modal" data-toggle="modal" rel='tooltip' title='Why Ads?'><i class='icon-question-sign'></i></a>
|
||||
</span>
|
||||
|
||||
{{@content}}
|
||||
{{/}}
|
||||
|
||||
<taskLists:>
|
||||
<task-lists:>
|
||||
<!--helpTitle & helpContent moved to tour -->
|
||||
|
||||
<!-- Habits Column -->
|
||||
<div class="module">
|
||||
<div class="task-column habits">
|
||||
<h2 class="task-column_title">{{t("Habits")}}</h2>
|
||||
<app:tasks:newTask type="habit" inputValue="{_newHabit}" placeHolder="New Habit" />
|
||||
<ul class="habits">
|
||||
{#each _habitList as :task}<app:tasks:task />{/}
|
||||
</ul>
|
||||
<br/>
|
||||
<app:tasks:ads>
|
||||
<a href="http://www.amazon.com/gp/product/1400069289/ref=as_li_tf_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1400069289&linkCode=as2&tag=ha0d2-20">The Power of Habit: Why We Do What We Do in Life and Business</a><img src="//www.assoc-amazon.com/e/ir?t=ha0d2-20&l=as2&o=1&a=1400069289" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />
|
||||
</app:tasks:ads>
|
||||
<app:tasks:task-list header="Habits" type="habit" inputValue="{_newHabit}" placeHolder="New Habit" list={_habitList} >
|
||||
<@ads><a href="http://www.amazon.com/gp/product/1400069289/ref=as_li_tf_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1400069289&linkCode=as2&tag=ha0d2-20">The Power of Habit: Why We Do What We Do in Life and Business</a><img src="//www.assoc-amazon.com/e/ir?t=ha0d2-20&l=as2&o=1&a=1400069289" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></@ads>
|
||||
</app:tasks:task-list>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Dailys Column -->
|
||||
<div class="module">
|
||||
<div class="task-column dailys">
|
||||
<h2 class="task-column_title">Dailies</h2>
|
||||
<app:tasks:newTask type="daily" inputValue="{_newDaily}" placeHolder="New Daily" />
|
||||
<ul class='dailys'>
|
||||
{#each _dailyList as :task}<app:tasks:task />{/}
|
||||
</ul>
|
||||
<br/>
|
||||
<app:tasks:ads>
|
||||
<a href="http://www.amazon.com/gp/product/0142000280/ref=as_li_tf_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=0142000280&linkCode=as2&tag=ha0d2-20">Getting Things Done: The Art of Stress-Free Productivity</a><img src="//www.assoc-amazon.com/e/ir?t=ha0d2-20&l=as2&o=1&a=0142000280" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />
|
||||
|
||||
</app:tasks:ads>
|
||||
<app:tasks:task-list header="Dailies" type="daily" inputValue="{_newDaily}" placeHolder="New Daily" list={_dailyList} >
|
||||
<@ads><a href="http://www.amazon.com/gp/product/0142000280/ref=as_li_tf_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=0142000280&linkCode=as2&tag=ha0d2-20">Getting Things Done: The Art of Stress-Free Productivity</a><img src="//www.assoc-amazon.com/e/ir?t=ha0d2-20&l=as2&o=1&a=0142000280" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></@ads>
|
||||
</app:tasks:task-list>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -63,22 +40,11 @@
|
|||
<a class="option-action" href="/v1/users/{{_user.id}}/calendar.ics?apiToken={{_user.apiToken}}" rel=tooltip title="iCal"><i class=icon-calendar></i></a>
|
||||
<!-- <a href="https://www.google.com/calendar/render?cid={{encodeiCalLink(_user.id, _user.apiToken)}}" rel=tooltip title="Google Calendar"><i class=icon-calendar></i></a> -->
|
||||
</span>
|
||||
<h2 class="task-column_title">Todos</h2>
|
||||
<div id="todos-chart" style="display:none;"></div>
|
||||
|
||||
<!-- create new todo -->
|
||||
<div class="{#if _showCompleted}hidden{/}">
|
||||
<app:tasks:newTask type="todo" inputValue="{_newTodo}" placeHolder="New Todo" />
|
||||
</div>
|
||||
|
||||
<!-- list of all the todos -->
|
||||
<ul class='todos task-list'>
|
||||
{#each _todoList as :task}<app:tasks:task />{/}
|
||||
</ul>
|
||||
<br/>
|
||||
<app:tasks:ads>
|
||||
<a href="http://www.amazon.com/gp/product/0312430000/ref=as_li_tf_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=0312430000&linkCode=as2&tag=ha0d2-20">The Checklist Manifesto: How to Get Things Right</a><img src="//www.assoc-amazon.com/e/ir?t=ha0d2-20&l=as2&o=1&a=0312430000" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />
|
||||
</app:tasks:ads>
|
||||
<app:tasks:task-list header="Todos" type="todo" inputValue="{_newTodo}" placeHolder="New Todo" list={_todoList} >
|
||||
<@ads><a href="http://www.amazon.com/gp/product/0312430000/ref=as_li_tf_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=0312430000&linkCode=as2&tag=ha0d2-20">The Checklist Manifesto: How to Get Things Right</a><img src="//www.assoc-amazon.com/e/ir?t=ha0d2-20&l=as2&o=1&a=0312430000" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></@ads>
|
||||
</app:tasks:task-list>
|
||||
|
||||
<button class='task-action-btn tile spacious bright {#unless _showCompleted}hidden{/}' x-bind=click:clearCompleted>Clear Completed</button>
|
||||
|
||||
|
|
@ -91,15 +57,33 @@
|
|||
</div>
|
||||
|
||||
<!-- Rewards Column -->
|
||||
<app:rewards:rewardsColumn />
|
||||
<app:rewards:rewards-column/>
|
||||
|
||||
<!-- Templates -->
|
||||
<newTask:>
|
||||
<form class="addtask-form form-inline new-task-form" id="new-{@type}" data-task-type="{@type}" x-bind="submit:addTask">
|
||||
<span class="addtask-field"><input value="{@inputValue}" type="text" name="new-task" placeholder="{@placeHolder}"/></span>
|
||||
<task-list: nonvoid>
|
||||
<h2 class="task-column_title">{{t(@header)}}</h2>
|
||||
|
||||
{{#if equal(@type,'todo')}}<div id="todos-chart" class="hidden"></div>{{/}}
|
||||
|
||||
<form class="addtask-form form-inline new-task-form {#if and(_showCompleted,equal(@type,'todo'))}hidden{/}" id="new-{{@type}}" data-task-type="{{@type}}" x-bind="submit:addTask">
|
||||
<span class="addtask-field"><input value="{@inputValue}" type="text" placeholder="{{@placeHolder}}"/></span>
|
||||
<input class="addtask-btn" type="submit" value="+">
|
||||
</form>
|
||||
<hr>
|
||||
<ul class="{{@type}}s {#unless @list}hidden{/}">
|
||||
{#each @list as :task}<app:tasks:task />{/}
|
||||
</ul>
|
||||
{{@extra}}
|
||||
<br/>
|
||||
<!-- ads -->
|
||||
{{#if and( _loggedIn, notEqual(_user.flags.ads,'hide') )}}
|
||||
<span class='pull-right'>
|
||||
<a x-bind="click:showStripe" rel='tooltip' title='Remove Ads'><i class='icon-remove'></i></a><br/>
|
||||
<a href="#" data-target="#why-ads-modal" data-toggle="modal" rel='tooltip' title='Why Ads?'><i class='icon-question-sign'></i></a>
|
||||
</span>
|
||||
|
||||
{{@ads}}
|
||||
{{/}}
|
||||
|
||||
<!-- all the parts of a single task -->
|
||||
<task:>
|
||||
|
|
|
|||
Loading…
Reference in a new issue