diff --git a/.env b/.env deleted file mode 100644 index bd6182a..0000000 --- a/.env +++ /dev/null @@ -1 +0,0 @@ -DATABASE_URL=postgres://postgres:voHMlrqwwzlZcqWW3oCYvkmWnmOAFntc4nYJmTRVsr7bm8CiOoxqAKv1zVn5Opsq@192.168.0.133:5432/postgres diff --git a/Dockerfile b/Dockerfile index 0fd045f..c19777a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,6 +11,7 @@ RUN npm ci # Copy source code and build the application COPY . . +RUN npx svelte-kit sync RUN npm run build # Production stage - clean runtime environment diff --git a/src/routes/ExerciseField.svelte b/src/routes/ExerciseField.svelte index d45fba5..2078b67 100644 --- a/src/routes/ExerciseField.svelte +++ b/src/routes/ExerciseField.svelte @@ -3,7 +3,6 @@ interface Props extends ExerciseConfig { value: number; - defaultValue: number; } let { @@ -16,7 +15,7 @@ }: Props = $props(); // Destructure the remaining props for easier access - const { icon, name, quickAddOptions, defaultValue, unit } = restProps; + const { icon, name, quickAddOptions, unit } = restProps; const label = unit ? `${icon} ${name} (${unit})` : `${icon} ${name}`; @@ -47,7 +46,6 @@ {min} {max} {step} - {defaultValue} required={true} class="flex-1 rounded-md border border-gray-300 px-3 py-2 focus:ring-2 focus:ring-blue-500 focus:outline-none" /> diff --git a/src/routes/WorkoutLogger.svelte b/src/routes/WorkoutLogger.svelte index 60cedbe..40b119c 100644 --- a/src/routes/WorkoutLogger.svelte +++ b/src/routes/WorkoutLogger.svelte @@ -3,17 +3,18 @@ import ExerciseField from './ExerciseField.svelte'; import { getTodayDateString, exampleWorkout, type WorkoutData, exercises } from '$lib/workout'; import { getTodaysWorkout, saveWorkout } from './workout.remote'; + import { fade } from 'svelte/transition'; let todayDate = getTodayDateString(); // Form state - let form: WorkoutData = { + let form: WorkoutData = $state({ pushups: 0, situps: 0, plankSeconds: 0, hangups: 0, runKm: 0 - }; + }); onMount(async () => { const result = await getTodaysWorkout(); @@ -36,7 +37,7 @@
{#each exercises as { config, key }} - + {/each} @@ -57,6 +58,7 @@ {#if saveWorkout.result?.success}