mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-31 23:11:15 +00:00
pull in taskClasses changes for the website challenges branch
This commit is contained in:
parent
002d4f9541
commit
41da6c2162
1 changed files with 7 additions and 5 deletions
|
|
@ -229,17 +229,19 @@ module.exports =
|
|||
###
|
||||
Task classes given everything about the class
|
||||
###
|
||||
taskClasses: (task, filters, dayStart, lastCron, showCompleted=false) ->
|
||||
taskClasses: (task, filters, dayStart, lastCron, showCompleted=false, main) ->
|
||||
return unless task
|
||||
{type, completed, value, repeat} = task
|
||||
|
||||
# completed / remaining toggle
|
||||
return 'hidden' if (type is 'todo') and (completed != showCompleted)
|
||||
|
||||
for filter, enabled of filters
|
||||
if enabled and not task.tags?[filter]
|
||||
# All the other classes don't matter
|
||||
return 'hidden'
|
||||
# Filters
|
||||
if main # only show when on your own list
|
||||
for filter, enabled of filters
|
||||
if enabled and not task.tags?[filter]
|
||||
# All the other classes don't matter
|
||||
return 'hidden'
|
||||
|
||||
classes = type
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue