diff --git a/Minimalist-Pomodoro/Pomodoro-mini.zip b/Minimalist-Pomodoro/Pomodoro-mini.zip index d6e3a1e..d4536e0 100644 Binary files a/Minimalist-Pomodoro/Pomodoro-mini.zip and b/Minimalist-Pomodoro/Pomodoro-mini.zip differ diff --git a/Minimalist-Pomodoro/README.md b/Minimalist-Pomodoro/README.md index 79497ed..acc132d 100644 --- a/Minimalist-Pomodoro/README.md +++ b/Minimalist-Pomodoro/README.md @@ -1,33 +1,47 @@ # Minimalist Pomodoro + Time Tracker -A monochromatic Pomodoro timer widget with per-note time tracking and automated report generation. Built with zero external dependencies in ~130 lines of code. +A monochromatic Pomodoro timer widget with per-note time tracking and automated report generation. Built with zero external dependencies. ## Features + * **Pomodoro Timer:** Standard 25min focus / 5min break cycles. * **Per-Note Tracking:** Automatically logs how much time you spend on each note while the timer is running. * **Monochromatic UI:** Uses the active theme's CSS variables for a distraction-free experience. ## 🚀 What's New (Latest Updates) +**v4 - Native Widget Panel** + +* **Right-pane widget:** Replaced the absolutely-positioned floating button with a proper `RightPanelWidget`, rendering the timer as a native collapsible section in the right panel. +* **No more overlap:** Removed `_autoposition()` and all manual coordinate logic — the widget now follows Trilium's layout system naturally. +* **Cleaner UI:** Timer display enlarged to 32px; controls expand to full width. + **v3 - Core Bug Fixes & Stability** + * **Wall-clock time tracking:** The timer no longer stops or loses time when the Trilium window is minimized or loses focus (bypassing `setInterval` throttling). * **Pause fix:** Fixed a bug where time wasn't accounted for correctly after unpausing a session (`lastTick` reset issue). **v2 - Workflow & Persistence** + * **Seamless Transitions:** Automatically chains sessions (Focus → Break → Focus) without stopping. * **Safe Persistence:** Saves progress to `localStorage` on pauses or app closures. The timer automatically restores pending data if you reopen the app. * **Auto-Reports:** Generates a formatted note on stop, detailing completed cycles (and if they were chained), total time, and time spent per note. ## Installation + 1. Create a `JS Frontend` note. 2. Paste the script code or import the `.zip`. 3. Add the label: `#widget`. Reload Trilium. +> To place the widget in the **left pane** instead, change `get parentWidget()` to `'left-pane'` and the base class to `api.NoteContextAwareWidget` with `doRender()`. + ## Original link + [https://github.com/orgs/TriliumNext/discussions/9710](https://github.com/orgs/TriliumNext/discussions/9710) -### Images +### Images ![screen capture](imagens/pomodoro-1-.webp) ![screen capture](imagens/pomodoro-2-.webp) ![screen capture](imagens/pomodoro-3-.webp) +![screen capture](imagens/pomodoro-4-.webp) diff --git a/Minimalist-Pomodoro/imagens/pomodoro-4-.webp b/Minimalist-Pomodoro/imagens/pomodoro-4-.webp new file mode 100644 index 0000000..30966ca Binary files /dev/null and b/Minimalist-Pomodoro/imagens/pomodoro-4-.webp differ