@@ -259,7 +265,7 @@
-
@@ -668,11 +674,6 @@
cursor: not-allowed;
}
- .back-actions {
- text-align: center;
- margin-top: 2rem;
- }
-
.actions {
margin-top: 1.5rem;
}
diff --git a/src/routes/fitness/+layout.server.ts b/src/routes/fitness/+layout.server.ts
deleted file mode 100644
index 095d32a..0000000
--- a/src/routes/fitness/+layout.server.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import type { LayoutServerLoad } from './$types';
-
-export const load: LayoutServerLoad = async ({ locals }) => {
- return {
- session: await locals.auth()
- };
-};
\ No newline at end of file
diff --git a/src/routes/fitness/+layout.svelte b/src/routes/fitness/+layout.svelte
deleted file mode 100644
index 65e7e13..0000000
--- a/src/routes/fitness/+layout.svelte
+++ /dev/null
@@ -1,139 +0,0 @@
-
-
-
-
-
-
- {@render children()}
-
-
-
-
\ No newline at end of file
diff --git a/src/routes/fitness/+page.svelte b/src/routes/fitness/+page.svelte
deleted file mode 100644
index 39e7173..0000000
--- a/src/routes/fitness/+page.svelte
+++ /dev/null
@@ -1,432 +0,0 @@
-
-
-
-
-
-
-
-
💪
-
-
{stats.totalSessions}
-
Total Workouts
-
-
-
-
-
📋
-
-
{stats.totalTemplates}
-
Templates
-
-
-
-
-
🔥
-
-
{stats.thisWeek}
-
This Week
-
-
-
-
-
-
-
-
- {#if recentSessions.length === 0}
-
- {:else}
-
- {#each recentSessions as session}
-
-
-
{session.name}
-
{formatDate(session.startTime)}
-
-
- {formatDuration(session.duration)}
- {session.exercises.length} exercises
-
-
- {/each}
-
- {/if}
-
-
-
-
-
- {#if templates.length === 0}
-
- {:else}
-
- {#each templates as template}
-
-
{template.name}
- {#if template.description}
-
{template.description}
- {/if}
-
- {template.exercises.length} exercises
-
-
-
- {/each}
-
- {/if}
-
-
-
-
-
\ No newline at end of file
diff --git a/src/routes/fitness/sessions/+page.svelte b/src/routes/fitness/sessions/+page.svelte
deleted file mode 100644
index fde996e..0000000
--- a/src/routes/fitness/sessions/+page.svelte
+++ /dev/null
@@ -1,457 +0,0 @@
-
-
-
-
-
- {#if loading}
-
Loading sessions...
- {:else if sessions.length === 0}
-
- {:else}
-
- {#each sessions as session}
-
-
-
-
-
- Duration
- {formatDuration(session.duration)}
-
-
- Exercises
- {session.exercises.length}
-
-
- Sets
- {getCompletedSets(session)}/{getTotalSets(session)}
-
-
-
-
-
Exercises:
-
- {#each session.exercises as exercise}
- -
- {exercise.name}
- {exercise.sets.filter(s => s.completed).length}/{exercise.sets.length} sets
-
- {/each}
-
-
-
- {#if session.notes}
-
-
Notes:
-
{session.notes}
-
- {/if}
-
-
- {#if session.templateId}
-
- 🔄 Repeat Workout
-
- {/if}
-
deleteSession(session._id)}
- title="Delete session"
- >
- 🗑️
-
-
-
- {/each}
-
- {/if}
-
-
-
\ No newline at end of file
diff --git a/src/routes/fitness/templates/+page.svelte b/src/routes/fitness/templates/+page.svelte
deleted file mode 100644
index bbd2406..0000000
--- a/src/routes/fitness/templates/+page.svelte
+++ /dev/null
@@ -1,765 +0,0 @@
-
-
-
-
-
- {#if showCreateForm}
-
- {/if}
-
-
- {#if templates.length === 0}
-
-
No templates found. Create your first template to get started!
-
- {:else}
- {#each templates as template}
-
-
-
- {#if template.description}
-
{template.description}
- {/if}
-
-
-
Exercises ({template.exercises.length}):
-
- {#each template.exercises as exercise}
- -
- {exercise.name} - {exercise.sets.length} sets
- (Rest: {formatRestTime(exercise.restTime || 120)})
-
- {/each}
-
-
-
-
- Created: {new Date(template.createdAt).toLocaleDateString()}
-
-
-
-
- {/each}
- {/if}
-
-
-
-
\ No newline at end of file
diff --git a/src/routes/fitness/workout/+page.svelte b/src/routes/fitness/workout/+page.svelte
deleted file mode 100644
index b121db8..0000000
--- a/src/routes/fitness/workout/+page.svelte
+++ /dev/null
@@ -1,808 +0,0 @@
-
-
-
- {#if restTimer.active}
-
-
-
Rest Time
-
-
{formatTime(restTimer.timeLeft)}
-
-
-
- restTimer.timeLeft += 30}>+30s
- restTimer.timeLeft = Math.max(0, restTimer.timeLeft - 30)}>-30s
- Skip
-
-
-
- {/if}
-
-
-
-
- {#each currentSession.exercises as exercise, exerciseIndex}
-
-
-
-
-
-
- {#each exercise.sets as set, setIndex}
-
-
{setIndex + 1}
-
- {#if template?.exercises[exerciseIndex]?.sets[setIndex]}
- {@const prevSet = template.exercises[exerciseIndex].sets[setIndex]}
- {prevSet.weight || 0}kg × {prevSet.reps}
- {#if prevSet.rpe}@ {prevSet.rpe}{/if}
- {:else}
- -
- {/if}
-
-
-
-
-
-
-
-
-
-
-
- {#if !set.completed}
- markSetCompleted(exerciseIndex, setIndex)}
- disabled={!set.reps}
- >
- ✓
-
- {:else}
- ✅
- {/if}
- {#if exercise.sets.length > 1}
- removeSet(exerciseIndex, setIndex)}
- >
- ✕
-
- {/if}
-
-
- {/each}
-
-
- addSet(exerciseIndex)}>
- + Add Set
-
- startRestTimer(exercise.restTime)}
- disabled={restTimer.active}
- >
- ⏱️ Start Timer ({formatTime(exercise.restTime)})
-
-
-
-
-
-
-
-
- {/each}
-
-
-
- ➕ Add Exercise
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/routes/glaube/rosenkranz/+page.svelte b/src/routes/glaube/rosenkranz/+page.svelte
index a8cca4e..e337aac 100644
--- a/src/routes/glaube/rosenkranz/+page.svelte
+++ b/src/routes/glaube/rosenkranz/+page.svelte
@@ -162,20 +162,19 @@ function getMysteryForWeekday(date, includeLuminous) {
}
// Determine which mystery to use based on current weekday
-let selectedMystery = $state(getMysteryForWeekday(new Date(), includeLuminous));
-let todaysMystery = $state(selectedMystery); // Track today's auto-selected mystery
-let currentMysteries = $state(mysteries[selectedMystery]);
-let currentMysteriesLatin = $state(mysteriesLatin[selectedMystery]);
-let currentMysteryTitles = $state(mysteryTitles[selectedMystery]);
-// Reactive statement to update mystery descriptions when selectedMystery changes
+const initialMystery = getMysteryForWeekday(new Date(), true); // Use literal true to avoid capturing reactive state
+let selectedMystery = $state(initialMystery);
+let todaysMystery = $state(initialMystery); // Track today's auto-selected mystery
+
+// Derive these values from selectedMystery so they update automatically
+let currentMysteries = $derived(mysteries[selectedMystery]);
+let currentMysteriesLatin = $derived(mysteriesLatin[selectedMystery]);
+let currentMysteryTitles = $derived(mysteryTitles[selectedMystery]);
let currentMysteryDescriptions = $derived(data.mysteryDescriptions[selectedMystery] || []);
// Function to switch mysteries
function selectMystery(mysteryType) {
selectedMystery = mysteryType;
- currentMysteries = mysteries[mysteryType];
- currentMysteriesLatin = mysteriesLatin[mysteryType];
- currentMysteryTitles = mysteryTitles[mysteryType];
}
// Function to handle toggle change