Skip to content

Commit b246ac4

Browse files
committed
fix: show update modal only in portable mode
1 parent 4aa112f commit b246ac4

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/App.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import { getCurrentWindow } from "@tauri-apps/api/window"
1818
import Sidebar from "./components/sidebar/Sidebar.vue"
1919
import { useToast } from "primevue/usetoast"
2020
import UpdateAvailableModal from "./components/modals/UpdateAvailableModal.vue"
21+
import { usePortable } from "./composables/usePortable"
2122
2223
const { t, locale } = useI18n()
2324
@@ -115,9 +116,13 @@ onUnmounted(() => {
115116
unlistenClose?.()
116117
})
117118
118-
watch(() => settingsStore.appUpdateStatus, (newStatus) => {
119+
const {isPortable} = usePortable()
120+
121+
watch(() => settingsStore.appUpdateStatus, async (newStatus) => {
119122
const skipVersion = localStorage.getItem('skipUpdateVersion')
120-
if (newStatus?.version && newStatus.version !== skipVersion) {
123+
124+
// update available will only show on portable
125+
if (newStatus?.version && newStatus.version !== skipVersion && isPortable.value) {
121126
openModal('updateAvailableModal')
122127
}
123128
})

0 commit comments

Comments
 (0)