UX: Don't show the suspension date if the user is permantently suspended. (#9895)

UX: Don’t show the suspension date if the user is permantently suspended. (#9895)

Use the same pattern used in user.hbs

diff --git a/app/assets/javascripts/discourse/app/templates/components/user-card-contents.hbs b/app/assets/javascripts/discourse/app/templates/components/user-card-contents.hbs
index 239aada..8218fc3 100644
--- a/app/assets/javascripts/discourse/app/templates/components/user-card-contents.hbs
+++ b/app/assets/javascripts/discourse/app/templates/components/user-card-contents.hbs
@@ -125,7 +125,11 @@
             <div class="suspended">
               <div class="suspension-date">
                 {{d-icon "ban"}}
-                {{i18n "user.suspended_notice" date=this.user.suspendedTillDate}}
+                {{#if this.user.suspendedForever}}
+                  {{i18n 'user.suspended_permanently'}}
+                {{else}}
+                  {{i18n 'user.suspended_notice' date=this.user.suspendedTillDate}}
+                {{/if}}
               </div>
               <div class="suspension-reason">
                 <span class="suspension-reason-title">{{i18n "user.suspended_reason"}}</span>

GitHub sha: 207b72ad

1 Like

This commit appears in #9895 which was approved by eviltrout. It was merged by romanrizzi.