mirror of https://github.com/zulip/zulip.git
settings: Remove profile picture header in the profile section.
This commit removes the profile picture header and adds an overlay to handle disabled avatar changes in an organization.
This commit is contained in:
parent
6296df6492
commit
103db2afaf
|
@ -109,11 +109,11 @@
|
|||
.user-avatar-section,
|
||||
.realm-logo-section,
|
||||
.realm-icon-section {
|
||||
margin-bottom: 20px;
|
||||
margin: 0 20px 20px 0;
|
||||
position: relative;
|
||||
|
||||
.inline-block {
|
||||
margin: 5px 20px 0 0;
|
||||
margin-top: 15px;
|
||||
vertical-align: top;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
@ -127,6 +127,15 @@
|
|||
z-index: 99;
|
||||
}
|
||||
|
||||
.image-disabled-text {
|
||||
color: hsl(0, 0%, 85%);
|
||||
cursor: not-allowed;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
visibility: hidden;
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
.image-delete-button {
|
||||
font-size: 3rem;
|
||||
}
|
||||
|
@ -155,6 +164,12 @@
|
|||
height: 200px;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
.image-disabled-text {
|
||||
visibility: visible;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#user-avatar-source {
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
<div id ="{{widget}}-upload-widget" class="inline-block image_upload_widget">
|
||||
<div id="{{widget}}-upload-widget" class="inline-block image_upload_widget">
|
||||
<div class="image-disabled {{#if is_editable_by_current_user}}hide{{/if}}">
|
||||
<div class="image-upload-background"></div>
|
||||
<span class="image-disabled-text flex" aria-label="{{ disabled_text }}" role="button" tabindex="0">
|
||||
{{ disabled_text }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="image_upload_button {{#unless is_editable_by_current_user}}hide{{/unless}}">
|
||||
<div class="image-upload-background"></div>
|
||||
<button class="image-delete-button" aria-label="{{ delete_text }}" role="button" tabindex="0">
|
||||
|
|
|
@ -53,17 +53,11 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="inline-block user-avatar-section">
|
||||
<h3>
|
||||
{{t "Profile picture" }}
|
||||
<i class="fa fa-question-circle change_name_tooltip tippy-zulip-tooltip settings-info-icon"
|
||||
{{#if user_can_change_avatar}}style="display:none"{{/if}}
|
||||
data-tippy-content="{{t 'Avatar changes are disabled in this organization.' }}">
|
||||
</i>
|
||||
</h3>
|
||||
{{> image_upload_widget
|
||||
widget = "user-avatar"
|
||||
upload_text = (t "Upload new profile picture")
|
||||
delete_text = (t "Delete profile picture")
|
||||
disabled_text = (t "Avatar changes are disabled in this organization")
|
||||
is_editable_by_current_user = user_can_change_avatar
|
||||
image = page_params.avatar_url_medium}}
|
||||
<div id="user-avatar-source">
|
||||
|
|
Loading…
Reference in New Issue