beetle_reporter 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0cb5fc2a8becc1cdd26a861c38be040cb31540897aad4ca5de09b3d2a429f7d0
|
4
|
+
data.tar.gz: 15bd9e2db23818bfbf4ea73eaf033b146bc32476253b96cfe44240876b34de7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 477f5b928cd1682592bb7a645d284c51e4542f812fbd0856d56b6019ad233d7de28fd1c5dd066f4f366ac8b7435346a3219aeaa5bba9aba281e610ce710aaad0
|
7
|
+
data.tar.gz: d10bcf571be5363d800f3dfc0c1326df3fa7a3983b625523c12b77a6006c61d751a9ade5edc81fb8a9a40c649f986d986e1bdbae984865e91f3f0c9bd10817d2
|
@@ -4,6 +4,15 @@ module BeetleReporter
|
|
4
4
|
include Discard::Model
|
5
5
|
|
6
6
|
REASON_TYPES = %w(垃圾广告营销 侮辱谩骂内容 淫秽色情内容 涉政敏感信息 违法有害信息 内容令人不适 内容存在错误)
|
7
|
+
PROCESS_REASON_LIST = %w(
|
8
|
+
发布垃圾、无意义内容
|
9
|
+
发布恐吓行为/骚扰内容
|
10
|
+
发布营销广告内容
|
11
|
+
发布谩骂、酸讽、引战内容
|
12
|
+
发布令人不适内容
|
13
|
+
发布淫秽色情内容
|
14
|
+
发布涉政敏感违法有害信息
|
15
|
+
)
|
7
16
|
|
8
17
|
belongs_to :record, polymorphic: true, required: false
|
9
18
|
belongs_to :user, class_name: BeetleReporter.config.user_class, optional: true
|
@@ -1,3 +1,32 @@
|
|
1
|
+
- content_for :head do
|
2
|
+
:javascript
|
3
|
+
document.addEventListener("turbo:load", () => {
|
4
|
+
const hide_reason_input = document.querySelector('#hide_reason');
|
5
|
+
const hide_reason_list = document.querySelector('#hide_reason_list');
|
6
|
+
hide_reason_list.addEventListener('change', (event) => {
|
7
|
+
hide_reason_input.value = event.target.value;
|
8
|
+
})
|
9
|
+
|
10
|
+
const remove_reason_input = document.querySelector('#remove_reason');
|
11
|
+
const remove_reason_list = document.querySelector('#remove_reason_list');
|
12
|
+
remove_reason_list.addEventListener('change', (event) => {
|
13
|
+
remove_reason_input.value = event.target.value;
|
14
|
+
})
|
15
|
+
|
16
|
+
const mute_reason_input = document.querySelector('#mute_reason');
|
17
|
+
const mute_reason_list = document.querySelector('#mute_reason_list');
|
18
|
+
mute_reason_list.addEventListener('change', (event) => {
|
19
|
+
mute_reason_input.value = event.target.value;
|
20
|
+
})
|
21
|
+
|
22
|
+
const ban_reason_input = document.querySelector('#ban_reason');
|
23
|
+
const ban_reason_list = document.querySelector('#ban_reason_list');
|
24
|
+
ban_reason_list.addEventListener('change', (event) => {
|
25
|
+
ban_reason_input.value = event.target.value;
|
26
|
+
})
|
27
|
+
});
|
28
|
+
|
29
|
+
|
1
30
|
= turbo_frame_tag dom_id(report) do
|
2
31
|
%div{class: "flex flex-col space-y-2 border rounded-md p-2 mt-2"}
|
3
32
|
%div{class: "flex justify-between text-xs"}
|
@@ -41,22 +70,26 @@
|
|
41
70
|
= button_to "撤销", report_undo_path(report), class: "text-red-600 cursor-pointer px-2 py-0.5 bg-gray-100 rounded-lg"
|
42
71
|
- if report.may_hide?
|
43
72
|
= form_with(url: report_hide_path(report), class: "space-x-1 flex items-center") do |f|
|
44
|
-
= f.text_field :reason, value: report.reason, placeholder: "隐藏原因是什么?", class: "border rounded-md
|
73
|
+
= f.text_field :reason, value: report.reason, placeholder: "隐藏原因是什么?", class: "border rounded-md py-0.5 px-1", id: "hide_reason"
|
74
|
+
= select_tag "process_reason", options_for_select(BeetleReporter::Report::PROCESS_REASON_LIST.map{|r| [r, r]}), prompt: "选择原因", id: "hide_reason_list", class: "border rounded-md py-0.5 px-1"
|
45
75
|
= f.submit "隐藏内容", class: "bg-red-500 text-white cursor-pointer px-2 py-0.5 bg-gray-100 rounded-lg"
|
46
76
|
%span{class: "text-xs text-gray-500"} 举报属实,内容不适合公开展示,对其它人隐藏,对创建者可见。
|
47
77
|
- if report.may_remove?
|
48
78
|
= form_with(url: report_remove_path(report), class: "space-x-1 flex items-center") do |f|
|
49
|
-
= f.text_field :reason, value: report.reason, placeholder: "删除原因是什么?", class: "border rounded-md
|
79
|
+
= f.text_field :reason, value: report.reason, placeholder: "删除原因是什么?", class: "border rounded-md py-0.5 px-1", id: "remove_reason"
|
80
|
+
= select_tag "process_reason", options_for_select(BeetleReporter::Report::PROCESS_REASON_LIST.map{|r| [r, r]}), prompt: "选择原因", id: "remove_reason_list", class: "border rounded-md py-0.5 px-1"
|
50
81
|
= f.submit "删除内容", class: "bg-red-600 text-white cursor-pointer px-2 py-0.5 bg-gray-100 rounded-lg"
|
51
82
|
%span{class: "text-xs text-gray-500"} 举报属实,不仅不适合展示,也不适合在平台里存在,违法乱纪、破坏和谐气氛的内容,直接删掉。
|
52
83
|
- if report.may_mute?
|
53
84
|
= form_with(url: report_mute_path(report), class: "space-x-1 flex items-center") do |f|
|
54
|
-
-# = f.text_field :mute_days, value: report.mute_days, placeholder: "禁言天数", class: "border rounded-md
|
55
|
-
= f.text_field :reason, value: report.reason, placeholder: "禁言原因是什么?", class: "border rounded-md
|
85
|
+
-# = f.text_field :mute_days, value: report.mute_days, placeholder: "禁言天数", class: "border rounded-md py-0.5 px-1"
|
86
|
+
= f.text_field :reason, value: report.reason, placeholder: "禁言原因是什么?", class: "border rounded-md py-0.5 px-1", id: "mute_reason"
|
87
|
+
= select_tag "process_reason", options_for_select(BeetleReporter::Report::PROCESS_REASON_LIST.map{|r| [r, r]}), prompt: "选择原因", id: "mute_reason_list", class: "border rounded-md py-0.5 px-1"
|
56
88
|
= f.submit "禁言用户", class: "bg-red-700 text-white cursor-pointer px-2 py-0.5 bg-gray-100 rounded-lg"
|
57
89
|
%span{class: "text-xs text-gray-500"} 举报属实,该用户其它内容正常,只有少数几条奇怪的内容,除了删除内容之外也要禁言用户,关小黑屋清醒清醒。
|
58
90
|
- if report.may_forbid?
|
59
91
|
= form_with(url: report_forbid_path(report), class: "space-x-1 flex items-center") do |f|
|
60
|
-
= f.text_field :reason, value: report.reason, placeholder: "封禁原因是什么?", class: "border rounded-md
|
92
|
+
= f.text_field :reason, value: report.reason, placeholder: "封禁原因是什么?", class: "border rounded-md py-0.5 px-1", id: "ban_reason"
|
93
|
+
= select_tag "process_reason", options_for_select(BeetleReporter::Report::PROCESS_REASON_LIST.map{|r| [r, r]}), prompt: "选择原因", id: "ban_reason_list", class: "border rounded-md py-0.5 px-1"
|
61
94
|
= f.submit "封禁用户", class: "bg-red-800 text-white cursor-pointer px-2 py-0.5 bg-gray-100 rounded-lg"
|
62
|
-
%span{class: "text-xs text-gray-500"} 举报属实,ta就不是正常用户,搞黄色、发广告、违法乱纪的捣乱份子直接永久封禁,并删除其名下所有内容。
|
95
|
+
%span{class: "text-xs text-gray-500"} 举报属实,ta就不是正常用户,搞黄色、发广告、违法乱纪的捣乱份子直接永久封禁,并删除其名下所有内容。
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beetle_reporter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 42up
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-12-
|
11
|
+
date: 2021-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|