完善桌面端端到端回归收口
This commit is contained in:
@@ -62,11 +62,13 @@ export const useAuthStore = defineStore("auth", () => {
|
||||
return data;
|
||||
};
|
||||
|
||||
const logout = async () => {
|
||||
const logout = async (options: { rememberCurrentStudy?: boolean } = {}) => {
|
||||
const studyStore = useStudyStore();
|
||||
const sessionStore = useSessionStore();
|
||||
const userKey = user.value?.email || localStorage.getItem(LAST_LOGIN_EMAIL_KEY) || "";
|
||||
studyStore.rememberCurrentStudyForUser(userKey);
|
||||
if (options.rememberCurrentStudy !== false) {
|
||||
studyStore.rememberCurrentStudyForUser(userKey);
|
||||
}
|
||||
token.value = null;
|
||||
user.value = null;
|
||||
forceLogin.value = false;
|
||||
|
||||
Reference in New Issue
Block a user