1
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
import { readSavedSettings } from '../persistence/gameSettingsStorage';
|
||||
|
||||
function resolveRouteLoadingPlatformThemeClass() {
|
||||
// 中文注释:路由级等待态早于 AuthUiContext 挂载,只能从本地设置读取平台主题。
|
||||
return readSavedSettings().platformTheme === 'dark'
|
||||
? 'platform-theme--dark'
|
||||
: 'platform-theme--light';
|
||||
}
|
||||
|
||||
export function RouteLoadingScreen({
|
||||
eyebrow,
|
||||
text,
|
||||
@@ -5,11 +14,19 @@ export function RouteLoadingScreen({
|
||||
eyebrow: string;
|
||||
text: string;
|
||||
}) {
|
||||
const platformThemeClass = resolveRouteLoadingPlatformThemeClass();
|
||||
|
||||
return (
|
||||
<div className="flex min-h-screen items-center justify-center bg-[#0d1016] px-6 text-zinc-200">
|
||||
<div
|
||||
className={`platform-ui-shell platform-theme ${platformThemeClass} flex min-h-screen items-center justify-center bg-[image:var(--platform-body-fill)] px-6 text-[var(--platform-text-base)]`}
|
||||
>
|
||||
<div className="text-center">
|
||||
<div className="text-sm tracking-[0.26em] text-zinc-500">{eyebrow}</div>
|
||||
<div className="mt-3 text-lg font-semibold text-white">{text}</div>
|
||||
<div className="text-sm tracking-[0.26em] text-[var(--platform-text-soft)]">
|
||||
{eyebrow}
|
||||
</div>
|
||||
<div className="mt-3 text-lg font-semibold text-[var(--platform-text-strong)]">
|
||||
{text}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user