Switch/Checkbox Styling:
- Exclude switches and checkboxes from larger-targets CSS
- Fix checkbox square aspect ratio when ADHD mode enabled
- Prevent padding from being applied to form controls
Quick Wins Count:
- Use settings.quickWinThreshold instead of hardcoded 15
- Match same filtering logic as QuickWinList component
Back Button Navigation:
- Use window.history.back() instead of setLocation('/')
- Works correctly when navigating from ADHD dashboard to sub-pages
Time Tracking (Break Reminder):
- Track only active browser time using Page Visibility API
- Reset accumulated time after 8 hours of inactivity
- Store/restore active time in localStorage properly
- No more 1500+ hour counts from leaving browser open
Sources:
- https://ui.shadcn.com/docs/theming (shadcn theming)
- https://ui.shadcn.com/docs/tailwind-v4 (Tailwind v4 updates)
This commit is contained in:
@@ -45,11 +45,16 @@ export default function ADHDDashboardPage() {
|
||||
return updated.toDateString() === today.toDateString();
|
||||
}).length;
|
||||
|
||||
const quickWins = tasks.filter(t =>
|
||||
t.status !== 'done' &&
|
||||
t.estimatedDuration &&
|
||||
t.estimatedDuration <= 15
|
||||
).length;
|
||||
// Use same logic as QuickWinList for consistent count
|
||||
const threshold = settings.quickWinThreshold || 15;
|
||||
const quickWins = tasks.filter(t => {
|
||||
if (t.status === 'done') return false;
|
||||
// Only tasks without subtasks (leaf tasks)
|
||||
if (tasks.some(parent => parent.parentTaskId === t.id)) return false;
|
||||
// Filter by duration threshold (same as QuickWinList: threshold * 1.5)
|
||||
if (t.estimatedDuration && t.estimatedDuration > threshold * 1.5) return false;
|
||||
return true;
|
||||
}).length;
|
||||
|
||||
const features = [
|
||||
{
|
||||
@@ -84,7 +89,7 @@ export default function ADHDDashboardPage() {
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
onClick={() => setLocation('/')}
|
||||
onClick={() => window.history.back()}
|
||||
className="shrink-0"
|
||||
>
|
||||
<ArrowLeft className="h-5 w-5" />
|
||||
|
||||
@@ -28,7 +28,7 @@ export default function BodyDoublingPage() {
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
onClick={() => setLocation('/')}
|
||||
onClick={() => window.history.back()}
|
||||
className="shrink-0"
|
||||
>
|
||||
<ArrowLeft className="h-5 w-5" />
|
||||
|
||||
@@ -32,7 +32,7 @@ export default function QuickWinsPage() {
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
onClick={() => setLocation('/')}
|
||||
onClick={() => window.history.back()}
|
||||
className="shrink-0"
|
||||
>
|
||||
<ArrowLeft className="h-5 w-5" />
|
||||
|
||||
@@ -58,7 +58,7 @@ export default function SingleTaskPage() {
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
onClick={() => setLocation('/')}
|
||||
onClick={() => window.history.back()}
|
||||
className="shrink-0"
|
||||
>
|
||||
<ArrowLeft className="h-5 w-5" />
|
||||
|
||||
Reference in New Issue
Block a user