chore: update workspace service

This commit is contained in:
Steven
2024-03-21 21:39:34 +08:00
parent 1d83c68cb5
commit 18d16abdb5
16 changed files with 121 additions and 89 deletions

View File

@ -23,8 +23,7 @@ const SignIn = () => {
const workspaceSettingStore = useWorkspaceSettingStore();
const userStore = useUserStore();
const actionBtnLoadingState = useLoading(false);
const { appearance, locale, systemStatus } = globalStore.state;
const mode = systemStatus.profile.mode;
const { appearance, locale, systemStatus, workspaceProfile } = globalStore.state;
const [username, setUsername] = useState("");
const [password, setPassword] = useState("");
const [remember, setRemember] = useState(true);
@ -42,11 +41,11 @@ const SignIn = () => {
}, []);
useEffect(() => {
if (mode === "demo") {
if (workspaceProfile.mode === "demo") {
setUsername("memos-demo");
setPassword("secret");
}
}, [mode]);
}, [workspaceProfile.mode]);
const handleUsernameInputChanged = (e: React.ChangeEvent<HTMLInputElement>) => {
const text = e.target.value as string;