diff --git a/src/lib/trpc/routes/workouts.ts b/src/lib/trpc/routes/workouts.ts index 3228762b..d7dbc82f 100644 --- a/src/lib/trpc/routes/workouts.ts +++ b/src/lib/trpc/routes/workouts.ts @@ -590,7 +590,8 @@ export const workouts = t.router({ userId: ctx.userId, startedAt: input.data.workoutData.startedAt!, endedAt: input.endedAt, - userBodyweight: input.data.workoutData.userBodyweight + userBodyweight: input.data.workoutData.userBodyweight, + note: input.data.workoutData.note }; const workoutOfMesocycle = await prisma.workoutOfMesocycle.findFirst({ diff --git a/src/routes/(components)/layout/ChangelogDialog.svelte b/src/routes/(components)/layout/ChangelogDialog.svelte index 6b4cc98c..3e8fb0e1 100644 --- a/src/routes/(components)/layout/ChangelogDialog.svelte +++ b/src/routes/(components)/layout/ChangelogDialog.svelte @@ -10,12 +10,11 @@ import { checkForUpdates, needRefresh, updateDataLossDialog } from './PWAFunctions.svelte'; let open = $state(false); - let checkingForUpdate = $state(false); + let checkedForUpdate = $state(false); let dialogText = $state(); let releases = $state<{ tag_name: string; body: string }[]>([]); onMount(async () => { - checkingForUpdate = true; const response = await fetch('https://api.github.com/repos/WhyAsh5114/MyFit/releases'); releases = await response.json(); const latestRelease = releases[0]; @@ -27,14 +26,14 @@ changelogShownOf.localeCompare(latestRelease!.tag_name, undefined, { numeric: true }) === -1 ) { open = true; - loadChangelog(changelogShownOf); + await loadChangelog(changelogShownOf); while (checkForUpdates === null) { await new Promise((resolve) => setTimeout(resolve, 500)); } await checkForUpdates(); } ls.setItem('changelogShownOf', latestRelease!.tag_name); - checkingForUpdate = false; + checkedForUpdate = true; }); async function loadChangelog(lastRelease: string) { @@ -42,11 +41,12 @@ (release) => release.tag_name.localeCompare(lastRelease, undefined, { numeric: true }) === 1 ); - dialogText = ''; + let text = ''; for (let i = 0; i < notShownReleases.length; i++) { - dialogText += DOMPurify.sanitize(await marked.parse(releases[i].body)); + text += DOMPurify.sanitize(await marked.parse(releases[i].body)); if (i !== notShownReleases.length - 1) dialogText += '
'; } + dialogText = text; } @@ -58,14 +58,14 @@ @@ -104,7 +155,7 @@ - + + + + Filter by date +
+ + + + + + + + + Filter by mesocycles + + + + + + {#each mesocycleNames as mesocycleName} + + {mesocycleName === null ? 'Non-mesocycle' : mesocycleName} + + {/each} + + +
+
+
{#if selectedExercise} - + {#if exerciseInstances} - {#each exerciseInstances as instance} + {#each filteredExerciseInstances as instance} {/each} {/if} diff --git a/src/routes/workouts/manage/overview/+page.svelte b/src/routes/workouts/manage/overview/+page.svelte index 3f98cdac..e348fb24 100644 --- a/src/routes/workouts/manage/overview/+page.svelte +++ b/src/routes/workouts/manage/overview/+page.svelte @@ -155,7 +155,7 @@ -
+