Server list
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
|
||||
type KnownServer = {
|
||||
name: string;
|
||||
description: string;
|
||||
publicKey: string;
|
||||
hostname: string;
|
||||
isWss: boolean;
|
||||
};
|
||||
|
||||
export async function saveServerList(servers: KnownServer[]): Promise<void> {
|
||||
await invoke("save_server_list", { servers });
|
||||
}
|
||||
|
||||
export async function getServerList(): Promise<KnownServer[]> {
|
||||
return await invoke("get_server_list");
|
||||
}
|
||||
Reference in New Issue
Block a user