DEV: Add primary group class to user summary page (#12809)

This commit is contained in:
Jeff Wong 2021-04-22 13:11:15 -10:00 committed by GitHub
parent e01d5f80b4
commit 4b8d23c0d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -154,6 +154,13 @@ export default Controller.extend(CanCheckEmails, {
}
},
@discourseComputed("model.primary_group_name")
primaryGroup(group) {
if (group) {
return `group-${group}`;
}
},
userNotificationLevel: computed(
"currentUser.ignored_ids",
"model.ignored",

View File

@ -1,5 +1,5 @@
{{plugin-outlet name="above-user-profile" tagName="" args=(hash model=model)}}
<div class="container {{if viewingSelf "viewing-self"}} {{if model.profile_hidden "profile-hidden"}}">
<div class="container {{if viewingSelf "viewing-self"}} {{if model.profile_hidden "profile-hidden"}} {{primaryGroup}}">
{{#d-section class="user-main"}}
<section class="{{if collapsedInfo "collapsed-info"}} about {{if hasProfileBackgroundUrl "has-background" "no-background"}}" >
{{#unless collapsedInfo}}