UX: Set penalty history to sticky (#19933)

This commit is contained in:
Jordan Vidrine 2023-01-23 07:14:23 -06:00 committed by GitHub
parent d0c820e816
commit b26e0dcf35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 1 deletions

View File

@ -57,7 +57,6 @@
/>
{{/if}}
<div class="penalty-history">{{html-safe this.penaltyHistory}}</div>
{{else}}
{{#if (eq this.penaltyType "suspend")}}
<div class="cant-suspend">{{i18n "admin.user.cant_suspend"}}</div>
@ -65,6 +64,7 @@
<div class="cant-silence">{{i18n "admin.user.cant_silence"}}</div>
{{/if}}
{{/if}}
<div class="penalty-history">{{html-safe this.penaltyHistory}}</div>
</ConditionalLoadingSpinner>
</DModalBody>

View File

@ -1,5 +1,8 @@
.silence-user-modal,
.suspend-user-modal {
.modal-body {
padding-bottom: 0em;
}
.penalty-duration,
.penalty-suspend-forever,
.suspend-reason-title,
@ -87,4 +90,24 @@
}
}
}
.penalty-history {
position: sticky;
bottom: 0;
background-color: var(--secondary);
padding: 0.5em 0 1em 0;
}
.penalty-history::before {
position: absolute;
content: "";
display: block;
height: 1.5em;
top: -1.5em;
width: 100%;
pointer-events: none;
background: linear-gradient(
to bottom,
rgba(var(--secondary-rgb), 0),
rgba(var(--secondary-rgb), 1)
);
}
}