Add ability to view previous edits of a status in admin UI (#19462)

* Add ability to view previous edits of a status in admin UI

* Change moderator access to posts to be controlled by a separate policy
This commit is contained in:
Eugen Rochko
2022-10-26 13:42:29 +02:00
committed by GitHub
parent dee69be60e
commit f8ca3bb2a1
16 changed files with 232 additions and 55 deletions

View File

@ -323,7 +323,7 @@ class StatusActionBar extends ImmutablePureComponent {
if ((this.context.identity.permissions & PERMISSION_MANAGE_USERS) === PERMISSION_MANAGE_USERS) {
menu.push(null);
menu.push({ text: intl.formatMessage(messages.admin_account, { name: account.get('username') }), href: `/admin/accounts/${status.getIn(['account', 'id'])}` });
menu.push({ text: intl.formatMessage(messages.admin_status), href: `/admin/accounts/${status.getIn(['account', 'id'])}/statuses?id=${status.get('id')}` });
menu.push({ text: intl.formatMessage(messages.admin_status), href: `/admin/accounts/${status.getIn(['account', 'id'])}/statuses/${status.get('id')}` });
}
}

View File

@ -254,7 +254,7 @@ class ActionBar extends React.PureComponent {
if ((permissions & PERMISSION_MANAGE_USERS) === PERMISSION_MANAGE_USERS) {
menu.push(null);
menu.push({ text: intl.formatMessage(messages.admin_account, { name: status.getIn(['account', 'username']) }), href: `/admin/accounts/${status.getIn(['account', 'id'])}` });
menu.push({ text: intl.formatMessage(messages.admin_status), href: `/admin/accounts/${status.getIn(['account', 'id'])}/statuses?id=${status.get('id')}` });
menu.push({ text: intl.formatMessage(messages.admin_status), href: `/admin/accounts/${status.getIn(['account', 'id'])}/statuses/${status.get('id')}` });
}
}

View File

@ -1752,3 +1752,67 @@ a.sparkline {
}
}
}
.history {
counter-reset: step 0;
font-size: 15px;
line-height: 22px;
li {
counter-increment: step 1;
padding-left: 2.5rem;
padding-bottom: 8px;
position: relative;
margin-bottom: 8px;
&::before {
position: absolute;
content: counter(step);
font-size: 0.625rem;
font-weight: 500;
left: 0;
display: flex;
justify-content: center;
align-items: center;
width: calc(1.375rem + 1px);
height: calc(1.375rem + 1px);
background: $ui-base-color;
border: 1px solid $highlight-text-color;
color: $highlight-text-color;
border-radius: 8px;
}
&::after {
position: absolute;
content: "";
width: 1px;
background: $highlight-text-color;
bottom: 0;
top: calc(1.875rem + 1px);
left: 0.6875rem;
}
&:last-child {
margin-bottom: 0;
&::after {
display: none;
}
}
}
&__entry {
h5 {
font-weight: 500;
color: $primary-text-color;
line-height: 25px;
margin-bottom: 16px;
}
.status {
border: 1px solid lighten($ui-base-color, 4%);
background: $ui-base-color;
border-radius: 4px;
}
}
}