UPDATE: Fix ui and add License

This commit is contained in:
2025-10-20 18:11:37 +07:00
parent ca612797ee
commit 892ea44c17
5 changed files with 52 additions and 55 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

View File

@@ -14,8 +14,9 @@ export default function SettingModal({
if (!isOpen) return null
const { setIsOpenSelfUpdateModal } = useModalStore()
const { closingOption, setClosingOption } = useSettingStore()
const { setUpdateData, updateData } = useLauncherStore()
const { closingOption, setClosingOption, serverVersion,
proxyVersion, } = useSettingStore()
const { setUpdateData, updateData, launcherVersion } = useLauncherStore()
const CheckUpdate = async () => {
const launcherData = await CheckUpdateLauncher()
if (!launcherData.isUpdate) {
@@ -32,7 +33,7 @@ export default function SettingModal({
}
return (
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/40 backdrop-blur-sm">
<div className="fixed inset-0 z-10 flex items-center justify-center bg-black/40 backdrop-blur-sm">
<div className="relative w-[90%] max-w-md bg-base-100 text-base-content rounded-2xl border border-purple-500/30 shadow-2xl shadow-purple-500/30 p-6">
{/* Header */}
<div className="flex justify-between items-center mb-6">
@@ -90,6 +91,24 @@ export default function SettingModal({
</div>
</label>
</div>
{/* Section 3: Launcher Version */}
<div className="p-4 bg-base-200 rounded-xl border border-purple-300 shadow-sm">
<h4 className="font-bold text-lg mb-2">Version</h4>
<div className="flex flex-wrap gap-2">
<p className="text-base text-info">
Server: {serverVersion}
</p>
<p className="text-base text-info">
Proxy: {proxyVersion}
</p>
<p className="text-base text-info">
Launcher: {launcherVersion}
</p>
</div>
</div>
</div>
</div>

View File

@@ -16,7 +16,8 @@ import { BackgroundSelector } from '@/components/backgroudModal';
export default function LauncherPage() {
const { gamePath,
const {
gamePath,
setGamePath,
setGameDir,
serverPath,
@@ -48,7 +49,7 @@ export default function LauncherPage() {
progressDownload,
downloadSpeed,
updateData,
launcherVersion,
// launcherVersion,
setLauncherVersion,
setIsLoading,
setDownloadType,
@@ -311,7 +312,7 @@ export default function LauncherPage() {
</div>
</div>
<div className="hidden sm:flex fixed top-1/2 left-4 z-10 ">
<div className="hidden sm:flex fixed top-1/2 left-5 z-10 ">
<BackgroundSelector />
</div>
@@ -466,55 +467,11 @@ export default function LauncherPage() {
</div>
)}
{/* Version Info */}
{serverReady && proxyReady && !isDownloading && (
<div className="hidden md:block fixed bottom-4 left-4 z-10 text-sm font-bold bg-white/5 rounded-lg p-2 shadow">
<p className="text-pink-600 "
style={{
textShadow: `
0.5px 0 rgba(255, 255, 255, 0.5),
-0.5px 0 rgba(255, 255, 255, 0.5),
0 0.5px rgba(255, 255, 255, 0.5),
0 -0.5px rgba(255, 255, 255, 0.5),
0.5px 0.5px rgba(255, 255, 255, 0.5),
-0.5px -0.5px rgba(255, 255, 255, 0.5),
0.5px -0.5px rgba(255, 255, 255, 0.5),
-0.5px 0.5px rgba(255, 255, 255, 0.5)
`,
}}
>Version server: {serverVersion}</p>
<p
className="mt-2 text-purple-600"
style={{
textShadow: `
0.5px 0 rgba(255, 255, 255, 0.5),
-0.5px 0 rgba(255, 255, 255, 0.5),
0 0.5px rgba(255, 255, 255, 0.5),
0 -0.5px rgba(255, 255, 255, 0.5),
0.5px 0.5px rgba(255, 255, 255, 0.5),
-0.5px -0.5px rgba(255, 255, 255, 0.5),
0.5px -0.5px rgba(255, 255, 255, 0.5),
-0.5px 0.5px rgba(255, 255, 255, 0.5)
`,
}}
>Version proxy: {proxyVersion}</p>
<p className="mt-2 text-cyan-600 "
style={{
textShadow: `
0.5px 0 rgba(255, 255, 255, 0.5),
-0.5px 0 rgba(255, 255, 255, 0.5),
0 0.5px rgba(255, 255, 255, 0.5),
0 -0.5px rgba(255, 255, 255, 0.5),
0.5px 0.5px rgba(255, 255, 255, 0.5),
-0.5px -0.5px rgba(255, 255, 255, 0.5),
0.5px -0.5px rgba(255, 255, 255, 0.5),
-0.5px 0.5px rgba(255, 255, 255, 0.5)
`,
}}
>Version launcher: {launcherVersion}</p>
</div>
)}
<div className="hidden md:block fixed bottom-4 left-5 z-10">
<img src="/heart-hsr.gif" alt="firefly animation" className="rounded-lg w-24 h-24" />
</div>
{/* Modal */}
<UpdateModal
isOpen={isOpenUpdateDataModal}