mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
overlay fix naming.
This commit is contained in:
parent
edabf74e2a
commit
b9bd4d2b8f
@ -14,10 +14,10 @@
|
|||||||
: ''
|
: ''
|
||||||
"
|
"
|
||||||
:implicitControl="state.control.implicit_hosting && state.sessions[state.session_id].profile.can_host"
|
:implicitControl="state.control.implicit_hosting && state.sessions[state.session_id].profile.can_host"
|
||||||
@implicit-control-request="connection.websocket.send('control/request')"
|
@implicitControlRequest="connection.websocket.send('control/request')"
|
||||||
@implicit-control-release="connection.websocket.send('control/release')"
|
@implicitControlRelease="connection.websocket.send('control/release')"
|
||||||
@update-kbd-modifiers="updateKeyboardModifiers($event)"
|
@updateKeyboardModifiers="updateKeyboardModifiers($event)"
|
||||||
@drop-files="uploadDrop($event)"
|
@uploadDrop="uploadDrop($event)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -284,7 +284,7 @@
|
|||||||
this.focused = true
|
this.focused = true
|
||||||
|
|
||||||
if (this.isControling) {
|
if (this.isControling) {
|
||||||
this.updateKbdModifiers(e)
|
this.updateKeyboardModifiers(e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -292,8 +292,8 @@
|
|||||||
if (this.isControling) {
|
if (this.isControling) {
|
||||||
this.keyboard.reset()
|
this.keyboard.reset()
|
||||||
|
|
||||||
// save current kbd modifiers state
|
// save current keyboard modifiers state
|
||||||
Vue.set(this, 'kbdModifiers', {
|
Vue.set(this, 'keyboardModifiers', {
|
||||||
capslock: e.getModifierState('CapsLock'),
|
capslock: e.getModifierState('CapsLock'),
|
||||||
numlock: e.getModifierState('NumLock'),
|
numlock: e.getModifierState('NumLock'),
|
||||||
})
|
})
|
||||||
@ -323,7 +323,7 @@
|
|||||||
const files = await getFilesFromDataTansfer(dt)
|
const files = await getFilesFromDataTansfer(dt)
|
||||||
if (files.length === 0) return
|
if (files.length === 0) return
|
||||||
|
|
||||||
this.$emit('drop-files', { ...this.getMousePos(e.clientX, e.clientY), files })
|
this.$emit('uploadDrop', { ...this.getMousePos(e.clientX, e.clientY), files })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -331,18 +331,18 @@
|
|||||||
// keyboard modifiers
|
// keyboard modifiers
|
||||||
//
|
//
|
||||||
|
|
||||||
private kbdModifiers: { capslock: boolean; numlock: boolean } | null = null
|
private keyboardModifiers: { capslock: boolean; numlock: boolean } | null = null
|
||||||
|
|
||||||
updateKbdModifiers(e: MouseEvent) {
|
updateKeyboardModifiers(e: MouseEvent) {
|
||||||
const capslock = e.getModifierState('CapsLock')
|
const capslock = e.getModifierState('CapsLock')
|
||||||
const numlock = e.getModifierState('NumLock')
|
const numlock = e.getModifierState('NumLock')
|
||||||
|
|
||||||
if (
|
if (
|
||||||
this.kbdModifiers === null ||
|
this.keyboardModifiers === null ||
|
||||||
this.kbdModifiers.capslock !== capslock ||
|
this.keyboardModifiers.capslock !== capslock ||
|
||||||
this.kbdModifiers.numlock !== numlock
|
this.keyboardModifiers.numlock !== numlock
|
||||||
) {
|
) {
|
||||||
this.$emit('update-kbd-modifiers', { capslock, numlock })
|
this.$emit('updateKeyboardModifiers', { capslock, numlock })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -439,10 +439,10 @@
|
|||||||
|
|
||||||
@Watch('isControling')
|
@Watch('isControling')
|
||||||
onControlChange(isControling: boolean) {
|
onControlChange(isControling: boolean) {
|
||||||
Vue.set(this, 'kbdModifiers', null)
|
Vue.set(this, 'keyboardModifiers', null)
|
||||||
|
|
||||||
if (isControling && this.reqMouseDown) {
|
if (isControling && this.reqMouseDown) {
|
||||||
this.updateKbdModifiers(this.reqMouseDown)
|
this.updateKeyboardModifiers(this.reqMouseDown)
|
||||||
this.setMousePos(this.reqMouseDown)
|
this.setMousePos(this.reqMouseDown)
|
||||||
this.webrtc.send('mousedown', { key: this.reqMouseDown.button + 1 })
|
this.webrtc.send('mousedown', { key: this.reqMouseDown.button + 1 })
|
||||||
}
|
}
|
||||||
@ -464,7 +464,7 @@
|
|||||||
implicitControlRequest(e: MouseEvent) {
|
implicitControlRequest(e: MouseEvent) {
|
||||||
if (this.implicitControl && e.type === 'mousedown' && this.reqMouseDown == null) {
|
if (this.implicitControl && e.type === 'mousedown' && this.reqMouseDown == null) {
|
||||||
this.reqMouseDown = e
|
this.reqMouseDown = e
|
||||||
this.$emit('implicit-control-request')
|
this.$emit('implicitControlRequest')
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.implicitControl && e.type === 'mouseup' && this.reqMouseUp == null) {
|
if (this.implicitControl && e.type === 'mouseup' && this.reqMouseUp == null) {
|
||||||
@ -475,7 +475,7 @@
|
|||||||
// unused
|
// unused
|
||||||
implicitControlRelease() {
|
implicitControlRelease() {
|
||||||
if (this.implicitControl) {
|
if (this.implicitControl) {
|
||||||
this.$emit('implicit-control-release')
|
this.$emit('implicitControlRelease')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user