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

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

diff --git a/app/assets/javascripts/discourse/app/controllers/user.js b/app/assets/javascripts/discourse/app/controllers/user.js
index c8c93be..5bb235b 100644
--- a/app/assets/javascripts/discourse/app/controllers/user.js
+++ b/app/assets/javascripts/discourse/app/controllers/user.js
@@ -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",
diff --git a/app/assets/javascripts/discourse/app/templates/user.hbs b/app/assets/javascripts/discourse/app/templates/user.hbs
index 67ab839..785d5c8 100644
--- a/app/assets/javascripts/discourse/app/templates/user.hbs
+++ b/app/assets/javascripts/discourse/app/templates/user.hbs
@@ -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}}

GitHub sha: 4b8d23c0

This commit appears in #12809 which was approved by martin. It was merged by featheredtoast.