Skip to content

Commit

Permalink
web/admin: add notes for users and groups
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
  • Loading branch information
BeryJu committed May 3, 2023
1 parent a299421 commit c762625
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
14 changes: 14 additions & 0 deletions web/src/admin/groups/GroupViewPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,20 @@ export class GroupViewPage extends AKElement {
</ak-forms-modal>
</div>
</div>
<div
class="pf-c-card pf-l-grid__item pf-m-12-col pf-m-9-col-on-xl pf-m-9-col-on-2xl"
>
<div class="pf-c-card__title">${t`Notes`}</div>
<div class="pf-c-card__body">
${Object.hasOwn(this.group?.attributes || {}, "notes")
? html`${this.group.attributes?.notes}`
: html`
<p>
${t`Edit the notes attribute of this group to add notes here. Markdown is supported.`}
</p>
`}
</div>
</div>
<div
class="pf-c-card pf-l-grid__item pf-m-12-col pf-m-12-col-on-xl pf-m-12-col-on-2xl"
>
Expand Down
16 changes: 15 additions & 1 deletion web/src/admin/users/UserViewPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,21 @@ export class UserViewPage extends AKElement {
</div>
</div>
<div
class="pf-c-card pf-l-grid__item pf-m-12-col pf-m-12-col-on-xl pf-m-12-col-on-2xl"
class="pf-c-card pf-l-grid__item pf-m-12-col pf-m-3-col-on-xl pf-m-3-col-on-2xl"
>
<div class="pf-c-card__title">${t`Notes`}</div>
<div class="pf-c-card__body">
${Object.hasOwn(this.user?.attributes || {}, "notes")
? html`${this.user.attributes?.notes}`
: html`
<p>
${t`Edit the notes attribute of this user to add notes here. Markdown is supported.`}
</p>
`}
</div>
</div>
<div
class="pf-c-card pf-l-grid__item pf-m-12-col pf-m-9-col-on-xl pf-m-9-col-on-2xl"
>
<div class="pf-c-card__title">${t`Changelog`}</div>
<div class="pf-c-card__body">
Expand Down

0 comments on commit c762625

Please sign in to comment.