登录页UI及长时间未操作锁定逻辑优化
This commit is contained in:
@@ -43,11 +43,13 @@ export const useAuthStore = defineStore("auth", () => {
|
||||
|
||||
const logout = () => {
|
||||
const studyStore = useStudyStore();
|
||||
const sessionStore = useSessionStore();
|
||||
const userKey = user.value?.email || localStorage.getItem(LAST_LOGIN_EMAIL_KEY) || "";
|
||||
studyStore.rememberCurrentStudyForUser(userKey);
|
||||
token.value = null;
|
||||
user.value = null;
|
||||
forceLogin.value = false;
|
||||
sessionStore.unlock();
|
||||
clearToken();
|
||||
studyStore.clearCurrentStudy();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user