diff --git a/src/routes/settings/versions/OfficialVersions.svelte b/src/routes/settings/versions/OfficialVersions.svelte index d83c7ef0..cd074725 100644 --- a/src/routes/settings/versions/OfficialVersions.svelte +++ b/src/routes/settings/versions/OfficialVersions.svelte @@ -14,6 +14,7 @@ import { UpdateStore } from "$lib/stores/AppStore"; import { saveActiveVersionChange } from "$lib/rpc/config"; import { _ } from "svelte-i18n"; + import { toastStore } from "$lib/stores/ToastStore"; let versionsLoaded = false; let releases: ReleaseInfo[] = []; @@ -102,7 +103,7 @@ versionsLoaded = true; } - async function saveOfficialVersionChange(evt) { + async function saveOfficialVersionChange() { const success = await saveActiveVersionChange( "official", $VersionStore.selectedVersions.official, @@ -112,10 +113,11 @@ $VersionStore.activeVersionName = $VersionStore.selectedVersions.official; $VersionStore.selectedVersions.unofficial = null; $VersionStore.selectedVersions.devel = null; + toastStore.makeToast("Saved game version!", "info"); } } - async function openOfficialVersionFolder(evt) { + async function openOfficialVersionFolder() { openVersionFolder("official"); } @@ -145,6 +147,8 @@ } } releases = releases; + $VersionStore.selectedVersions.official = event.detail.version; + await saveOfficialVersionChange(); } async function onRemoveVersion(event: any) { diff --git a/src/routes/settings/versions/UnofficialVersions.svelte b/src/routes/settings/versions/UnofficialVersions.svelte index 820a8dcc..755cf894 100644 --- a/src/routes/settings/versions/UnofficialVersions.svelte +++ b/src/routes/settings/versions/UnofficialVersions.svelte @@ -53,7 +53,7 @@ versionsLoaded = true; } - async function onSaveVersionChange(evt: any) { + async function onSaveVersionChange() { const success = await saveActiveVersionChange( "unofficial", $VersionStore.selectedVersions.unofficial, @@ -67,7 +67,7 @@ } } - async function onOpenVersionFolder(evt: any) { + async function onOpenVersionFolder() { openVersionFolder("unofficial"); } diff --git a/src/routes/settings/versions/VersionList.svelte b/src/routes/settings/versions/VersionList.svelte index 69957691..37ceb38a 100644 --- a/src/routes/settings/versions/VersionList.svelte +++ b/src/routes/settings/versions/VersionList.svelte @@ -1,11 +1,7 @@
- {#if changesPending($VersionStore)} - - {/if}