feat: profile item adjust

This commit is contained in:
GyDi committed 2022-03-05 19:04:20 +08:00
1 parent b758ead371
commit 83bf67b8ca
10 files changed
+262 -108

No files matched your search

+2 -2
View File
@@ -9,8 +9,8 @@ export async function syncProfiles() {
return invoke<void>("sync_profiles");
}
export async function newProfile(name: string, desc: string) {
return invoke<void>("new_profile", { name, desc });
export async function createProfile(item: Partial<CmdType.ProfileItem>) {
return invoke<void>("create_profile", { item });
}
export async function viewProfile(index: string) {
+3 -1
View File
@@ -78,6 +78,8 @@ export namespace ApiType {
* Some interface for command
*/
export namespace CmdType {
export type ProfileType = "local" | "remote" | "merge" | "script";
export interface ClashInfo {
status: string;
port?: string;
@@ -87,7 +89,7 @@ export namespace CmdType {
export interface ProfileItem {
uid: string;
type?: string;
type?: ProfileType | string;
name?: string;
desc?: string;
file?: string;