new WS ControlRequest data type

This commit is contained in:
Miroslav Šedivý
2020-06-15 22:26:47 +02:00
parent c176411512
commit 70e8b215cb
5 changed files with 20 additions and 3 deletions

View File

@ -29,6 +29,7 @@ export type WebSocketPayloads =
| MemberListPayload
| Member
| ControlPayload
| ControlRequestPayload
| ControlClipboardPayload
| ChatPayload
| ChatSendPayload
@ -111,6 +112,10 @@ export interface ControlPayload {
id: string
}
export interface ControlRequestPayload {
keyboard_layout: string
}
export interface ControlTargetPayload {
id: string
target: string

View File

@ -64,7 +64,7 @@ export const actions = actionTree(
}
if (!getters.hosting) {
$client.sendMessage(EVENT.CONTROL.REQUEST)
$client.sendMessage(EVENT.CONTROL.REQUEST, { keyboard_layout: accessor.settings.keyboard_layout })
} else {
$client.sendMessage(EVENT.CONTROL.RELEASE)
}