improvements to the sleep timer
🏗️ Build and Test JellyTau / Run Tests (push) Failing after 14s
Traceability Validation / Check Requirement Traces (push) Failing after 2s
🏗️ Build and Test JellyTau / Build Android APK (push) Has been skipped

This commit is contained in:
2026-02-28 20:33:22 +01:00
parent e8e37649fa
commit c5be9eb18c
19 changed files with 475 additions and 57 deletions
+23 -2
View File
@@ -1,5 +1,6 @@
<script lang="ts">
import { untrack } from "svelte";
import { sleepTimerActive } from "$lib/stores/sleepTimer";
import SleepTimerIndicator from "./SleepTimerIndicator.svelte";
interface Props {
@@ -92,8 +93,28 @@
</svg>
</button>
<!-- Sleep Timer Indicator -->
<SleepTimerIndicator onClick={onSleepTimerClick} />
<!-- Sleep Timer -->
{#if !$sleepTimerActive}
<button
onclick={(e) => {
e.stopPropagation();
onSleepTimerClick?.();
}}
ontouchstart={(e) => e.stopPropagation()}
ontouchmove={(e) => e.stopPropagation()}
ontouchend={(e) => e.stopPropagation()}
class="p-2 rounded-full text-gray-400 hover:text-white transition-colors"
title="Sleep timer"
aria-label="Sleep timer"
>
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z" />
</svg>
</button>
{:else}
<SleepTimerIndicator onClick={onSleepTimerClick} />
{/if}
<!-- Previous -->
<button