Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/renderer/src/features/timer/TimerPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -218,15 +218,16 @@ export default function TimerPage(): ReactElement {
};

return (
<div className="flex flex-col">
<div className="flex min-h-full flex-col">
<HomeHeader
date={selectedDate}
mode={mode}
onPickDate={() => { setDialog('date'); }}
onToggleMode={() => { setMode.mutate(mode === 'pomodoro' ? 'work' : 'pomodoro'); }}
/>

<div className="flex flex-1 flex-col gap-4 px-6 pt-4 pb-32">
{/* pb-[5.5rem] clears the fixed bottom nav (about 85px), so the controls rest just above it at any window height. */}
<div className="flex flex-1 flex-col gap-4 px-6 pt-4 pb-[5.5rem]">
<StatCards
dailyTargetSeconds={settings.data?.dailyTargetSeconds ?? DEFAULT_SETTINGS.dailyTargetSeconds}
loggedSeconds={loggedSeconds}
Expand Down
3 changes: 2 additions & 1 deletion src/renderer/src/features/timer/components/TimerControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ interface TimerControlsProps {

export default function TimerControls(props: TimerControlsProps): ReactElement {
return (
<div className="flex flex-col gap-3">
// mt-auto: whatever height the screen has left goes above the controls, so they rest on the bottom nav.
<div className="mt-auto flex flex-col gap-3">
<div className="flex items-center justify-between gap-4">
<button
type="button"
Expand Down
Loading