Files
spacedrive/interface/util/events.ts
Arnab Chakraborty 645b412ca3 Drag & Drop into/out of Spacedrive (#2849)
* Better drag & drop into the os

* Update drag.rs

* Drag & Drop into Spacedrive from OS

* Re-enable Supertokes & change Drag-rs pointer

* Autoformat
2025-01-10 15:01:44 +03:00

38 lines
629 B
TypeScript

declare global {
interface GlobalEventHandlersEventMap {
keybindexec: KeybindEvent;
deeplink: DeeplinkEvent;
filedrop: FileDropEvent;
}
}
export class KeybindEvent extends CustomEvent<{ action: string }> {
constructor(action: string) {
super('keybindexec', {
detail: {
action
}
});
}
}
export class DeeplinkEvent extends CustomEvent<{ url: string }> {
constructor(url: string) {
super('deeplink', {
detail: {
url
}
});
}
}
export class FileDropEvent extends CustomEvent<{ paths: string[] }> {
constructor(paths: string[]) {
super('filedrop', {
detail: {
paths
}
});
}
}