chore: update

This commit is contained in:
huzibaca
2024-11-08 21:46:15 +08:00
parent 2887a2b6d3
commit c22e4e5e2c
20 changed files with 887 additions and 4 deletions

View File

@@ -236,3 +236,26 @@ export async function getNetworkInterfaces() {
export async function getNetworkInterfacesInfo() {
return invoke<INetworkInterface[]>("get_network_interfaces_info");
}
export async function createWebdavBackup() {
return invoke<void>("create_webdav_backup");
}
export async function saveWebdavConfig(
url: string,
username: string,
password: String
) {
return invoke<void>("save_webdav_config", {
url,
username,
password,
});
}
export async function listWebDavBackup() {
let list: IWebDavFile[] = await invoke<IWebDavFile[]>("list_webdav_backup");
list.map((item) => {
item.filename = item.href.split("/").pop() as string;
});
return list;
}

View File

@@ -744,4 +744,22 @@ interface IVergeConfig {
auto_log_clean?: 0 | 1 | 2 | 3;
proxy_layout_column?: number;
test_list?: IVergeTestItem[];
webdav_url?: string;
webdav_username?: string;
webdav_password?: string;
}
interface IWebDavFile {
filename: string;
href: string;
last_modified: string;
content_length: number;
content_type: string;
tag: string;
}
interface IWebDavConfig {
url: string;
username: string;
password: string;
}