From 3d4d0afa59881a2caad2549cadeae31cb05bf9fa Mon Sep 17 00:00:00 2001 From: Josiah Glosson Date: Tue, 8 Jul 2025 17:11:56 -0500 Subject: [PATCH] Slight UI tweaks --- apps/app-frontend/src/App.vue | 19 ++++++++++++------- .../src/components/ui/UpdateModal.vue | 5 ++--- apps/app/tauri.conf.json | 2 +- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/apps/app-frontend/src/App.vue b/apps/app-frontend/src/App.vue index 7dc975982..ca2d1e7d3 100644 --- a/apps/app-frontend/src/App.vue +++ b/apps/app-frontend/src/App.vue @@ -346,7 +346,7 @@ async function handleCommand(e) { } } -const updateAvailable = ref(false) +const availableUpdate = ref(null) const updateModal = useTemplateRef('updateModal') async function checkUpdates() { if (!(await areUpdatesEnabled())) { @@ -361,10 +361,14 @@ async function checkUpdates() { } const update = await invoke('plugin:updater|check') - updateAvailable.value = !!update - if (updateAvailable.value) { - console.log(`Update ${update.version} is available. Showing update modal.`) - updateModal.value.show(update) + if (!!update) { + console.log(`Update ${update.version} is available.`) + if (update.version === availableUpdate.value?.version) { + console.log('Skipping update modal because the new version is the same as the dismissed update') + } else { + availableUpdate.value = update; + updateModal.value.show(update) + } } } @@ -471,8 +475,9 @@ function handleAuxClick(e) {
- - + + + diff --git a/apps/app-frontend/src/components/ui/UpdateModal.vue b/apps/app-frontend/src/components/ui/UpdateModal.vue index aa73a184d..7aa165af5 100644 --- a/apps/app-frontend/src/components/ui/UpdateModal.vue +++ b/apps/app-frontend/src/components/ui/UpdateModal.vue @@ -21,7 +21,7 @@ {{ formatMessage(messages.later) }} - + @@ -97,10 +97,9 @@ function onHide() { function hide() { modal.value!.hide() - onHide() } -defineExpose({ show, isOpen }) +defineExpose({ show, hide, isOpen }) diff --git a/apps/app/tauri.conf.json b/apps/app/tauri.conf.json index 724e536d8..1c9a71e81 100644 --- a/apps/app/tauri.conf.json +++ b/apps/app/tauri.conf.json @@ -41,7 +41,7 @@ ] }, "productName": "Modrinth App", - "version": "../app-frontend/package.json", + "version": "0.9.0", "mainBinaryName": "Modrinth App", "identifier": "ModrinthApp", "plugins": {