mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-03-06 09:46:17 +00:00
feat: swipe to remove individual server logins
This commit is contained in:
@@ -136,6 +136,18 @@ export function getPreviousServers(): SavedServer[] {
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a server from the previous servers list and delete its credentials.
|
||||
*/
|
||||
export async function removeServerFromList(serverUrl: string): Promise<void> {
|
||||
// First delete any saved credentials
|
||||
await deleteServerCredential(serverUrl);
|
||||
// Then remove from the list
|
||||
const previousServers = getPreviousServers();
|
||||
const filtered = previousServers.filter((s) => s.address !== serverUrl);
|
||||
storage.set("previousServers", JSON.stringify(filtered));
|
||||
}
|
||||
|
||||
/**
|
||||
* Migrate existing previousServers to new format (add hasCredentials: false).
|
||||
* Should be called on app startup.
|
||||
|
||||
Reference in New Issue
Block a user