Add sleep tracking, statistics and backup features #23

Open
maximilian_vheyden wants to merge 3 commits from maximilian_vheyden/luna-tracker:feature/sleep-statistics-backup into develop
First-time contributor

Features

1. Sleep Tracking

  • New sleep button in the overflow menu
  • Tap to start a timer that measures sleep duration
  • Long-press allows manual input (1-180 minutes)
  • Timer state persists across app restarts

2. Statistics Module

  • New statistics button in the main view
  • 5 tabs: Daily Summary, Feeding, Diapers, Sleep, Growth
  • Period selection: 7, 14 or 30 days

3. Data Backup (Export/Import)

  • Export all logbooks as JSON file
  • Import backup files

4. Breastfeeding Timer

  • Tap to start, stop to save duration
  • Long-press for manual input
  • Day separators in event list

5. Translations

  • Complete German, French and Italian translations
## Features ### 1. Sleep Tracking - New sleep button in the overflow menu - Tap to start a timer that measures sleep duration - Long-press allows manual input (1-180 minutes) - Timer state persists across app restarts ### 2. Statistics Module - New statistics button in the main view - 5 tabs: Daily Summary, Feeding, Diapers, Sleep, Growth - Period selection: 7, 14 or 30 days ### 3. Data Backup (Export/Import) - Export all logbooks as JSON file - Import backup files ### 4. Breastfeeding Timer - Tap to start, stop to save duration - Long-press for manual input - Day separators in event list ### 5. Translations - Complete German, French and Italian translations
maximilian_vheyden added 3 commits 2026-01-08 09:36:02 +01:00
Features:
- Breastfeeding timer: Click to start, stop to save duration
- Manual duration input: Long-press for NumberPicker (1-60 min)
- Edit breastfeeding duration: Click on duration in event details
- Day separators: Visual dividers between days in event list
- German translations: Added missing strings for puke/bath events,
  time units, amount labels, signature settings, event details

The breastfeeding timer state persists across app restarts.
Features:
- Sleep tracking with timer and manual duration input
- Statistics module with 5 tabs (daily summary, feeding, diapers, sleep, growth)
- Export/Import backup functionality in settings
- Complete German, French and Italian translations
maximilian_vheyden force-pushed feature/sleep-statistics-backup from b6110c2cbb to 2355dd4390 2026-01-12 08:28:59 +01:00 Compare
maximilian_vheyden added 1 commit 2026-01-17 21:38:11 +01:00
When a timer (sleep/breastfeeding) was forgotten and the duration is
manually corrected, the "X minutes ago" display now reflects the adjusted
end time instead of the original stop time.
Contributor

hi @maximilian_vheyden, I just saw your MR. It adds some similar features compared to this MR: #19
I have not checked your code yet. Maybe it can be combined without much trouble.

hi @maximilian_vheyden, I just saw your MR. It adds some similar features compared to this MR: https://git.ichibi.eu/penguin86/luna-tracker/pulls/19 I have not checked your code yet. Maybe it can be combined without much trouble.
Contributor

Hi, in case the database is on a server (WebDAV) and two phones have access - does the sleep timer need to be stopped on the phone that started it, or can it also be stopped on the other phone?

Hi, in case the database is on a server (WebDAV) and two phones have access - does the sleep timer need to be stopped on the phone that started it, or can it also be stopped on the other phone?
Author
First-time contributor

Hi, in case the database is on a server (WebDAV) and two phones have access - does the sleep timer need to be stopped on the phone that started it, or can it also be stopped on the other phone?

Hi, currently it can only be stopped on the device where it was started.

> Hi, in case the database is on a server (WebDAV) and two phones have access - does the sleep timer need to be stopped on the phone that started it, or can it also be stopped on the other phone? Hi, currently it can only be stopped on the device where it was started.
Contributor

To manage the sleep time on one phone is rather cumbersome if the database is shared via WebDAV.

Btw., nice statistics. :)

To manage the sleep time on one phone is rather cumbersome if the database is shared via WebDAV. Btw., nice statistics. :)
Author
First-time contributor

To manage the sleep time on one phone is rather cumbersome if the database is shared via WebDAV.

Btw., nice statistics. :)

I created a solution (currently testing with my wife): https://git.ichibi.eu/maximilian_vheyden/luna-tracker/src/branch/feature/cross-device-timer-sync (disclaimer: using Opus 4.6 to speed things up)

> To manage the sleep time on one phone is rather cumbersome if the database is shared via WebDAV. > > Btw., nice statistics. :) I created a solution (currently testing with my wife): https://git.ichibi.eu/maximilian_vheyden/luna-tracker/src/branch/feature/cross-device-timer-sync (disclaimer: using Opus 4.6 to speed things up)
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u feature/sleep-statistics-backup:maximilian_vheyden-feature/sleep-statistics-backup
git checkout maximilian_vheyden-feature/sleep-statistics-backup
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: penguin86/luna-tracker#23
No description provided.