update member data interface.

This commit is contained in:
Miroslav Šedivý 2020-12-02 18:17:07 +01:00
parent 38703f89b6
commit 3df2c028cd
3 changed files with 36 additions and 11 deletions

View File

@ -224,8 +224,17 @@
this.websocket.send('screen/set', { width, height, rate })
}
public memberCreate({ id, secret, name, isAdmin }: { id: string; secret: string; name: string; isAdmin: boolean }) {
const memberDataPayload = { id, secret, name, isAdmin }
public memberCreate(memberDataPayload: {
id: string
secret: string
name: string
isAdmin: boolean
canLogin: boolean
canConnect: boolean
canWatch: boolean
canHost: boolean
canAccessClipboard: boolean
}) {
this.api.admin.membersCreate({ memberDataPayload })
}

View File

@ -53,12 +53,22 @@ export interface MemberID {
id: string
}
// TODO: New.
export interface MemberProfile {
name: string
is_admin: boolean
can_login: boolean
can_connect: boolean
can_watch: boolean
can_host: boolean
can_access_clipboard: boolean
}
export interface MemberData {
event: string | undefined
id: string
name: string
is_admin: boolean
profile: MemberProfile
is_connected: boolean
is_receiving: boolean
}
/////////////////////////////

View File

@ -66,13 +66,19 @@ export interface ScreenSize {
/////////////////////////////
// Member
/////////////////////////////
export interface Member {
id: string
export interface MemberProfile {
name: string
is_admin: boolean
is_watching: boolean
is_controlling: boolean
can_login: boolean
can_connect: boolean
can_watch: boolean
can_control: boolean
clipboard_access: boolean
can_host: boolean
can_access_clipboard: boolean
}
export interface Member {
id: string
profile: MemberProfile
is_connected: boolean
is_receiving: boolean
}