mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
sync user's clipboard.
This commit is contained in:
parent
e65c10005e
commit
0aae212c1f
@ -269,6 +269,7 @@ export class NekoMessages extends EventEmitter<NekoEvents> {
|
|||||||
protected [EVENT.CLIPBOARD_UPDATED]({ text }: message.ClipboardData) {
|
protected [EVENT.CLIPBOARD_UPDATED]({ text }: message.ClipboardData) {
|
||||||
this._localLog.debug(`EVENT.CLIPBOARD_UPDATED`)
|
this._localLog.debug(`EVENT.CLIPBOARD_UPDATED`)
|
||||||
Vue.set(this._state.control, 'clipboard', { text })
|
Vue.set(this._state.control, 'clipboard', { text })
|
||||||
|
navigator.clipboard.writeText(text) // sync user's clipboard
|
||||||
this.emit('room.clipboard.updated', text)
|
this.emit('room.clipboard.updated', text)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user