diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index f7a750b7..1088c37b 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -35,7 +35,14 @@ "mainBinaryName": "OpenGOAL-Launcher", "version": "2.5.4", "identifier": "OpenGOAL-Launcher", - "plugins": {}, + "plugins": { + "updater": { + "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDM5Q0RCMDMyRkYwQTQxOTIKUldTU1FRci9NckROT1FERSs0UjhTNzRsTHU0cjZGdTZzN1FTWGF4aldYdGFlTG56eWc5Uko4YzkK", + "endpoints": [ + "https://raw.githubusercontent.com/open-goal/launcher/main/.tauri/latest-release-v2.json" + ] + } + }, "app": { "security": { "assetProtocol": { diff --git a/src/components/header/Header.svelte b/src/components/header/Header.svelte index 036c6b53..bd9516f3 100644 --- a/src/components/header/Header.svelte +++ b/src/components/header/Header.svelte @@ -7,7 +7,7 @@ import IconWindowMinimize from "~icons/mdi/window-minimize"; import IconWindowClose from "~icons/mdi/window-close"; import { UpdateStore } from "$lib/stores/AppStore"; - import { checkUpdate } from "@tauri-apps/plugin-updater"; + import { check } from "@tauri-apps/plugin-updater"; import { isInDebugMode } from "$lib/utils/common"; import { getActiveVersion, @@ -19,7 +19,7 @@ import { exceptionLog, infoLog } from "$lib/rpc/logging"; import { _ } from "svelte-i18n"; import { toastStore } from "$lib/stores/ToastStore"; -const appWindow = getCurrentWebviewWindow() + const appWindow = getCurrentWebviewWindow(); let launcherVerison = null; @@ -31,12 +31,12 @@ const appWindow = getCurrentWebviewWindow() $VersionStore.activeVersionName = await getActiveVersion(); // Check for a launcher update - // NOTE - the following code (checkUpdate) won't work unless you have `update` configuration + // NOTE - the following code (check for Update) won't work unless you have `update` configuration // added to the tauri.conf.json + if (!isInDebugMode()) { - const updateResult = await checkUpdate(); + const updateResult = await check(); if (updateResult.shouldUpdate) { - // TODO - store methods to clean this up let changeLog = []; try { changeLog = JSON.parse(updateResult.manifest.body); @@ -80,7 +80,7 @@ const appWindow = getCurrentWebviewWindow() latestToolingVersion !== undefined && $VersionStore.activeVersionName !== latestToolingVersion.version ) { - // Check that we havn't already downloaded it + // Check that we haven't already downloaded it let alreadyHaveRelease = false; const downloadedOfficialVersions = await listDownloadedVersions("official"); @@ -166,3 +166,6 @@ const appWindow = getCurrentWebviewWindow() + + diff --git a/src/routes/Update.svelte b/src/routes/Update.svelte index 20e5cd6a..54b2845f 100644 --- a/src/routes/Update.svelte +++ b/src/routes/Update.svelte @@ -1,5 +1,5 @@ @@ -121,3 +122,6 @@ {/if} + + diff --git a/src/splash/components/LocaleQuickChanger.svelte b/src/splash/components/LocaleQuickChanger.svelte index 19513325..8baa32f2 100644 --- a/src/splash/components/LocaleQuickChanger.svelte +++ b/src/splash/components/LocaleQuickChanger.svelte @@ -17,34 +17,40 @@ }); - +
+ +
diff --git a/vite.config.ts b/vite.config.ts index b530183a..3db8cde9 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -2,6 +2,7 @@ import { defineConfig } from "vite"; import { svelte } from "@sveltejs/vite-plugin-svelte"; import Icons from "unplugin-icons/vite"; import { fileURLToPath, URL } from "url"; +import { sveltePreprocess } from "svelte-preprocess"; // https://vitejs.dev/config/ export default defineConfig({ @@ -11,6 +12,9 @@ export default defineConfig({ plugins: [ svelte({ hot: !process.env.VITEST, + preprocess: sveltePreprocess({ + postcss: true, // Enable PostCSS for styles + }), }), Icons({ compiler: "svelte",