diff --git a/packages/backend/src/core/entities/UserEntityService.ts b/packages/backend/src/core/entities/UserEntityService.ts index 9a90aec45..6b754150c 100644 --- a/packages/backend/src/core/entities/UserEntityService.ts +++ b/packages/backend/src/core/entities/UserEntityService.ts @@ -448,6 +448,14 @@ export class UserEntityService implements OnModuleInit { userId: user.id, }).then(result => result >= 1) : false, + roles: this.roleService.getUserRoles(user.id).then(roles => roles.filter(role => role.isPublic).map(role => ({ + id: role.id, + name: role.name, + color: role.color, + description: role.description, + isModerator: role.isModerator, + isAdministrator: role.isAdministrator, + }))), } : {}), ...(opts.detail && isMe ? { diff --git a/packages/frontend/src/pages/user/home.vue b/packages/frontend/src/pages/user/home.vue index eea4d2009..0af86be59 100644 --- a/packages/frontend/src/pages/user/home.vue +++ b/packages/frontend/src/pages/user/home.vue @@ -38,6 +38,9 @@ +
{{ i18n.ts.noAccountDescription }}
@@ -337,6 +340,18 @@ onUnmounted(() => { box-shadow: 1px 1px 3px rgba(#000, 0.2); } + > .roles { + padding: 24px 24px 0 154px; + font-size: 0.95em; + + > .role { + border: solid 1px var(--color, var(--divider)); + border-radius: 999px; + margin-right: 4px; + padding: 3px 8px; + } + } + > .description { padding: 24px 24px 24px 154px; font-size: 0.95em; @@ -467,6 +482,11 @@ onUnmounted(() => { margin: auto; } + > .roles { + padding: 16px 16px 0 16px; + text-align: center; + } + > .description { padding: 16px; text-align: center;