diff --git a/ui/public/img/logo/logo-192.png b/ui/public/img/logo/logo-192.png new file mode 100644 index 00000000..dd4e9c95 Binary files /dev/null and b/ui/public/img/logo/logo-192.png differ diff --git a/ui/public/img/logo/logo-512.png b/ui/public/img/logo/logo-512.png new file mode 100644 index 00000000..be89d74f Binary files /dev/null and b/ui/public/img/logo/logo-512.png differ diff --git a/ui/src/components/UpdateNotifier.tsx b/ui/src/components/UpdateNotifier.tsx new file mode 100644 index 00000000..219087c0 --- /dev/null +++ b/ui/src/components/UpdateNotifier.tsx @@ -0,0 +1,57 @@ +// src/components/UpdateNotifier.jsx +import { useState, useEffect } from 'react' + +const UpdateNotifier = () => { + const [updateAvailable, setUpdateAvailable] = useState(false) + + useEffect(() => { + if ('serviceWorker' in navigator) { + const checkUpdate = () => { + navigator.serviceWorker.getRegistration().then(registration => { + if (registration) { + registration.addEventListener('updatefound', () => { + setUpdateAvailable(true) + }) + } + }) + } + + checkUpdate() + const interval = setInterval(checkUpdate, 30000) // 30 saniyede bir kontrol + return () => clearInterval(interval) + } + }, []) + + const handleUpdate = () => { + window.location.reload() + } + + if (!updateAvailable) return null + + return ( +
Yeni güncelleme mevcut!
+ +Detayları, "Güncelleme Günlüğü" ekranında görebilirsiniz.
)} diff --git a/ui/src/constants/app.constant.ts b/ui/src/constants/app.constant.ts index b2f34ad5..0fc7455e 100644 --- a/ui/src/constants/app.constant.ts +++ b/ui/src/constants/app.constant.ts @@ -1,6 +1,6 @@ const { VITE_CDN_URL } = import.meta.env -export const APP_NAME = 'Platform' +export const APP_NAME = 'Sözsoft Kurs Platform' export const PERSIST_STORE_NAME = 'admin' export const REDIRECT_URL_KEY = 'redirectUrl' export const DEFAULT_API_NAME = 'Default' diff --git a/ui/src/views/AccessDenied.tsx b/ui/src/views/AccessDenied.tsx index 1e609ec0..2cdb5ada 100644 --- a/ui/src/views/AccessDenied.tsx +++ b/ui/src/views/AccessDenied.tsx @@ -17,9 +17,9 @@ const AccessDenied = () => { return (