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: 995b08638f4f34912cf688f3e0bf2ca6989766119595d8bd84ae98c9daf85409
4
- data.tar.gz: f7be07a68fe5aeefe1ef4f9da1cbc589fca9a42d110e7ba992d5b5a75038eee1
3
+ metadata.gz: 0727b29e168a3f9a2fc4abb8979db9979bbfaf351e88738585bd667b3be7856a
4
+ data.tar.gz: 1d2c67774a6d20a4ad0b907c43115ea0cedfdb6410cbad16b60addc4a4a6ec2d
5
5
  SHA512:
6
- metadata.gz: b0e1a136b46f06f977b400925cfa351ac2aa10f9ca546662cc5f9d5c6c69089b4b38f456b72aa76aec0dbe8f8affcbdd48dcf29a49db6f43fc05f3d3375ae164
7
- data.tar.gz: 67abd4a402d55b81ae48e8942ecbef814c30f56f02f2da97c287ad5cacc7b612078461b3919f429d8e700d9ef56fa317882abec4aa9b71e8985c5e2b10016b7a
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: "QQ正则检查"
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: 含垃圾信息
@@ -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?
@@ -1,3 +1,3 @@
1
1
  module CensorBear
2
- VERSION = '0.1.9'.freeze
2
+ VERSION = '0.1.10'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: censor_bear
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - 42up