Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
Renaming fields for the report form
Browse files Browse the repository at this point in the history
  • Loading branch information
bakulf committed Feb 12, 2024
1 parent d225f54 commit 2b4a187
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 26 deletions.
42 changes: 21 additions & 21 deletions components/report/ReportModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ const { client } = useMasto()
const step = ref('selectCategory')
const serverRules = ref((await client.value.v2.instance.fetch()).rules || [])
const reportReason = ref('')
const illegalContent = ref(false)
const illegalContentCountry = ref('')
const illegalContentSignature = ref(false)
const considersIllegal = ref(false)
const considersIllegalCountry = ref('')
const considersIllegalSignature = ref(false)
const selectedRuleIds = ref([])
const availableStatuses = ref(status ? [status] : [])
const selectedStatusIds = ref(status ? [status.id] : [])
Expand Down Expand Up @@ -84,8 +84,8 @@ async function submitReport() {
forward: forwardReport.value,
category: reportReason.value === 'spam' ? 'spam' : reportReason.value === 'violation' ? 'violation' : 'other',
rule_ids: reportReason.value === 'violation' ? selectedRuleIds.value : null,
illegal_content: illegalContent.value,
illegal_content_country: illegalContentCountry.value,
considers_illegal: considersIllegal.value,
considers_illegal_country: considersIllegalCountry.value,
})
const headers = {
Expand Down Expand Up @@ -192,29 +192,29 @@ function resetModal() {
</div>

<div>
<input id="illegal_content" v-model="illegalContent" type="checkbox" value="illegal_content">
<label pl-2 for="illegal_content" font-bold>{{ $t('report.illegal_content') }}</label>
<input id="considers_illegal" v-model="considersIllegal" type="checkbox" value="considers_illegal">
<label pl-2 for="considers_illegal" font-bold>{{ $t('report.considers_illegal') }}</label>
</div>

<div v-if="(reportReason && reportReason !== 'dontlike') || illegalContent">
<h3 mt-8 mb-4 font-bold :hidden="illegalContent">
<div v-if="(reportReason && reportReason !== 'dontlike') || considersIllegal">
<h3 mt-8 mb-4 font-bold :hidden="considersIllegal">
{{ $t('report.anything_else') }}
</h3>
<h3 mt-8 mb-4 font-bold :hidden="!illegalContent">
{{ $t('report.anything_else_illegal_content') }}
<h3 mt-8 mb-4 font-bold :hidden="!considersIllegal">
{{ $t('report.anything_else_considers_illegal') }}
</h3>
<textarea v-model="additionalComments" w-full h-20 p-3 border :placeholder="$t('report.additional_comments')" />
<p :hidden="!illegalContent">
{{ $t('report.illegal_content_footer') }}
<p :hidden="!considersIllegal">
{{ $t('report.considers_illegal_footer') }}
</p>
</div>

<div v-if="illegalContent">
<label pl-2 for="illegal_content_country" font-bold>{{ $t('report.illegal_content_country') }}</label>
<input id="illegal_content_country" v-model="illegalContentCountry" type="text">
<div v-if="considersIllegal">
<label pl-2 for="considers_illegal_country" font-bold>{{ $t('report.considers_illegal_country') }}</label>
<input id="considers_illegal_country" v-model="considersIllegalCountry" type="text">
</div>

<div v-if="(reportReason && reportReason !== 'dontlike') || illegalContent">
<div v-if="(reportReason && reportReason !== 'dontlike') || considersIllegal">
<div v-if="getServerName(account) && getServerName(account) !== currentServer">
<h3 mt-8 mb-2 font-bold>
{{ $t('report.another_server') }}
Expand All @@ -227,14 +227,14 @@ function resetModal() {
</div>
</div>

<div v-if="illegalContent">
<input id="illegal_content_signature" v-model="illegalContentSignature" type="checkbox" value="illegal_content_signature">
<label pl-2 for="illegal_content_signature" font-bold>{{ $t('report.illegal_content_signature') }}</label>
<div v-if="considersIllegal">
<input id="considers_illegal_signature" v-model="considersIllegalSignature" type="checkbox" value="considers_illegal_signature">
<label pl-2 for="considers_illegal_signature" font-bold>{{ $t('report.considers_illegal_signature') }}</label>
</div>

<button
btn-solid mxa mt-10
:disabled="!reportReason || (reportReason === 'violation' && selectedRuleIds.length < 1) || (illegalContent && !additionalComments) || (illegalContent && !illegalContentSignature)"
:disabled="!reportReason || (reportReason === 'violation' && selectedRuleIds.length < 1) || (considersIllegal && !additionalComments) || (considersIllegal && !considersIllegalSignature)"
@click="categoryChosen()"
>
{{ $t('action.next') }}
Expand Down
10 changes: 5 additions & 5 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,12 @@
"additional_comments": "Additional comments",
"another_server": "The user you're reporting is from another server",
"anything_else": "Is there anything else you think we should know?",
"anything_else_illegal_content": "Please provide additional details, including sufficient information for Mozilla to understand the specific law(s) or requirement(s) you believe has been broken.",
"anything_else_considers_illegal": "Please provide additional details, including sufficient information for Mozilla to understand the specific law(s) or requirement(s) you believe has been broken.",
"block_desc": "You will no longer see any posts from this user. They will not be able to see your posts or follow you. They will be able to tell that they are blocked.",
"considers_illegal": "I think this content is illegal in my jurisdiction",
"considers_illegal_country": "Country in which you believe the content is illegal.",
"considers_illegal_footer": "Please note that we will not be able to conduct a legal review if you don’t precisely specify what you allege to be illegal about the content. We may, however, still review under our content policies.",
"considers_illegal_signature": "By submitting this report I certify, under penalty of perjury, that the allegations it contains are complete and accurate, to the best of my knowledge.",
"dontlike": "I don't like it",
"dontlike_desc": "It is not something you want to see",
"forward": "Yes, forward this report to {0}",
Expand All @@ -424,10 +428,6 @@
"title": "Thanks for reporting, we'll look into this."
}
},
"illegal_content": "I think this content is illegal in my jurisdiction",
"illegal_content_country": "Country in which you believe the content is illegal.",
"illegal_content_footer": "Please note that we will not be able to conduct a legal review if you don’t precisely specify what you allege to be illegal about the content. We may, however, still review under our content policies.",
"illegal_content_signature": "By submitting this report I certify, under penalty of perjury, that the allegations it contains are complete and accurate, to the best of my knowledge.",
"limiting": "Limiting {0}",
"mute_desc": "You will no longer see any posts from this user. They can still follow you and see your posts. They will not know that they are muted.",
"other": "It's something else",
Expand Down

0 comments on commit 2b4a187

Please sign in to comment.