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!

+ +
+ ) +} + +export default UpdateNotifier \ No newline at end of file diff --git a/ui/src/components/layouts/Layouts.tsx b/ui/src/components/layouts/Layouts.tsx index 1771f0bc..199de8e6 100644 --- a/ui/src/components/layouts/Layouts.tsx +++ b/ui/src/components/layouts/Layouts.tsx @@ -15,6 +15,7 @@ import useLocale from '@/utils/hooks/useLocale' import { useDynamicRoutes } from '@/routes/dynamicRoutesContext' import { useLocation } from 'react-router-dom' import { hasSubdomain } from '@/utils/subdomain' +import UpdateNotifier from '../UpdateNotifier' export type LayoutType = | typeof LAYOUT_TYPE_CLASSIC @@ -91,6 +92,7 @@ const Layout = () => { return ( }> + ) } diff --git a/ui/src/components/template/Footer.tsx b/ui/src/components/template/Footer.tsx index 12703940..d93908f7 100644 --- a/ui/src/components/template/Footer.tsx +++ b/ui/src/components/template/Footer.tsx @@ -57,7 +57,7 @@ const FooterContent = () => { }} title="🎉 Yeni Güncelleme" > - Platform Sistemi güncellendi. + Sözsoft Kurs Platform Sistemi güncellendi.

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 (
{ return ( ) } diff --git a/ui/src/views/NotFound.tsx b/ui/src/views/NotFound.tsx index 06b58c65..4f8ad272 100644 --- a/ui/src/views/NotFound.tsx +++ b/ui/src/views/NotFound.tsx @@ -13,9 +13,9 @@ const NotFoundPage = () => { return (
diff --git a/ui/src/views/admin/activityLog/ActivityLog.tsx b/ui/src/views/admin/activityLog/ActivityLog.tsx index 5c450379..365c618b 100644 --- a/ui/src/views/admin/activityLog/ActivityLog.tsx +++ b/ui/src/views/admin/activityLog/ActivityLog.tsx @@ -82,9 +82,9 @@ const ActivityLog = () => { return ( diff --git a/ui/src/views/admin/chart/ChartEdit.tsx b/ui/src/views/admin/chart/ChartEdit.tsx index 3cb89631..cc802cc3 100644 --- a/ui/src/views/admin/chart/ChartEdit.tsx +++ b/ui/src/views/admin/chart/ChartEdit.tsx @@ -263,9 +263,9 @@ function ChartEdit() { return chartValues && roleList && userList && permissionOptions ? ( { return (
diff --git a/ui/src/views/admin/listForm/edit/FormEdit.tsx b/ui/src/views/admin/listForm/edit/FormEdit.tsx index 3dc39d02..a3620691 100644 --- a/ui/src/views/admin/listForm/edit/FormEdit.tsx +++ b/ui/src/views/admin/listForm/edit/FormEdit.tsx @@ -150,9 +150,9 @@ const FormEdit = () => { return listFormCode && listFormValues && customizations && roleList && userList ? (
diff --git a/ui/src/views/admin/organization-unit/OrganizationUnits.tsx b/ui/src/views/admin/organization-unit/OrganizationUnits.tsx index ac56b5fa..e7d7dd6a 100644 --- a/ui/src/views/admin/organization-unit/OrganizationUnits.tsx +++ b/ui/src/views/admin/organization-unit/OrganizationUnits.tsx @@ -456,9 +456,9 @@ const OrganizationUnits = () => { return ( <> diff --git a/ui/src/views/admin/profile/Profile.tsx b/ui/src/views/admin/profile/Profile.tsx index 75cafc1b..739d3c0d 100644 --- a/ui/src/views/admin/profile/Profile.tsx +++ b/ui/src/views/admin/profile/Profile.tsx @@ -68,9 +68,9 @@ const Profile = () => { return ( onTabChange(val)}> diff --git a/ui/src/views/admin/role-management/Roles.tsx b/ui/src/views/admin/role-management/Roles.tsx index b5178223..c3ebb342 100644 --- a/ui/src/views/admin/role-management/Roles.tsx +++ b/ui/src/views/admin/role-management/Roles.tsx @@ -37,9 +37,9 @@ const Roles = () => { return ( <>