mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-24 20:14:35 -04:00
feat(realtime): synchronize and show realtime activity state
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
9497726a7c
commit
598fc8ee11
10 changed files with 85 additions and 17 deletions
|
@ -16,6 +16,8 @@ export enum MessageType {
|
|||
REALTIME_USER_STATE_SET = 'REALTIME_USER_STATE_SET',
|
||||
REALTIME_USER_SINGLE_UPDATE = 'REALTIME_USER_SINGLE_UPDATE',
|
||||
REALTIME_USER_STATE_REQUEST = 'REALTIME_USER_STATE_REQUEST',
|
||||
REALTIME_USER_SET_ACTIVITY = 'REALTIME_USER_SET_ACTIVITY',
|
||||
|
||||
READY = 'READY'
|
||||
}
|
||||
|
||||
|
@ -30,6 +32,10 @@ export interface MessagePayloads {
|
|||
}
|
||||
}
|
||||
[MessageType.REALTIME_USER_SINGLE_UPDATE]: RemoteCursor
|
||||
|
||||
[MessageType.REALTIME_USER_SET_ACTIVITY]: {
|
||||
active: boolean
|
||||
}
|
||||
}
|
||||
|
||||
export type Message<T extends MessageType> = T extends keyof MessagePayloads
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue