feat: GPS workout UI polish and voice guidance improvements

- Start native GPS service in paused state during pre-start (notification
  shows "Waiting to start..." instead of running timer)
- Bump notification importance to IMPORTANCE_DEFAULT for lock screen
- Theme-aware glass blur overlay matching header style (dark/light mode)
- Dark Nord blue background for activity picker, audio stats panel
- Transparent overlay in pre-start, gradient fade for cancel button
- Use Toggle component for voice announcements checkbox
- Persist voice guidance settings to localStorage
- Derive voice language from page language, remove language selector
This commit is contained in:
2026-03-26 10:45:30 +01:00
parent 6489c643e6
commit 1e2422bbb1
4 changed files with 111 additions and 60 deletions
+3 -3
View File
@@ -23,7 +23,7 @@ export interface VoiceGuidanceConfig {
}
interface AndroidBridge {
startLocationService(ttsConfigJson: string): void;
startLocationService(ttsConfigJson: string, startPaused: boolean): void;
stopLocationService(): void;
getPoints(): string;
isTracking(): boolean;
@@ -112,7 +112,7 @@ export function createGpsTracker() {
}
}
async function start(voiceGuidance?: VoiceGuidanceConfig) {
async function start(voiceGuidance?: VoiceGuidanceConfig, startPaused = false) {
_debugMsg = 'starting...';
if (!checkTauri() || isTracking) {
_debugMsg = `bail: tauri=${checkTauri()} tracking=${isTracking}`;
@@ -145,7 +145,7 @@ export function createGpsTracker() {
if (bridge) {
_debugMsg = 'starting native GPS service...';
const ttsConfig = JSON.stringify(voiceGuidance ?? {});
bridge.startLocationService(ttsConfig);
bridge.startLocationService(ttsConfig, startPaused);
// Poll the native side for collected points
_pollTimer = setInterval(pollPoints, POLL_INTERVAL_MS);
_debugMsg = 'native GPS service started, polling...';