mirror of
https://github.com/glitch-soc/mastodon.git
synced 2024-11-24 00:54:02 -05:00
Fix “legal” report category not showing up in moderation interface (#26509)
This commit is contained in:
parent
f0862bcf98
commit
0446394465
@ -8,6 +8,7 @@ import classNames from 'classnames';
|
|||||||
import api from 'mastodon/api';
|
import api from 'mastodon/api';
|
||||||
|
|
||||||
const messages = defineMessages({
|
const messages = defineMessages({
|
||||||
|
legal: { id: 'report.categories.legal', defaultMessage: 'Legal' },
|
||||||
other: { id: 'report.categories.other', defaultMessage: 'Other' },
|
other: { id: 'report.categories.other', defaultMessage: 'Other' },
|
||||||
spam: { id: 'report.categories.spam', defaultMessage: 'Spam' },
|
spam: { id: 'report.categories.spam', defaultMessage: 'Spam' },
|
||||||
violation: { id: 'report.categories.violation', defaultMessage: 'Content violates one or more server rules' },
|
violation: { id: 'report.categories.violation', defaultMessage: 'Content violates one or more server rules' },
|
||||||
@ -150,6 +151,7 @@ class ReportReasonSelector extends PureComponent {
|
|||||||
return (
|
return (
|
||||||
<div className='report-reason-selector'>
|
<div className='report-reason-selector'>
|
||||||
<Category id='other' text={intl.formatMessage(messages.other)} selected={category === 'other'} onSelect={this.handleSelect} disabled={disabled} />
|
<Category id='other' text={intl.formatMessage(messages.other)} selected={category === 'other'} onSelect={this.handleSelect} disabled={disabled} />
|
||||||
|
<Category id='legal' text={intl.formatMessage(messages.legal)} selected={category === 'legal'} onSelect={this.handleSelect} disabled={disabled} />
|
||||||
<Category id='spam' text={intl.formatMessage(messages.spam)} selected={category === 'spam'} onSelect={this.handleSelect} disabled={disabled} />
|
<Category id='spam' text={intl.formatMessage(messages.spam)} selected={category === 'spam'} onSelect={this.handleSelect} disabled={disabled} />
|
||||||
<Category id='violation' text={intl.formatMessage(messages.violation)} selected={category === 'violation'} onSelect={this.handleSelect} disabled={disabled}>
|
<Category id='violation' text={intl.formatMessage(messages.violation)} selected={category === 'violation'} onSelect={this.handleSelect} disabled={disabled}>
|
||||||
{rules.map(rule => <Rule key={rule.id} id={rule.id} text={rule.text} selected={rule_ids.includes(rule.id)} onToggle={this.handleToggle} disabled={disabled} />)}
|
{rules.map(rule => <Rule key={rule.id} id={rule.id} text={rule.text} selected={rule_ids.includes(rule.id)} onToggle={this.handleToggle} disabled={disabled} />)}
|
||||||
|
@ -533,6 +533,7 @@
|
|||||||
"reply_indicator.cancel": "Cancel",
|
"reply_indicator.cancel": "Cancel",
|
||||||
"report.block": "Block",
|
"report.block": "Block",
|
||||||
"report.block_explanation": "You will not see their posts. They will not be able to see your posts or follow you. They will be able to tell that they are blocked.",
|
"report.block_explanation": "You will not see their posts. They will not be able to see your posts or follow you. They will be able to tell that they are blocked.",
|
||||||
|
"report.categories.legal": "Legal",
|
||||||
"report.categories.other": "Other",
|
"report.categories.other": "Other",
|
||||||
"report.categories.spam": "Spam",
|
"report.categories.spam": "Spam",
|
||||||
"report.categories.violation": "Content violates one or more server rules",
|
"report.categories.violation": "Content violates one or more server rules",
|
||||||
|
@ -48,7 +48,10 @@ class Report < ApplicationRecord
|
|||||||
|
|
||||||
validate :validate_rule_ids
|
validate :validate_rule_ids
|
||||||
|
|
||||||
# entries here needs to be kept in sync with app/javascript/mastodon/features/notifications/components/report.jsx
|
# entries here need to be kept in sync with the front-end:
|
||||||
|
# - app/javascript/mastodon/features/notifications/components/report.jsx
|
||||||
|
# - app/javascript/mastodon/features/report/category.jsx
|
||||||
|
# - app/javascript/mastodon/components/admin/ReportReasonSelector.jsx
|
||||||
enum category: {
|
enum category: {
|
||||||
other: 0,
|
other: 0,
|
||||||
spam: 1_000,
|
spam: 1_000,
|
||||||
|
Loading…
Reference in New Issue
Block a user