+2
-3
frontend/src/lib/components/ProfileMenu.svelte
+2
-3
frontend/src/lib/components/ProfileMenu.svelte
···
2
import { portal } from 'svelte-portal';
3
import { onMount } from 'svelte';
4
import { page } from '$app/stores';
5
-
import { invalidateAll } from '$app/navigation';
6
import { queue } from '$lib/queue.svelte';
7
import { preferences, type Theme } from '$lib/preferences.svelte';
8
import { API_URL } from '$lib/config';
···
152
credentials: 'include'
153
});
154
if (response.ok) {
155
-
await invalidateAll();
156
} else {
157
console.error('logout with switch failed');
158
}
···
186
headers: { 'Content-Type': 'application/json' },
187
body: JSON.stringify({ target_did: account.did })
188
});
189
-
await invalidateAll();
190
} catch (e) {
191
console.error('switch account failed:', e);
192
} finally {
···
2
import { portal } from 'svelte-portal';
3
import { onMount } from 'svelte';
4
import { page } from '$app/stores';
5
import { queue } from '$lib/queue.svelte';
6
import { preferences, type Theme } from '$lib/preferences.svelte';
7
import { API_URL } from '$lib/config';
···
151
credentials: 'include'
152
});
153
if (response.ok) {
154
+
window.location.reload();
155
} else {
156
console.error('logout with switch failed');
157
}
···
185
headers: { 'Content-Type': 'application/json' },
186
body: JSON.stringify({ target_did: account.did })
187
});
188
+
window.location.reload();
189
} catch (e) {
190
console.error('switch account failed:', e);
191
} finally {
+2
-3
frontend/src/lib/components/UserMenu.svelte
+2
-3
frontend/src/lib/components/UserMenu.svelte
···
1
<script lang="ts">
2
import type { User, LinkedAccount } from '$lib/types';
3
import { API_URL } from '$lib/config';
4
-
import { invalidateAll } from '$app/navigation';
5
import HandleAutocomplete from './HandleAutocomplete.svelte';
6
import { logout } from '$lib/logout.svelte';
7
···
74
credentials: 'include'
75
});
76
if (response.ok) {
77
-
await invalidateAll();
78
} else {
79
console.error('logout with switch failed');
80
}
···
108
headers: { 'Content-Type': 'application/json' },
109
body: JSON.stringify({ target_did: account.did })
110
});
111
-
await invalidateAll();
112
} catch (e) {
113
console.error('switch account failed:', e);
114
} finally {
···
1
<script lang="ts">
2
import type { User, LinkedAccount } from '$lib/types';
3
import { API_URL } from '$lib/config';
4
import HandleAutocomplete from './HandleAutocomplete.svelte';
5
import { logout } from '$lib/logout.svelte';
6
···
73
credentials: 'include'
74
});
75
if (response.ok) {
76
+
window.location.reload();
77
} else {
78
console.error('logout with switch failed');
79
}
···
107
headers: { 'Content-Type': 'application/json' },
108
body: JSON.stringify({ target_did: account.did })
109
});
110
+
window.location.reload();
111
} catch (e) {
112
console.error('switch account failed:', e);
113
} finally {