mirror of
https://github.com/R0m1k3/noteflow.git
synced 2026-10-24 07:38:17 +02:00
fix: garder le Pomodoro Timer actif même quand le modal est fermé
- Rendre le PomodoroTimer dans une div cachée toujours montée - Cette instance continue de faire tourner le timer en arrière-plan - Le modal affiche une seconde instance pour les contrôles - Les deux instances partagent l'état via localStorage - Le timer continue maintenant de décompter même modal fermé
This commit is contained in:
1 file changed
+15
-6
+15
-6
@@ -3378,13 +3378,22 @@ const Index = () => {
|
|||||||
todos={todos}
|
todos={todos}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Pomodoro Timer Modal */}
|
{/* Pomodoro Timer - Always mounted in hidden div to keep timer running */}
|
||||||
<PomodoroModal
|
<div style={{ position: 'absolute', left: '-9999px', top: '-9999px' }}>
|
||||||
open={showPomodoroModal}
|
|
||||||
onOpenChange={setShowPomodoroModal}
|
|
||||||
>
|
|
||||||
<PomodoroTimer onStateChange={handlePomodoroStateChange} />
|
<PomodoroTimer onStateChange={handlePomodoroStateChange} />
|
||||||
</PomodoroModal>
|
</div>
|
||||||
|
|
||||||
|
{/* Pomodoro Timer Modal - Shows timer controls when opened */}
|
||||||
|
<Dialog open={showPomodoroModal} onOpenChange={setShowPomodoroModal}>
|
||||||
|
<DialogContent className="max-w-md">
|
||||||
|
<DialogHeader>
|
||||||
|
<DialogTitle className="text-2xl">Pomodoro Timer</DialogTitle>
|
||||||
|
</DialogHeader>
|
||||||
|
<div className="mt-4">
|
||||||
|
<PomodoroTimer onStateChange={handlePomodoroStateChange} />
|
||||||
|
</div>
|
||||||
|
</DialogContent>
|
||||||
|
</Dialog>
|
||||||
|
|
||||||
{/* Quick Capture Widget */}
|
{/* Quick Capture Widget */}
|
||||||
<QuickCaptureWidget onNoteCaptured={loadNotes} />
|
<QuickCaptureWidget onNoteCaptured={loadNotes} />
|
||||||
|
|||||||
Reference in new issue
Block a user