mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Import report reason categories from a shared array
This commit is contained in:
parent
663cfeb0b2
commit
2cf2f2b011
12
shared/moderation/report.js
Normal file
12
shared/moderation/report.js
Normal file
@ -0,0 +1,12 @@
|
||||
export const reportReasonCategoriesDatabaseList = () => {
|
||||
return [
|
||||
'other', // element # zero, because it is the nutral one
|
||||
'discrimination-etc',
|
||||
'pornographic-content-links',
|
||||
'glorific-trivia-of-cruel-inhuman-acts',
|
||||
'doxing',
|
||||
'intentional-intimidation-stalking-persecution',
|
||||
'advert-products-services-commercial',
|
||||
'criminal-behavior-violation-german-law',
|
||||
]
|
||||
}
|
||||
@ -50,6 +50,7 @@
|
||||
<script>
|
||||
import { SweetalertIcon } from 'vue-sweetalert-icons'
|
||||
import { reportMutation } from '~/graphql/Moderation.js'
|
||||
import { reportReasonCategoriesDatabaseList } from '~/../shared/moderation/report.js'
|
||||
|
||||
export default {
|
||||
name: 'ReportModal',
|
||||
@ -62,16 +63,10 @@ export default {
|
||||
id: { type: String, required: true },
|
||||
},
|
||||
data() {
|
||||
const valuesReasonCategoryOptions = [
|
||||
'discrimination-etc',
|
||||
'pornographic-content-links',
|
||||
'glorific-trivia-of-cruel-inhuman-acts',
|
||||
'doxing',
|
||||
'intentional-intimidation-stalking-persecution',
|
||||
'advert-products-services-commercial',
|
||||
'criminal-behavior-violation-german-law',
|
||||
'other',
|
||||
]
|
||||
const reasonCategoryList = reportReasonCategoriesDatabaseList()
|
||||
// move the first element "other" to the end
|
||||
let valuesReasonCategoryOptions = reasonCategoryList.slice(1).concat(reasonCategoryList[0])
|
||||
|
||||
let reasonCategoryOptions = []
|
||||
valuesReasonCategoryOptions.forEach(reasonCategory => {
|
||||
reasonCategoryOptions.push({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user