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>
|
<script>
|
||||||
import { SweetalertIcon } from 'vue-sweetalert-icons'
|
import { SweetalertIcon } from 'vue-sweetalert-icons'
|
||||||
import { reportMutation } from '~/graphql/Moderation.js'
|
import { reportMutation } from '~/graphql/Moderation.js'
|
||||||
|
import { reportReasonCategoriesDatabaseList } from '~/../shared/moderation/report.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ReportModal',
|
name: 'ReportModal',
|
||||||
@ -62,16 +63,10 @@ export default {
|
|||||||
id: { type: String, required: true },
|
id: { type: String, required: true },
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
const valuesReasonCategoryOptions = [
|
const reasonCategoryList = reportReasonCategoriesDatabaseList()
|
||||||
'discrimination-etc',
|
// move the first element "other" to the end
|
||||||
'pornographic-content-links',
|
let valuesReasonCategoryOptions = reasonCategoryList.slice(1).concat(reasonCategoryList[0])
|
||||||
'glorific-trivia-of-cruel-inhuman-acts',
|
|
||||||
'doxing',
|
|
||||||
'intentional-intimidation-stalking-persecution',
|
|
||||||
'advert-products-services-commercial',
|
|
||||||
'criminal-behavior-violation-german-law',
|
|
||||||
'other',
|
|
||||||
]
|
|
||||||
let reasonCategoryOptions = []
|
let reasonCategoryOptions = []
|
||||||
valuesReasonCategoryOptions.forEach(reasonCategory => {
|
valuesReasonCategoryOptions.forEach(reasonCategory => {
|
||||||
reasonCategoryOptions.push({
|
reasonCategoryOptions.push({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user