Clean up savedCredentials again

This commit is contained in:
Natsumi
2025-10-31 16:18:13 +11:00
parent a86a8fe6f5
commit 6f29fff5ca
2 changed files with 43 additions and 65 deletions

View File

@@ -158,11 +158,9 @@
import { AppDebug } from '../../service/appConfig';
import { watchState } from '../../service/watchState';
import configRepository from '../../service/config';
const { showVRCXUpdateDialog } = useVRCXUpdaterStore();
const { loginForm, enableCustomEndpoint } = storeToRefs(useAuthStore());
const { toggleCustomEndpoint, relogin, deleteSavedLogin, login } = useAuthStore();
const { toggleCustomEndpoint, relogin, deleteSavedLogin, login, getAllSavedCredentials } = useAuthStore();
const { promptProxySettings } = useGeneralSettingsStore();
const { t } = useI18n();
@@ -195,12 +193,7 @@
if (watchState.isLoggedIn) {
return;
}
try {
savedCredentials.value = JSON.parse(await configRepository.getString('savedCredentials')) || {};
} catch (e) {
console.error('Failed to parse saved credentials:', e);
savedCredentials.value = {};
}
savedCredentials.value = await getAllSavedCredentials();
}
onBeforeMount(async () => {