versiyon hataları düzeltme

This commit is contained in:
Sedat Öztürk 2025-09-23 00:48:05 +03:00
parent ff366c6ff1
commit 08799590e2
5 changed files with 216 additions and 117 deletions

View file

@ -67,7 +67,7 @@ if (!self.define) {
}); });
}; };
} }
define(['./workbox-a959eb95'], (function (workbox) { 'use strict'; define(['./workbox-54d0af47'], (function (workbox) { 'use strict';
self.skipWaiting(); self.skipWaiting();
workbox.clientsClaim(); workbox.clientsClaim();
@ -82,28 +82,12 @@ define(['./workbox-a959eb95'], (function (workbox) { 'use strict';
"revision": "3ca0b8505b4bec776b69afdba2768812" "revision": "3ca0b8505b4bec776b69afdba2768812"
}, { }, {
"url": "/index.html", "url": "/index.html",
"revision": "0.jq60tbu0hgg" "revision": "0.0b2biv3ob58"
}], {}); }], {});
workbox.cleanupOutdatedCaches(); workbox.cleanupOutdatedCaches();
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("/index.html"), { workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("/index.html"), {
allowlist: [/^\/$/], allowlist: [/^\/$/],
denylist: [/^\/api\//] denylist: [/^\/api\//]
})); }));
workbox.registerRoute(/\.(?:js|css|html|json)$/, new workbox.NetworkFirst({
"cacheName": "static-resources",
plugins: [new workbox.ExpirationPlugin({
maxEntries: 50,
maxAgeSeconds: 86400
}), new workbox.CacheableResponsePlugin({
statuses: [0, 200]
})]
}), 'GET');
workbox.registerRoute(/\.(?:png|jpg|jpeg|svg|gif|webp|ico)$/, new workbox.CacheFirst({
"cacheName": "images",
plugins: [new workbox.ExpirationPlugin({
maxEntries: 100,
maxAgeSeconds: 2592000
})]
}), 'GET');
})); }));

112
ui/public/version.json Normal file
View file

@ -0,0 +1,112 @@
{
"releases": [
{
"version": "1.0.14",
"buildDate": "2025-09-22",
"commit": "1c4ab4f8232b4cd2a39fa66f8101664840113ce5",
"changeLog": [
"Yeni versiyon çıktı uyarı gelecek şekilde düzenlendi.",
"Sağ alt kısımda mesaj çıkacak ve yenile butonu ile uygulama yeni versiyona geçecektir."
]
},
{
"version": "1.0.13",
"buildDate": "2025-09-22",
"commit": "c5f3a65304bc3c04d89ddf2f01d02563c656b911",
"changeLog": [
"nginx ayarları ve versiyon yenileme hakkında düzeltme"
]
},
{
"version": "1.0.12",
"buildDate": "2025-09-22",
"commit": "f55b777a171ec2072999e204b8e1e818fd91d8a3",
"changeLog": [
"Versiyon yenileme sistemi güncellemesi"
]
},
{
"version": "1.0.11",
"buildDate": "2025-09-22",
"commit": "b2e489d7051ca47a82561cbf2674ec49dc30ed92",
"changeLog": [
"Liste formlarda Layout görünümü düzenlemesi"
]
},
{
"version": "1.0.10",
"buildDate": "2025-09-22",
"commit": "b75158bc018b4d5076e0208796d68f16975e77d8",
"changeLog": [
"EditorOptions içerisine DataSource özelliği eklendi"
]
},
{
"version": "1.0.9",
"buildDate": "2025-09-21",
"commit": "e14d6930c21d2b1c108f16ce675dd05474a95d9e",
"changeLog": [
"Form komponentinin SelectBox -> lookup bilgisi varsa verileri dolduruyor"
]
},
{
"version": "1.0.8",
"buildDate": "2025-09-21",
"commit": "3f69cc54e94cf40db87fb23ba4cf7b311cc1f77c",
"changeLog": [
"Listelere Grid ve Card görünümleri eklendi."
]
},
{
"version": "1.0.7",
"buildDate": "2025-09-20",
"commit": "8754fc65c1a855b9b625db93a4f8d39f92fa5ab8",
"changeLog": [
"Versiyon güncellemesi için geçiş uyarı sistemi"
]
},
{
"version": "1.0.6",
"buildDate": "2025-09-19",
"commit": "9e85780623d940f43155474b66f2820d997abe3a",
"changeLog": [
"Versiyon güncelleme sistemi",
"Vite.Config dosyasında hızlandırma adına güncellemeler"
]
},
{
"version": "1.0.5",
"buildDate": "2025-09-19",
"commit": "c947fb2a1c0979df3d7fd4dab47af7a2d370f622",
"changeLog": [
"Form ekranındaki Butonlar güncellemeleri yapıldı",
"Edit Form ekranındaki Info butonu eklendi.",
"New Form ekranındaki Geri butonu eklendi."
]
},
{
"version": "1.0.4",
"buildDate": "2025-09-19",
"commit": "6766d1129d345e165282fc3ec198a168f188ab00",
"changeLog": [
"Subformlar üzerinde extra filters ve Widget çalışmaları yapıldı."
]
},
{
"version": "1.0.3",
"buildDate": "2025-09-19",
"commit": "656d1626179733f8da56aa2268b852a79efe26d8",
"changeLog": [
"Manage Grid üzerinde Extra filtre tanımlaması yapıldı."
]
},
{
"version": "1.0.2",
"buildDate": "2025-09-16",
"commit": "c6d2fbf30acae9c96502dfdd3846cbfbaf8af614",
"changeLog": [
"Genel Static olan Url bilgileri kaldırıldı."
]
}
]
}

View file

@ -11,6 +11,24 @@ import 'devextreme-react/html-editor'
// // Lisansı uygulama başlamadan önce kaydediyoruz // // Lisansı uygulama başlamadan önce kaydediyoruz
// config({ licenseKey }) // config({ licenseKey })
import { store } from '@/store'
async function initVersion() {
try {
const res = await fetch('/version.json?ts=' + Date.now())
const data = await res.json()
const latest = data?.releases?.[0]?.version
if (latest) {
store.getActions().locale.setUiVersion(latest)
}
} catch (e) {
console.warn('Versiyon okunamadı', e)
}
}
// uygulama başlamadan bir defa çağır
initVersion()
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(<App />) ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(<App />)
UiEvalService.Init() UiEvalService.Init()

View file

@ -1,23 +1,10 @@
import { registerSW } from 'virtual:pwa-register' import { registerSW } from 'virtual:pwa-register'
import { store } from '@/store'
export const registerServiceWorker = () => { export const registerServiceWorker = () => {
registerSW({ registerSW({
immediate: true, immediate: true,
async onNeedRefresh() { onNeedRefresh() {
try { console.log('🔔 New content available, please refresh.')
const res = await fetch('/version.json?ts=' + Date.now())
const data = await res.json()
const latest = data?.releases?.[0]?.version
if (latest) {
// ✅ direkt store.dispatch ile versiyonu güncelle
store.getActions().locale.setUiVersion(latest)
}
} catch {
console.warn('Yeni versiyon bilgisi alınamadı')
}
// ✅ yeni SW aktif olduğunda uygulamayı yenile
window.location.reload() window.location.reload()
}, },
onOfflineReady() { onOfflineReady() {

View file

@ -19,100 +19,98 @@ export default defineConfig(async ({ mode }) => {
return { return {
plugins: [ plugins: [
react(), react(),
mode === 'production' VitePWA({
? VitePWA({ // Deploy'dan sonra otomatik güncelle
// Deploy'dan sonra otomatik güncelle registerType: 'autoUpdate',
registerType: 'autoUpdate', // Kayıt kodunu otomatik enjekte et (virtual:pwa-register yazmadan da çalışır)
// Kayıt kodunu otomatik enjekte et (virtual:pwa-register yazmadan da çalışır) injectRegister: 'auto',
injectRegister: 'auto', // Dev ortamında SW'yi aç, prod'da kapalı tut (build edilmiş SW prod'da zaten aktif olur)
// Dev ortamında SW'yi aç, prod'da kapalı tut (build edilmiş SW prod'da zaten aktif olur) devOptions: {
devOptions: { enabled: mode !== 'production',
enabled: mode !== 'production', type: 'module', // Modern module worker kullan
type: 'module', // Modern module worker kullan },
},
workbox: { workbox: {
// Büyük asset'leri de cache'leyebil // Büyük asset'leri de cache'leyebil
maximumFileSizeToCacheInBytes: 10 * 1024 * 1024, maximumFileSizeToCacheInBytes: 10 * 1024 * 1024,
// EN KRİTİK: yeni SW beklemeden kontrolü alsın // EN KRİTİK: yeni SW beklemeden kontrolü alsın
clientsClaim: true, clientsClaim: true,
skipWaiting: true, skipWaiting: true,
// Eski workbox cache'lerini temizle // Eski workbox cache'lerini temizle
cleanupOutdatedCaches: true, cleanupOutdatedCaches: true,
// SPA fallback'i API çağrılarına uygulama // SPA fallback'i API çağrılarına uygulama
navigateFallbackDenylist: [/^\/api\//], navigateFallbackDenylist: [/^\/api\//],
// ⭐⭐ BU KISMI EKLEYİN: Cache sorununu çözecek runtime caching // ⭐⭐ BU KISMI EKLEYİN: Cache sorununu çözecek runtime caching
runtimeCaching: runtimeCaching:
mode === 'production' mode === 'production'
? [ ? [
{ {
urlPattern: /\.(?:js|css|html|json)$/, urlPattern: /\.(?:js|css|html|json)$/,
handler: 'NetworkFirst', handler: 'NetworkFirst',
options: { options: {
cacheName: 'static-resources', cacheName: 'static-resources',
expiration: { expiration: {
maxEntries: 50, maxEntries: 50,
maxAgeSeconds: 24 * 60 * 60, // 24 saat maxAgeSeconds: 24 * 60 * 60, // 24 saat
},
cacheableResponse: {
statuses: [0, 200],
},
},
}, },
{ cacheableResponse: {
urlPattern: /\.(?:png|jpg|jpeg|svg|gif|webp|ico)$/, statuses: [0, 200],
handler: 'CacheFirst',
options: {
cacheName: 'images',
expiration: {
maxEntries: 100,
maxAgeSeconds: 30 * 24 * 60 * 60, // 30 gün
},
},
}, },
] },
: [], },
{
urlPattern: /\.(?:png|jpg|jpeg|svg|gif|webp|ico)$/,
handler: 'CacheFirst',
options: {
cacheName: 'images',
expiration: {
maxEntries: 100,
maxAgeSeconds: 30 * 24 * 60 * 60, // 30 gün
},
},
},
]
: [],
// ⭐ YENİ EKLENEN: Additional navigation route for SPA // ⭐ YENİ EKLENEN: Additional navigation route for SPA
navigateFallback: '/index.html', navigateFallback: '/index.html',
navigateFallbackAllowlist: [/^(?!\/__).*/], navigateFallbackAllowlist: [/^(?!\/__).*/],
}, },
manifest: { manifest: {
name: 'Sözsoft Kurs Platform', name: 'Sözsoft Kurs Platform',
short_name: 'Sözsoft Kurs Platform', short_name: 'Sözsoft Kurs Platform',
theme_color: '#FF99C8', theme_color: '#FF99C8',
background_color: '#f0e7db', background_color: '#f0e7db',
display: 'standalone', display: 'standalone',
icons: [ icons: [
{ {
src: '/img/logo/logo-400.png', src: '/img/logo/logo-400.png',
sizes: '400x400', sizes: '400x400',
type: 'image/png', type: 'image/png',
purpose: 'any maskable', purpose: 'any maskable',
},
{
src: '/img/logo/logo-192.png',
sizes: '192x192',
type: 'image/png',
purpose: 'any maskable',
},
{
src: '/img/logo/logo-512.png',
sizes: '512x512',
type: 'image/png',
purpose: 'any maskable',
},
],
categories: ['business', 'productivity'],
description: 'Sözsoft Kurs Platform Application',
}, },
}) {
: null, src: '/img/logo/logo-192.png',
sizes: '192x192',
type: 'image/png',
purpose: 'any maskable',
},
{
src: '/img/logo/logo-512.png',
sizes: '512x512',
type: 'image/png',
purpose: 'any maskable',
},
],
categories: ['business', 'productivity'],
description: 'Sözsoft Kurs Platform Application',
},
}),
], ],
server: { server: {