Merge branch 'master' into glitch-soc/merge-upstream
This commit is contained in:
commit
5088eb8388
55 changed files with 635 additions and 237 deletions
|
@ -1,6 +1,7 @@
|
|||
// This file will be loaded on admin pages, regardless of theme.
|
||||
|
||||
import { delegate } from 'rails-ujs';
|
||||
import ready from '../mastodon/ready';
|
||||
|
||||
const batchCheckboxClassName = '.batch-checkbox input[type="checkbox"]';
|
||||
|
||||
|
@ -31,7 +32,7 @@ delegate(document, '.media-spoiler-hide-button', 'click', () => {
|
|||
});
|
||||
});
|
||||
|
||||
delegate(document, '#domain_block_severity', 'change', ({ target }) => {
|
||||
const onDomainBlockSeverityChange = (target) => {
|
||||
const rejectMediaDiv = document.querySelector('.input.with_label.domain_block_reject_media');
|
||||
const rejectReportsDiv = document.querySelector('.input.with_label.domain_block_reject_reports');
|
||||
|
||||
|
@ -42,4 +43,11 @@ delegate(document, '#domain_block_severity', 'change', ({ target }) => {
|
|||
if (rejectReportsDiv) {
|
||||
rejectReportsDiv.style.display = (target.value === 'suspend') ? 'none' : 'block';
|
||||
}
|
||||
};
|
||||
|
||||
delegate(document, '#domain_block_severity', 'change', ({ target }) => onDomainBlockSeverityChange(target));
|
||||
|
||||
ready(() => {
|
||||
const input = document.getElementById('domain_block_severity');
|
||||
if (input) onDomainBlockSeverityChange(input);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue