From ff366c6ff1ef29c2c6669899e79214b90f2ffe55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96zt=C3=BCrk?= Date: Tue, 23 Sep 2025 00:17:27 +0300 Subject: [PATCH] =?UTF-8?q?Versiyon=20hatas=C4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/store/abpConfig.model.ts | 47 -------------------------- ui/src/views/version/swRegistration.ts | 9 ++--- 2 files changed, 5 insertions(+), 51 deletions(-) diff --git a/ui/src/store/abpConfig.model.ts b/ui/src/store/abpConfig.model.ts index 158ca770..31ed3109 100644 --- a/ui/src/store/abpConfig.model.ts +++ b/ui/src/store/abpConfig.model.ts @@ -106,52 +106,5 @@ export const abpConfigModel: AbpConfigModel = { const menu = getChildren(result.data.items ?? [], null) actions.setMenu(menu) - - /* -const appsMenuConfig: NavigationTree[] = [ - { - key: 'apps', - path: '', - title: 'APPS', - translateKey: 'nav.apps', - icon: 'apps', - type: NAV_ITEM_TYPE_TITLE, - authority: [ADMIN, USER], - subMenu: [ - { - key: 'apps.project', - path: '', - title: 'Project', - translateKey: 'nav.appsProject.project', - icon: 'project', - type: NAV_ITEM_TYPE_COLLAPSE, - authority: [ADMIN, USER], - subMenu: [ - { - key: 'appsProject.dashboard', - path: `${APP_PREFIX_PATH}/project/dashboard`, - title: 'Dashboard', - translateKey: 'nav.appsProject.dashboard', - icon: '', - type: NAV_ITEM_TYPE_ITEM, - authority: [ADMIN, USER], - subMenu: [], - }, - { - key: 'appsProject.projectList', - path: `${APP_PREFIX_PATH}/project/project-list`, - title: 'Project List', - translateKey: 'nav.appsProject.projectList', - icon: '', - type: NAV_ITEM_TYPE_ITEM, - authority: [ADMIN, USER], - subMenu: [], - }, - ], - }, - ], - }, -] -*/ }), } diff --git a/ui/src/views/version/swRegistration.ts b/ui/src/views/version/swRegistration.ts index 79aa6d6b..e683e07a 100644 --- a/ui/src/views/version/swRegistration.ts +++ b/ui/src/views/version/swRegistration.ts @@ -1,8 +1,7 @@ import { registerSW } from 'virtual:pwa-register' -import { store, useStoreActions } from '@/store' +import { store } from '@/store' export const registerServiceWorker = () => { - const { setUiVersion } = useStoreActions((s) => s.locale) registerSW({ immediate: true, async onNeedRefresh() { @@ -11,12 +10,14 @@ export const registerServiceWorker = () => { const data = await res.json() const latest = data?.releases?.[0]?.version if (latest) { - setUiVersion(latest) + // ✅ direkt store.dispatch ile versiyonu güncelle + store.getActions().locale.setUiVersion(latest) } } catch { console.warn('Yeni versiyon bilgisi alınamadı') } - // Yeni SW aktif olacak + + // ✅ yeni SW aktif olduğunda uygulamayı yenile window.location.reload() }, onOfflineReady() {