feat: implement part of full-screen layout

This commit is contained in:
Steven
2023-12-18 22:10:36 +08:00
parent 15a091fe4c
commit d6656db20d
21 changed files with 116 additions and 255 deletions

View File

@ -12,8 +12,8 @@ import { useUserV1Store } from "./store/v1";
const App = () => {
const { i18n } = useTranslation();
const navigateTo = useNavigateTo();
const globalStore = useGlobalStore();
const { mode, setMode } = useColorScheme();
const globalStore = useGlobalStore();
const userV1Store = useUserV1Store();
const [loading, setLoading] = useState(true);
const { appearance, locale, systemStatus } = globalStore.state;
@ -30,7 +30,7 @@ const App = () => {
try {
await userV1Store.fetchCurrentUser();
} catch (error) {
// Skip.
// Do nothing.
}
setLoading(false);
};
@ -75,8 +75,8 @@ const App = () => {
}
}, [systemStatus.additionalScript]);
// Dynamic update metadata with customized profile.
useEffect(() => {
// dynamic update metadata with customized profile.
document.title = systemStatus.customizedProfile.name;
const link = document.querySelector("link[rel~='icon']") as HTMLLinkElement;
link.href = systemStatus.customizedProfile.logoUrl || "/logo.png";