forked from XiaoMo/ChatGPT-Next-Web
d2ad01a9ff
[+] fix(exporter.tsx): add async keyword to download function [+] feat(exporter.tsx): add support for saving image file using window.__TAURI__ API [+] feat(global.d.ts): add types for window.__TAURI__ API methods [+] feat(locales): add translations for download success and failure messages [+] feat(sync.ts): add support for generating backup file name with date and time [+] fix(utils.ts): add async keyword to downloadAs function and add support for saving file using window.__TAURI__ API
30 lines
773 B
TypeScript
30 lines
773 B
TypeScript
declare module "*.jpg";
|
|
declare module "*.png";
|
|
declare module "*.woff2";
|
|
declare module "*.woff";
|
|
declare module "*.ttf";
|
|
declare module "*.scss" {
|
|
const content: Record<string, string>;
|
|
export default content;
|
|
}
|
|
|
|
declare module "*.svg";
|
|
|
|
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>;
|
|
};
|
|
notification:{
|
|
requestPermission(): Promise<Permission>;
|
|
isPermissionGranted(): Promise<boolean>;
|
|
sendNotification(options: string | Options): void;
|
|
};
|
|
};
|
|
}
|