mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 21:15:32 +09:00
feat(admin): add warning given report outcome (#3500)
This commit is contained in:
1 parent
61a4e3895a
commit
9000a9f4c7
9 files changed
+34
-14
No files matched your search
Generated
+3
-2
@@ -11027,14 +11027,15 @@
|
||||
},
|
||||
"outcome": {
|
||||
"description": "What happened to the reported content or account. Required for actioned, where no_violation is refused. Optional for no_violation, where it can only be no_violation. Refused for duplicate. The reporter is told it",
|
||||
"x-enumNames": ["removed", "restricted", "action_taken", "no_violation"],
|
||||
"x-enumNames": ["removed", "warned", "restricted", "action_taken", "no_violation"],
|
||||
"x-enumDescriptions": [
|
||||
"The reported content, profile field or community was removed",
|
||||
"The account responsible for the reported item was warned",
|
||||
"The reported account was restricted and the content was left up",
|
||||
"Action was taken under the rules, and the reporter is not told which",
|
||||
"The reported content or account does not break the rules and was left as it is"
|
||||
],
|
||||
"enum": ["removed", "restricted", "action_taken", "no_violation"],
|
||||
"enum": ["removed", "warned", "restricted", "action_taken", "no_violation"],
|
||||
"type": "string"
|
||||
},
|
||||
"duplicate_of": {
|
||||
|
||||
@@ -601,13 +601,14 @@ fn resolve_report_form(base: &str, report_id: &str, csrf_token: &str) -> Markup
|
||||
class={(FORM_CONTROL_CLASS) " h-8 appearance-none px-3 py-1.5 pr-10"} {
|
||||
option value="" selected disabled { "Choose one" }
|
||||
option value="removed" { "Content removed" }
|
||||
option value="warned" { "Warning given" }
|
||||
option value="restricted" { "Account restricted" }
|
||||
option value="action_taken" { "Other action taken" }
|
||||
}
|
||||
(select_chevron())
|
||||
}
|
||||
p class="text-neutral-500 text-xs" {
|
||||
"What happened to the reported content or account. The reporter is told it. Other action taken, such as a warning, tells them we acted but not how."
|
||||
"What happened to the reported content or account. The reporter is told it. Warning given and other action taken tell them we acted but not how."
|
||||
}
|
||||
}
|
||||
fieldset class="flex flex-col gap-3" data-show-for-resolution="duplicate" hidden disabled {
|
||||
|
||||
@@ -186,6 +186,8 @@ async fn report_resolve_sends_notify_reporter_from_the_checkbox() {
|
||||
assert_eq!(duplicate.body["notify_reporter"], json!(true));
|
||||
assert!(duplicate.body.get("outcome").is_none());
|
||||
assert_eq!(duplicate.body["duplicate_of"], json!("1400000000000000001"));
|
||||
let warned = submit(&uri, "resolution=actioned&outcome=warned").await;
|
||||
assert_eq!(warned.body["outcome"], json!("warned"));
|
||||
let other_action = submit(&uri, "resolution=actioned&outcome=action_taken").await;
|
||||
assert_eq!(other_action.body["outcome"], json!("action_taken"));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user