censor_bear 0.1.9 → 0.1.10
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: 0727b29e168a3f9a2fc4abb8979db9979bbfaf351e88738585bd667b3be7856a
|
4
|
+
data.tar.gz: 1d2c67774a6d20a4ad0b907c43115ea0cedfdb6410cbad16b60addc4a4a6ec2d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93b0e0d47cfe57651d59aa23689c54de9003f3ef1494545834f0c4708f95fafc50abd4f68906d96a73320f5e45d6d5bb846b8f316e1d27abfcd2701b3f0c0ea8
|
7
|
+
data.tar.gz: 3c9e731f73a57075cf9ea868d75c9d707a2be4ba6666a7671d20b0306a169dc2d9e616e64670d614d4ceb72dc08719196cc97e35779ee555430f72879cf71899
|
@@ -16,7 +16,6 @@
|
|
16
16
|
- unless log.labels.blank?
|
17
17
|
- log.labels.each do |label|
|
18
18
|
%span{class: "text-sm bg-red-100 text-red-600 py-1 px-2 rounded-lg"}=t("censor_log.label.#{label}")
|
19
|
-
|
20
19
|
%span{class: "text-sm bg-gray-100 text-gray-600 py-1 px-2 rounded-lg"}= log.created_at
|
21
20
|
%div{class: "flex space-x-2 items-center"}
|
22
21
|
%span
|
@@ -33,5 +32,5 @@
|
|
33
32
|
%div{class: "text-yellow-500 font-meidum text-xl"}
|
34
33
|
- log.mod_words.each do |word|
|
35
34
|
%span [
|
36
|
-
%span= link_to word, stop_words_path(q: word)
|
35
|
+
%span= link_to word, stop_words_path(q: word), data: { turbo: false }, target: "_blank"
|
37
36
|
%span ]
|
@@ -3,7 +3,7 @@
|
|
3
3
|
%div{class: "border rounded-md mb-2 p-2 flex flex-col space-y-1"}
|
4
4
|
%div{class: "flex justify-between"}
|
5
5
|
%div{class: ""}
|
6
|
-
= link_to mod_log.record_path do
|
6
|
+
= link_to mod_log.record_path, data: { turbo: false }, target: "_blank" do
|
7
7
|
%span{class: "text-sm bg-indigo-100 text-indigo-600 py-1 px-2 rounded-lg"}="#{mod_log.record_type.upcase}##{mod_log.record_id}"
|
8
8
|
- unless mod_log.labels.blank?
|
9
9
|
- mod_log.labels.each do |label|
|
@@ -24,7 +24,7 @@
|
|
24
24
|
- if mod_log.status == 2
|
25
25
|
= "暂缓"
|
26
26
|
%span
|
27
|
-
= link_to "详情", mod_log
|
27
|
+
= link_to "详情", mod_log, data: { turbo: false }, target: "_blank"
|
28
28
|
%span
|
29
29
|
= button_to '删除', mod_log, method: :delete, data: { confirm: 'Are you sure?'}, class: "text-red-600 rounded-md px-2 py-0.5"
|
30
30
|
%div{class: "flex justify-between items-center"}
|
@@ -9,11 +9,11 @@ en:
|
|
9
9
|
pass: 忽略
|
10
10
|
review: 审核
|
11
11
|
stage:
|
12
|
-
aliyun_check:
|
13
|
-
tencent_check:
|
14
|
-
local_check:
|
15
|
-
qq_regex:
|
16
|
-
wechat_regex:
|
12
|
+
aliyun_check: 阿里云检查
|
13
|
+
tencent_check: 腾讯云检查
|
14
|
+
local_check: 本地检查
|
15
|
+
qq_regex: QQ正则检查
|
16
|
+
wechat_regex: 微信正则检查
|
17
17
|
label:
|
18
18
|
normal: 正常文本
|
19
19
|
spam: 含垃圾信息
|
data/lib/censor_bear/censor.rb
CHANGED
@@ -148,6 +148,7 @@ module CensorBear
|
|
148
148
|
private
|
149
149
|
|
150
150
|
def concat_labels(data)
|
151
|
+
return [] if data.blank?
|
151
152
|
labels = []
|
152
153
|
data.map do |d|
|
153
154
|
next if d['label'].blank?
|
@@ -158,6 +159,7 @@ module CensorBear
|
|
158
159
|
end
|
159
160
|
|
160
161
|
def concat_words(data)
|
162
|
+
return [] if data.blank?
|
161
163
|
words = []
|
162
164
|
data.each do |d|
|
163
165
|
next if d['contexts'].blank?
|
data/lib/censor_bear/version.rb
CHANGED