mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
use REST API.
This commit is contained in:
parent
ad9bdd609e
commit
deae203803
@ -196,35 +196,39 @@
|
|||||||
Vue.set(this.state.control.scroll, 'sensitivity', value)
|
Vue.set(this.state.control.scroll, 'sensitivity', value)
|
||||||
}
|
}
|
||||||
|
|
||||||
public setClipboardData(value: number) {
|
public setClipboardData(text: string) {
|
||||||
// TODO: Via REST API.
|
const clipboardPayload = { text }
|
||||||
|
this.api.host.clipboardWrite({ clipboardPayload })
|
||||||
}
|
}
|
||||||
|
|
||||||
public requestControl() {
|
public requestControl() {
|
||||||
// TODO: Via REST API.
|
this.api.user.controlRequest()
|
||||||
this.websocket.send('control/request')
|
//this.websocket.send('control/request')
|
||||||
}
|
}
|
||||||
|
|
||||||
public releaseControl() {
|
public releaseControl() {
|
||||||
// TODO: Via REST API.
|
this.api.user.controlRelease()
|
||||||
this.websocket.send('control/release')
|
//this.websocket.send('control/release')
|
||||||
}
|
}
|
||||||
|
|
||||||
public takeControl() {
|
public takeControl() {
|
||||||
// TODO: Via REST API.
|
this.api.admin.controlTake()
|
||||||
|
//this.websocket.send('control/take')
|
||||||
}
|
}
|
||||||
|
|
||||||
public giveControl(id: string) {
|
public giveControl(id: string) {
|
||||||
// TODO: Via REST API.
|
const controlTargetPayload = { id }
|
||||||
|
this.api.admin.controlGive({ controlTargetPayload })
|
||||||
|
//this.websocket.send('control/give', { id })
|
||||||
}
|
}
|
||||||
|
|
||||||
public resetControl() {
|
public resetControl() {
|
||||||
// TODO: Via REST API.
|
this.api.admin.controlReset()
|
||||||
}
|
}
|
||||||
|
|
||||||
public setScreenSize(width: number, height: number, rate: number) {
|
public setScreenSize(width: number, height: number, rate: number) {
|
||||||
// TODO: Via REST API.
|
this.api.admin.screenConfigurationChange({ screenConfigurationPayload: { width, height, rate } })
|
||||||
this.websocket.send('screen/set', { width, height, rate })
|
//this.websocket.send('screen/set', { width, height, rate })
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
|
Loading…
Reference in New Issue
Block a user