Versiyon güncellemelerine devam edildi.
This commit is contained in:
parent
9e85780623
commit
ca63f95342
3 changed files with 11 additions and 39 deletions
|
|
@ -1,6 +1,14 @@
|
||||||
{
|
{
|
||||||
"commit": "6766d11",
|
"commit": "9e85780",
|
||||||
"releases": [
|
"releases": [
|
||||||
|
{
|
||||||
|
"version": "1.0.6",
|
||||||
|
"buildDate": "2025-09-19",
|
||||||
|
"changeLog": [
|
||||||
|
"Versiyon güncelleme sistemi",
|
||||||
|
"Vite.Config dosyasında hızlandırma adına güncellemeler"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"version": "1.0.5",
|
"version": "1.0.5",
|
||||||
"buildDate": "2025-09-19",
|
"buildDate": "2025-09-19",
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,10 @@
|
||||||
import { useEffect, useState } from "react"
|
|
||||||
import classNames from "classnames"
|
import classNames from "classnames"
|
||||||
import Container from "@/components/shared/Container"
|
import Container from "@/components/shared/Container"
|
||||||
import { APP_NAME } from "@/constants/app.constant"
|
import { APP_NAME } from "@/constants/app.constant"
|
||||||
import { PAGE_CONTAINER_GUTTER_X } from "@/constants/theme.constant"
|
import { PAGE_CONTAINER_GUTTER_X } from "@/constants/theme.constant"
|
||||||
import { useStoreActions, useStoreState } from "@/store"
|
import { useStoreState } from "@/store"
|
||||||
import { Link, useNavigate } from "react-router-dom"
|
import { Link, useNavigate } from "react-router-dom"
|
||||||
import { ROUTES_ENUM } from "@/routes/route.constant"
|
import { ROUTES_ENUM } from "@/routes/route.constant"
|
||||||
import UiDialog from "@/views/shared/UiDialog"
|
|
||||||
|
|
||||||
export type FooterPageContainerType = "gutterless" | "contained"
|
export type FooterPageContainerType = "gutterless" | "contained"
|
||||||
|
|
||||||
|
|
@ -15,28 +13,10 @@ type FooterProps = {
|
||||||
}
|
}
|
||||||
|
|
||||||
const FooterContent = () => {
|
const FooterContent = () => {
|
||||||
const navigate = useNavigate()
|
|
||||||
const { currentUiVersion } = useStoreState((a) => a.locale)
|
const { currentUiVersion } = useStoreState((a) => a.locale)
|
||||||
const { setUiVersion } = useStoreActions((a) => a.locale)
|
|
||||||
|
|
||||||
const apiConfig = useStoreState((state) => state.abpConfig.config?.extraProperties)
|
const apiConfig = useStoreState((state) => state.abpConfig.config?.extraProperties)
|
||||||
|
|
||||||
const uiMode = import.meta.env.MODE
|
const uiMode = import.meta.env.MODE
|
||||||
|
|
||||||
const [latestVersion, setLatestVersion] = useState<string | null>(null)
|
|
||||||
|
|
||||||
// version.json'dan en güncel UI versiyonunu al
|
|
||||||
useEffect(() => {
|
|
||||||
fetch("/version.json?ts=" + Date.now())
|
|
||||||
.then((res) => res.json())
|
|
||||||
.then((data) => {
|
|
||||||
if (data?.releases?.length > 0) {
|
|
||||||
setLatestVersion(data.releases[0].version) // en güncel hep en üstte
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(() => setLatestVersion(null))
|
|
||||||
}, [])
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="flex flex-col sm:flex-row items-center justify-between w-full">
|
<div className="flex flex-col sm:flex-row items-center justify-between w-full">
|
||||||
|
|
@ -60,22 +40,6 @@ const FooterContent = () => {
|
||||||
</div>
|
</div>
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{latestVersion && latestVersion !== currentUiVersion && (
|
|
||||||
<UiDialog
|
|
||||||
key={`version-${latestVersion}`}
|
|
||||||
isOpen={true}
|
|
||||||
type="info"
|
|
||||||
onConfirm={() => {
|
|
||||||
setUiVersion(latestVersion)
|
|
||||||
navigate(ROUTES_ENUM.protected.admin.changeLog)
|
|
||||||
}}
|
|
||||||
title="🎉 Yeni Güncelleme"
|
|
||||||
>
|
|
||||||
Sözsoft Kurs Platform Sistemi <b>v{latestVersion}</b> sürümüne güncellendi.
|
|
||||||
<p>Detayları, "Güncelleme Günlüğü" ekranında görebilirsiniz.</p>
|
|
||||||
</UiDialog>
|
|
||||||
)}
|
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ const UpdateNotifier = () => {
|
||||||
<div className="flex items-center gap-3">
|
<div className="flex items-center gap-3">
|
||||||
<HiOutlineRefresh className="h-8 w-8 animate-spin" />
|
<HiOutlineRefresh className="h-8 w-8 animate-spin" />
|
||||||
<div>
|
<div>
|
||||||
<p className="font-semibold">Yeni güncelleme mevcut!</p>
|
<p className="font-semibold">Yeni güncelleme mevcut! (v{lastUiVersion})</p>
|
||||||
<p className="text-sm">En son özellikler için sayfayı yenileyin.</p>
|
<p className="text-sm">En son özellikler için sayfayı yenileyin.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue