Skip to content

Commit ccb09c3

Browse files
authored
Merge branch 'develop' into 0valt/keyboard
2 parents aa834f8 + 6f1474a commit ccb09c3

101 files changed

Lines changed: 1816 additions & 813 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ GEM
344344
railties (>= 5.2)
345345
reverse_markdown (2.1.1)
346346
nokogiri
347-
rexml (3.4.1)
347+
rexml (3.4.2)
348348
rmagick (5.5.0)
349349
observer (~> 0.1)
350350
pkg-config (~> 1.4)

INSTALLATION.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,16 @@ Add the tags to the "Required tags" section:
233233

234234
![img/required-tags.png](img/required-tags.png)
235235

236+
## Optional: Email blocklists
237+
238+
If you want to block some known-bad actors from using the deployment, you can setup the following email blocklists:
239+
240+
- Bad email patterns for granular control over which email addresses to block.
241+
To enable it, add a file named `qpixel-email-patterns.txt` to the deployment root's parent directory.
242+
Each line in the file should be a valid regular expression that a given email will be checked against.
243+
- Bad email domains for bulk blocks on emails from known bad domains.
244+
To enable it, add a file named `qpixel-domain-blocklist.txt` to the deployment root's parent directory.
245+
Each line in the file corresponds to a domain that should be blocked.
236246

237247
## Optional: Help Topics
238248

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
document.addEventListener('DOMContentLoaded', () => {
2+
document.querySelectorAll('.js-error-type-select').forEach((el) => {
3+
$(el).select2();
4+
});
5+
});

app/assets/javascripts/moderator.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,13 @@ $(() => {
3838
QPixel.createNotification('danger', `<strong>Failed:</strong> Unexpected status (${req.status})`);
3939
}
4040
});
41+
42+
QPixel.DOM.addSelectorListener('click', '.js-bulk-check', async (ev) => {
43+
const tgt = /** @type {HTMLElement} */(ev.target);
44+
const action = tgt.dataset.check;
45+
const checkboxes = document.querySelectorAll('.js-spammer-form input[type="checkbox"]');
46+
checkboxes.forEach((/** @type {HTMLInputElement} */checkbox) => {
47+
checkbox.checked = action === 'all';
48+
});
49+
});
4150
});

0 commit comments

Comments
 (0)