mirror of
https://github.com/discourse/discourse.git
synced 2024-12-06 00:33:43 +08:00
35b748e7f4
This commit fixes a bug where the silence button is incorrectly displayed on the admin page of a staff user. It's not actually possible to silence a staff user because the backend correctly prevents it, but the frontend isn't checking if the button should be displayed. Another small bug that this commit fixes is the similar users list not showing up inside the silence/suspend modals due to also a bug in the frontend. I've also changed the way similar users are loaded so that they're not returned by the `admin/users#show` endpoint anymore and moved them into a new endpoint that the penalize modals (suspend and silence) can call directly to retrieve the list of users. This is done because the similar users list is never shown on the admin user page (`/admin/users/:user_id/:username`); they're only needed when the suspend or silence modals are opened. Internal topic: t/130014.
111 lines
1.9 KiB
SCSS
111 lines
1.9 KiB
SCSS
.silence-user-modal,
|
|
.suspend-user-modal {
|
|
.penalty-duration,
|
|
.penalty-suspend-forever,
|
|
.suspend-reason-title,
|
|
.penalty-reason-controls label,
|
|
.penalty-message-controls label,
|
|
.penalty-post-controls label {
|
|
font-weight: bold;
|
|
}
|
|
|
|
.penalty-reason-visibility,
|
|
.penalty-reason-controls,
|
|
.penalty-similar-users {
|
|
margin-bottom: 0.5em;
|
|
}
|
|
|
|
.penalty-duration-controls,
|
|
.penalty-reason-visibility,
|
|
.penalty-post-controls {
|
|
margin-bottom: 1em;
|
|
}
|
|
|
|
.penalty-duration-controls {
|
|
.future-date-input {
|
|
align-items: end;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
|
|
input {
|
|
height: 34px;
|
|
}
|
|
|
|
.control-group {
|
|
margin-bottom: 0;
|
|
|
|
&:first-child {
|
|
width: 100%;
|
|
|
|
label {
|
|
font-weight: bold;
|
|
}
|
|
|
|
details {
|
|
width: 100%;
|
|
}
|
|
}
|
|
}
|
|
|
|
.future-date-input-date-picker,
|
|
.future-date-input-time-picker {
|
|
align-items: center;
|
|
display: flex;
|
|
margin-left: 0.5em;
|
|
}
|
|
}
|
|
}
|
|
|
|
.penalty-reason-controls {
|
|
input,
|
|
.combo-box {
|
|
width: 100%;
|
|
margin-bottom: 0.5em;
|
|
}
|
|
}
|
|
|
|
.penalty-post-controls {
|
|
.select-kit {
|
|
width: 100%;
|
|
}
|
|
}
|
|
|
|
.penalty-similar-users {
|
|
background-color: var(--primary-very-low);
|
|
padding: 0.5em;
|
|
|
|
.alert {
|
|
margin: 0 0 0.5em 0;
|
|
}
|
|
|
|
.table {
|
|
width: 100%;
|
|
|
|
th,
|
|
td {
|
|
padding: 8px 0px;
|
|
}
|
|
}
|
|
}
|
|
.penalty-history {
|
|
position: sticky;
|
|
bottom: 0;
|
|
background-color: var(--secondary);
|
|
padding: 0 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)
|
|
);
|
|
}
|
|
}
|