mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
add file chooser upload.
This commit is contained in:
parent
ed197d5c76
commit
224a84d082
@ -22,6 +22,9 @@ export interface NekoEvents {
|
|||||||
['screen.updated']: (width: number, height: number, rate: number) => void
|
['screen.updated']: (width: number, height: number, rate: number) => void
|
||||||
['clipboard.updated']: (text: string) => void
|
['clipboard.updated']: (text: string) => void
|
||||||
['broadcast.status']: (isActive: boolean, url: string | undefined) => void
|
['broadcast.status']: (isActive: boolean, url: string | undefined) => void
|
||||||
|
['file_chooser_dialog.requested']: () => void
|
||||||
|
['file_chooser_dialog.overlay']: (id: string) => void
|
||||||
|
['file_chooser_dialog.closed']: () => void
|
||||||
}
|
}
|
||||||
|
|
||||||
export class NekoMessages extends EventEmitter<NekoEvents> {
|
export class NekoMessages extends EventEmitter<NekoEvents> {
|
||||||
@ -173,4 +176,23 @@ export class NekoMessages extends EventEmitter<NekoEvents> {
|
|||||||
// TODO: Handle.
|
// TODO: Handle.
|
||||||
this.emit('broadcast.status', is_active, url)
|
this.emit('broadcast.status', is_active, url)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/////////////////////////////
|
||||||
|
// FileChooserDialog Events
|
||||||
|
/////////////////////////////
|
||||||
|
|
||||||
|
protected [EVENT.FILE_CHOOSER_DIALOG_OPENED]({ id }: message.MemberID) {
|
||||||
|
this._log.debug('EVENT.FILE_CHOOSER_DIALOG_OPENED')
|
||||||
|
|
||||||
|
if (id == this.state.member_id) {
|
||||||
|
this.emit('file_chooser_dialog.requested')
|
||||||
|
} else {
|
||||||
|
this.emit('file_chooser_dialog.overlay', id)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected [EVENT.FILE_CHOOSER_DIALOG_CLOSED]({ id }: message.MemberID) {
|
||||||
|
this._log.debug('EVENT.FILE_CHOOSER_DIALOG_CLOSED')
|
||||||
|
this.emit('file_chooser_dialog.closed')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,3 +31,6 @@ export const KEYBOARD_MAP = 'keyboard/map'
|
|||||||
export const CURSOR_IMAGE = 'cursor/image'
|
export const CURSOR_IMAGE = 'cursor/image'
|
||||||
|
|
||||||
export const BORADCAST_STATUS = 'broadcast/status'
|
export const BORADCAST_STATUS = 'broadcast/status'
|
||||||
|
|
||||||
|
export const FILE_CHOOSER_DIALOG_OPENED = 'file_chooser_dialog/opened'
|
||||||
|
export const FILE_CHOOSER_DIALOG_CLOSED = 'file_chooser_dialog/closed'
|
||||||
|
Loading…
Reference in New Issue
Block a user