mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-04-25 12:19:10 +00:00
add user's roles to GM presentation
This commit is contained in:
parent
998b1930b3
commit
a4c15f2d78
2 changed files with 3 additions and 1 deletions
|
@ -5,6 +5,7 @@ export type Category = {
|
||||||
hidden: boolean,
|
hidden: boolean,
|
||||||
name: string,
|
name: string,
|
||||||
roles: string[],
|
roles: string[],
|
||||||
|
_roles?: any,
|
||||||
type: 'single' | 'multi' | string
|
type: 'single' | 'multi' | string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -94,7 +94,8 @@ class PresentationService extends Service {
|
||||||
id: server.id,
|
id: server.id,
|
||||||
gm: {
|
gm: {
|
||||||
nickname: gm.nickname || gm.user.username,
|
nickname: gm.nickname || gm.user.username,
|
||||||
color: gm.displayHexColor
|
color: gm.displayHexColor,
|
||||||
|
roles: gm.roles.keyArray()
|
||||||
},
|
},
|
||||||
server: this.serverSlug(server),
|
server: this.serverSlug(server),
|
||||||
roles: (incRoles) ? (await this.rolesByServer(server, sd)).map(r => ({ ...r, selected: gm.roles.has(r.id) })) : [],
|
roles: (incRoles) ? (await this.rolesByServer(server, sd)).map(r => ({ ...r, selected: gm.roles.has(r.id) })) : [],
|
||||||
|
|
Loading…
Add table
Reference in a new issue