diff options
Diffstat (limited to 'app/assets/javascripts/admin/abuse_report/constants.js')
-rw-r--r-- | app/assets/javascripts/admin/abuse_report/constants.js | 50 |
1 files changed, 49 insertions, 1 deletions
diff --git a/app/assets/javascripts/admin/abuse_report/constants.js b/app/assets/javascripts/admin/abuse_report/constants.js index a59e10b5d4a..b290581598a 100644 --- a/app/assets/javascripts/admin/abuse_report/constants.js +++ b/app/assets/javascripts/admin/abuse_report/constants.js @@ -1,9 +1,57 @@ -import { s__, n__ } from '~/locale'; +import { s__, n__, __ } from '~/locale'; + +export const STATUS_OPEN = 'open'; +export const STATUS_CLOSED = 'closed'; + +export const SUCCESS_ALERT = 'success'; +export const FAILED_ALERT = 'danger'; + +export const ERROR_MESSAGE = __('Something went wrong. Please try again.'); export const REPORT_HEADER_I18N = { adminProfile: s__('AbuseReport|Admin profile'), + open: __('Open'), + closed: __('Closed'), +}; + +export const ACTIONS_I18N = { + actions: s__('AbuseReport|Actions'), + confirm: s__('AbuseReport|Confirm'), + action: s__('AbuseReport|Action'), + reason: s__('AbuseReport|Reason'), + comment: s__('AbuseReport|Comment'), + closeReport: s__('AbuseReport|Close report'), + requiredFieldFeedback: __('This field is required.'), }; +export const NO_ACTION = { value: '', text: s__('AbuseReport|No action') }; + +export const USER_ACTION_OPTIONS = [ + NO_ACTION, + { value: 'block_user', text: s__('AbuseReport|Block user') }, + { value: 'ban_user', text: s__('AbuseReport|Ban user') }, + { value: 'delete_user', text: s__('AbuseReport|Delete user') }, +]; + +export const REASON_OPTIONS = [ + { value: '', text: '' }, + { value: 'spam', text: s__('AbuseReport|Confirmed spam') }, + { value: 'offensive', text: s__('AbuseReport|Confirmed offensive or abusive behavior') }, + { value: 'phishing', text: s__('AbuseReport|Confirmed phishing') }, + { value: 'crypto', text: s__('AbuseReport|Confirmed crypto mining') }, + { + value: 'credentials', + text: s__('AbuseReport|Confirmed posting of personal information or credentials'), + }, + { + value: 'copyright', + text: s__('AbuseReport|Confirmed violation of a copyright or a trademark'), + }, + { value: 'malware', text: s__('AbuseReport|Confirmed posting of malware') }, + { value: 'other', text: s__('AbuseReport|Something else') }, + { value: 'unconfirmed', text: s__('AbuseReport|Abuse unconfirmed') }, +]; + export const USER_DETAILS_I18N = { createdAt: s__('AbuseReport|Member since'), email: s__('AbuseReport|Email'), |