Minor Fixes

This commit is contained in:
WardPearce
2026-02-14 01:33:15 +13:00
parent 032a900057
commit f84e973bea
2 changed files with 9 additions and 2 deletions
@@ -32,11 +32,13 @@
interfaceRegionStore,
interfaceSearchHistoryEnabled,
interfaceSearchSuggestionsStore,
rawSubscriptionKeyStore,
searchHistoryStore,
themeColorStore
} from '../../store';
import { addToast } from '../Toast.svelte';
import { tick } from 'svelte';
import { isOwnBackend } from '$lib/shared';
let invidiousInstance = $state(get(instanceStore));
let region = $state(get(interfaceRegionStore));
@@ -89,6 +91,11 @@
}
async function setBackend(event: Event) {
if (isOwnBackend()?.internalAuth) {
rawSubscriptionKeyStore.set(undefined);
fetch('/api/user/logout', { method: 'DELETE' });
}
const select = event.target as HTMLSelectElement;
backendInUseStore.set(select.value as 'ivg' | 'yt');
reloadState();
+2 -2
View File
@@ -116,7 +116,7 @@
});
async function login() {
if (isOwnBackend()?.internalAuth) {
if (isOwnBackend()?.internalAuth && isYTBackend()) {
goto(resolve('/internal/login', {}));
return;
}
@@ -188,7 +188,7 @@
}
function logout() {
if (isOwnBackend()?.internalAuth) {
if (isOwnBackend()?.internalAuth && isYTBackend()) {
rawSubscriptionKeyStore.set(undefined);
fetch('/api/user/logout', { method: 'DELETE' });
}