mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
feat: implement part of full-screen layout
This commit is contained in:
@ -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";
|
||||
|
Reference in New Issue
Block a user