mirror of
https://github.com/infinilabs/coco-app.git
synced 2026-09-02 12:15:39 +02:00
* feat: impl Coco server related APIs * chore: remove unused method * fix: invoke Rust interfaces in tauri::run() * chore: add invoke * feat: add add_coco_server * fix: trim the tailing forward slash * feat: interface get_user_profiles * chore: add * fix: store the servers in add interface * chore: ass * fix: skip non-publich servers with no token * feat: add * feat: get datasources and connectors * fix: invoke interfaces in tauri::run() * chore: add SidebarRef * refactor: refactoring coco-app * refactor: refactoring coco app * refactor: refactoring project layout * refactor: refactoring server management * chore: cleanup code * chore: display error when connect failed * refactor: refactoring refresh server's info * refactor: refactoring how to connect the coco serverg * chore: rename to cloud * refactor: refactoring remove coco server * fix: refresh current selected server * fix: reset server selection * chore: update login status * feat: add error message tips * fix: fix login and logout * refactor: refactoring http client * fix: fix the datasources * chore: minor fix * refactor: refactoring code * fix: fix search api * chore: optimize part of icons * chore: fix build * refactor: search list icon * refactor: search list icon * chore: lib * feat: add plugin-os --------- Co-authored-by: rain <15911122312@163.com> Co-authored-by: medcl <m@medcl.net>
57 lines
1.4 KiB
TypeScript
57 lines
1.4 KiB
TypeScript
declare namespace I {
|
|
export type AppConf = {
|
|
theme: "light" | "dark" | "auto";
|
|
stay_on_top: boolean;
|
|
ask_mode: boolean;
|
|
mac_header_hidden: boolean;
|
|
};
|
|
|
|
export interface SVG extends React.SVGProps<SVGSVGElement> {
|
|
children?: React.ReactNode;
|
|
size?: number;
|
|
title?: string;
|
|
action?: boolean;
|
|
onClick?: (e: React.MouseEvent) => void;
|
|
}
|
|
}
|
|
|
|
declare global {
|
|
interface Window {
|
|
__TAURI__: Record<string, unknown>;
|
|
__TAURI_INTERNALS__?: any;
|
|
__TAURI_OS_PLUGIN_INTERNALS__?: any;
|
|
}
|
|
}
|
|
|
|
declare interface Window {
|
|
__TAURI__?: {
|
|
writeText(text: string): Promise<void>;
|
|
invoke(command: string, payload?: Record<string, unknown>): Promise<any>;
|
|
dialog: {
|
|
save(options?: Record<string, unknown>): Promise<string | null>;
|
|
};
|
|
fs: {
|
|
writeBinaryFile(path: string, data: Uint8Array): Promise<void>;
|
|
writeTextFile(path: string, data: string): Promise<void>;
|
|
};
|
|
notification: {
|
|
requestPermission(): Promise<Permission>;
|
|
isPermissionGranted(): Promise<boolean>;
|
|
sendNotification(options: string | Options): void;
|
|
};
|
|
updater: {
|
|
checkUpdate(): Promise<UpdateResult>;
|
|
installUpdate(): Promise<void>;
|
|
onUpdaterEvent(
|
|
handler: (status: UpdateStatusResult) => void,
|
|
): Promise<UnlistenFn>;
|
|
};
|
|
http: {
|
|
fetch<T>(
|
|
url: string,
|
|
options?: Record<string, unknown>,
|
|
): Promise<Response<T>>;
|
|
};
|
|
};
|
|
}
|