UX: user-card adjustments for users with hidden profiles (#7293)
* adds styles for profile hidden message * Disable profile links for hidden profiles and add message to indicate the profile is hidden
This commit is contained in:
parent
8794d940d3
commit
541a15e357
|
@ -3,7 +3,11 @@
|
||||||
|
|
||||||
<div class="card-row first-row">
|
<div class="card-row first-row">
|
||||||
<div class="user-card-avatar">
|
<div class="user-card-avatar">
|
||||||
|
{{#if user.profile_hidden}}
|
||||||
|
<span class="card-huge-avatar">{{bound-avatar user "huge"}}</span>
|
||||||
|
{{else}}
|
||||||
<a href {{action "showUser" user}} class="card-huge-avatar">{{bound-avatar user "huge"}}</a>
|
<a href {{action "showUser" user}} class="card-huge-avatar">{{bound-avatar user "huge"}}</a>
|
||||||
|
{{/if}}
|
||||||
{{#if user.primary_group_name}}
|
{{#if user.primary_group_name}}
|
||||||
{{avatar-flair
|
{{avatar-flair
|
||||||
flairURL=user.primary_group_flair_url
|
flairURL=user.primary_group_flair_url
|
||||||
|
@ -16,10 +20,17 @@
|
||||||
<div class="names">
|
<div class="names">
|
||||||
<span>
|
<span>
|
||||||
<h1 class="{{staff}} {{newUser}} {{if nameFirst "full-name" "username"}}">
|
<h1 class="{{staff}} {{newUser}} {{if nameFirst "full-name" "username"}}">
|
||||||
|
{{#if user.profile_hidden}}
|
||||||
|
<span>
|
||||||
|
{{if nameFirst user.name (format-username username)}}
|
||||||
|
{{user-status user currentUser=currentUser}}
|
||||||
|
</span>
|
||||||
|
{{else}}
|
||||||
<a href {{action "showUser" user}} class='user-profile-link'>
|
<a href {{action "showUser" user}} class='user-profile-link'>
|
||||||
{{if nameFirst user.name (format-username username)}}
|
{{if nameFirst user.name (format-username username)}}
|
||||||
{{user-status user currentUser=currentUser}}
|
{{user-status user currentUser=currentUser}}
|
||||||
</a>
|
</a>
|
||||||
|
{{/if}}
|
||||||
</h1>
|
</h1>
|
||||||
{{plugin-outlet name="user-card-after-username" args=(hash user=user showUser=(action "showUser" user)) tagName=''}}
|
{{plugin-outlet name="user-card-after-username" args=(hash user=user showUser=(action "showUser" user)) tagName=''}}
|
||||||
{{#unless nameFirst}}
|
{{#unless nameFirst}}
|
||||||
|
@ -82,6 +93,14 @@
|
||||||
tagName=""}}
|
tagName=""}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{#if user.profile_hidden}}
|
||||||
|
<div class="card-row second-row">
|
||||||
|
<div class='profile-hidden'>
|
||||||
|
<span>{{i18n "user.profile_hidden"}}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{#if isSuspendedOrHasBio}}
|
{{#if isSuspendedOrHasBio}}
|
||||||
<div class="card-row second-row">
|
<div class="card-row second-row">
|
||||||
{{#if user.suspend_reason}}
|
{{#if user.suspend_reason}}
|
||||||
|
@ -126,7 +145,7 @@
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if user}}
|
{{#if user.time_read}}
|
||||||
<div class="card-row fourth-row">
|
<div class="card-row fourth-row">
|
||||||
{{#unless user.profile_hidden}}
|
{{#unless user.profile_hidden}}
|
||||||
<div class="metadata">
|
<div class="metadata">
|
||||||
|
|
|
@ -136,6 +136,10 @@ $avatar_margin: -50px; // negative margin makes avatars extend above cards
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.profile-hidden {
|
||||||
|
font-size: $font-up-1;
|
||||||
|
margin-top: 0.5em;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// location and website
|
// location and website
|
||||||
.third-row {
|
.third-row {
|
||||||
|
|
Loading…
Reference in New Issue