diff --git a/dashboard/api.py b/dashboard/api.py index 111c630..ae66425 100644 --- a/dashboard/api.py +++ b/dashboard/api.py @@ -1435,6 +1435,7 @@ class TaskBoardHandler(SimpleHTTPRequestHandler): enriched['best_streak'] = best_streak enriched['completion_rate_30d'] = completion_rate enriched['weekly_summary'] = weekly_summary + enriched['should_check_today'] = habits_helpers.should_check_today(habit) enriched_habits.append(enriched) diff --git a/dashboard/habits.html b/dashboard/habits.html index 40db2ef..a46fdc3 100644 --- a/dashboard/habits.html +++ b/dashboard/habits.html @@ -30,6 +30,64 @@ color: var(--text-primary); } + /* Filter bar */ + .filter-bar { + display: flex; + gap: var(--space-3); + flex-wrap: wrap; + margin-bottom: var(--space-4); + padding: var(--space-3); + background: var(--bg-surface); + border: 1px solid var(--border); + border-radius: var(--radius-lg); + } + + .filter-group { + display: flex; + flex-direction: column; + gap: var(--space-1); + min-width: 150px; + } + + .filter-label { + font-size: var(--text-xs); + font-weight: 500; + color: var(--text-muted); + text-transform: uppercase; + letter-spacing: 0.5px; + } + + .filter-select { + padding: var(--space-2) var(--space-3); + border: 1px solid var(--border); + border-radius: var(--radius-md); + background: var(--bg-primary); + color: var(--text-primary); + font-size: var(--text-sm); + cursor: pointer; + transition: all var(--transition-base); + } + + .filter-select:hover { + border-color: var(--accent); + } + + .filter-select:focus { + outline: none; + border-color: var(--accent); + box-shadow: 0 0 0 2px var(--accent-alpha); + } + + @media (max-width: 768px) { + .filter-bar { + flex-direction: column; + } + + .filter-group { + width: 100%; + } + } + /* Habits grid */ .habits-grid { display: grid; @@ -661,6 +719,41 @@ +
+No habits match your filters
+Try adjusting the filters above
+