2025-05-06 06:45:49 +00:00
|
|
|
|
import classNames from 'classnames'
|
|
|
|
|
|
import Container from '@/components/shared/Container'
|
|
|
|
|
|
import { APP_NAME } from '@/constants/app.constant'
|
|
|
|
|
|
import { PAGE_CONTAINER_GUTTER_X } from '@/constants/theme.constant'
|
|
|
|
|
|
import { useStoreActions, useStoreState } from '@/store'
|
|
|
|
|
|
import { Link, useNavigate } from 'react-router-dom'
|
2025-06-28 21:34:28 +00:00
|
|
|
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
2025-05-06 06:45:49 +00:00
|
|
|
|
import UiDialog from '@/views/shared/UiDialog'
|
|
|
|
|
|
|
|
|
|
|
|
export type FooterPageContainerType = 'gutterless' | 'contained'
|
|
|
|
|
|
|
|
|
|
|
|
type FooterProps = {
|
|
|
|
|
|
pageContainerType: FooterPageContainerType
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const FooterContent = () => {
|
|
|
|
|
|
const navigate = useNavigate()
|
|
|
|
|
|
const { currentUiVersion } = useStoreState((a) => a.locale)
|
|
|
|
|
|
const { setUiVersion } = useStoreActions((a) => a.locale)
|
|
|
|
|
|
|
|
|
|
|
|
const apiConfig = useStoreState((state) => state.abpConfig.config?.extraProperties)
|
|
|
|
|
|
|
|
|
|
|
|
const uiMode = import.meta.env.MODE
|
|
|
|
|
|
const reactAppVersion = import.meta.env.VITE_REACT_APP_VERSION
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
<>
|
|
|
|
|
|
<div className="flex flex-col sm:flex-row items-center justify-between w-full">
|
|
|
|
|
|
<div className="space-x-1">
|
|
|
|
|
|
<span>Copyright © {new Date().getFullYear()}</span>
|
|
|
|
|
|
<span className="font-semibold">{APP_NAME}</span>
|
|
|
|
|
|
</div>
|
2025-06-28 21:34:28 +00:00
|
|
|
|
<Link to={ROUTES_ENUM.protected.admin.changeLog}>
|
2025-05-06 06:45:49 +00:00
|
|
|
|
<div className="text-muted capitalize">
|
|
|
|
|
|
<span>
|
|
|
|
|
|
<b>UI: </b>
|
|
|
|
|
|
{uiMode}:{currentUiVersion}
|
|
|
|
|
|
</span>
|
|
|
|
|
|
<span className="mx-2">|</span>
|
|
|
|
|
|
{apiConfig && (
|
|
|
|
|
|
<span>
|
|
|
|
|
|
<b>API: </b>
|
|
|
|
|
|
{apiConfig['environment'].toString()}:{apiConfig['version'].toString()}
|
|
|
|
|
|
</span>
|
|
|
|
|
|
)}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</Link>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
{reactAppVersion != currentUiVersion && (
|
|
|
|
|
|
<UiDialog
|
|
|
|
|
|
key={`version-${reactAppVersion }`}
|
|
|
|
|
|
isOpen={true}
|
|
|
|
|
|
type="info"
|
|
|
|
|
|
onConfirm={() => {
|
|
|
|
|
|
setUiVersion(reactAppVersion )
|
2025-06-28 21:34:28 +00:00
|
|
|
|
navigate(ROUTES_ENUM.protected.admin.changeLog)
|
2025-05-06 06:45:49 +00:00
|
|
|
|
}}
|
|
|
|
|
|
title="🎉 Yeni Güncelleme"
|
|
|
|
|
|
>
|
2025-09-13 11:46:34 +00:00
|
|
|
|
Sözsoft Kurs Platform Sistemi güncellendi.
|
2025-05-06 06:45:49 +00:00
|
|
|
|
<p>Detayları, "Güncelleme Günlüğü" ekranında görebilirsiniz.</p>
|
|
|
|
|
|
</UiDialog>
|
|
|
|
|
|
)}
|
|
|
|
|
|
</>
|
|
|
|
|
|
)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export default function Footer({ pageContainerType = 'contained' }: FooterProps) {
|
|
|
|
|
|
return (
|
|
|
|
|
|
<footer
|
2025-08-15 19:39:11 +00:00
|
|
|
|
className={classNames(`print:hidden footer flex flex-auto items-center h-6 ${PAGE_CONTAINER_GUTTER_X}`)}
|
2025-05-06 06:45:49 +00:00
|
|
|
|
>
|
|
|
|
|
|
{pageContainerType === 'contained' ? (
|
|
|
|
|
|
<Container>
|
|
|
|
|
|
<FooterContent />
|
|
|
|
|
|
</Container>
|
|
|
|
|
|
) : (
|
|
|
|
|
|
<FooterContent />
|
|
|
|
|
|
)}
|
|
|
|
|
|
</footer>
|
|
|
|
|
|
)
|
|
|
|
|
|
}
|