forked from XiaoMo/ChatGPT-Next-Web
64a17abfe2
[+] feat(global.d.ts): add support for window.__TAURI__.notification methods [+] feat(update.ts): add notification for new version availability [+] fix(Cargo.toml): add tauri feature "notification-all" to enable notifications [+] fix(tauri.conf.json): enable all notification features in tauri configuration
23 lines
516 B
TypeScript
23 lines
516 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>;
|
|
notification:{
|
|
requestPermission(): Promise<Permission>;
|
|
isPermissionGranted(): Promise<boolean>;
|
|
sendNotification(options: string | Options): void;
|
|
};
|
|
};
|
|
}
|