modqueue: highlight bad tags instead of entire post.
Change it so that when a post contains bad tags, the tags themselves are highlighted rather than the entire post. This also adds a data-tag-name attribute to tags in tag lists.
This commit is contained in:
@@ -52,8 +52,7 @@
|
||||
--preview-icon-color: white;
|
||||
--preview-icon-background: rgba(0, 0, 0, 0.5);
|
||||
|
||||
--modqueue-sample-warning-color: var(--error-background-color);
|
||||
--modqueue-quality-warning-color: var(--warning-background-color);
|
||||
--modqueue-tag-warning-color: var(--error-background-color);
|
||||
|
||||
--uploads-dropzone-background: #EEE;
|
||||
--uploads-dropzone-progress-bar-foreground-color: var(--link-color);
|
||||
@@ -339,8 +338,7 @@ body[data-current-user-theme="dark"] {
|
||||
--keyboard-shortcut-color: var(--text-color);
|
||||
--keyboard-shortcut-background-color: var(--grey-2);
|
||||
|
||||
--modqueue-sample-warning-color: var(--error-background-color);
|
||||
--modqueue-quality-warning-color: var(--warning-background-color);
|
||||
--modqueue-tag-warning-color: var(--error-background-color);
|
||||
|
||||
--news-updates-background: var(--grey-3);
|
||||
--news-updates-border: 2px solid var(--grey-4);
|
||||
|
||||
@@ -26,15 +26,9 @@ div#c-modqueue {
|
||||
}
|
||||
}
|
||||
|
||||
<% Danbooru.config.modqueue_quality_warning_tags.each do |tag| %>
|
||||
&[data-tags~="<%= tag %>"] {
|
||||
background-color: var(--modqueue-quality-warning-color);
|
||||
}
|
||||
<% end %>
|
||||
|
||||
<% Danbooru.config.modqueue_sample_warning_tags.each do |tag| %>
|
||||
&[data-tags~="<%= tag %>"] {
|
||||
background-color: var(--modqueue-sample-warning-color);
|
||||
<% Danbooru.config.modqueue_warning_tags.each do |tag| %>
|
||||
li[data-tag-name="<%= tag %>"] {
|
||||
background-color: var(--modqueue-tag-warning-color);
|
||||
}
|
||||
<% end %>
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ class TagSetPresenter < Presenter
|
||||
count = tag.post_count
|
||||
category = tag.category
|
||||
|
||||
html = %{<li class="tag-type-#{tag.category}">}
|
||||
html = %{<li class="tag-type-#{tag.category}" data-tag-name="#{h(name)}">}
|
||||
|
||||
unless name_only
|
||||
if category == Tag.categories.artist
|
||||
|
||||
@@ -2,5 +2,4 @@
|
||||
As a general rule, you should only approve of posts that you personally like. Posts that are not approved in three days will be automatically deleted.
|
||||
</p>
|
||||
|
||||
<p>Posts with the <%= link_to_wikis(*Danbooru.config.modqueue_quality_warning_tags) %> tags are marked in yellow.</p>
|
||||
<p>Posts with the <%= link_to_wikis(*Danbooru.config.modqueue_sample_warning_tags) %> tags are marked in light red.</p>
|
||||
<p>The <%= link_to_wikis(*Danbooru.config.modqueue_warning_tags) %> tags are highlighted in red.</p>
|
||||
|
||||
@@ -359,14 +359,10 @@ module Danbooru
|
||||
tag =~ /\A(?:replaceme|.*_sample|resized|upscaled|downscaled|md5_mismatch|jpeg_artifacts|corrupted_image|source_request|non-web_source)\z/i
|
||||
end
|
||||
|
||||
# Posts with these tags will be highlighted yellow in the modqueue.
|
||||
def modqueue_quality_warning_tags
|
||||
%w[hard_translated self_upload nude_filter third-party_edit screencap]
|
||||
end
|
||||
|
||||
# Posts with these tags will be highlighted red in the modqueue.
|
||||
def modqueue_sample_warning_tags
|
||||
%w[duplicate image_sample md5_mismatch resized upscaled downscaled]
|
||||
# Posts with these tags will be highlighted in the modqueue.
|
||||
def modqueue_warning_tags
|
||||
%w[hard_translated self_upload nude_filter third-party_edit screencap
|
||||
duplicate image_sample md5_mismatch resized upscaled downscaled]
|
||||
end
|
||||
|
||||
def stripe_secret_key
|
||||
|
||||
Reference in New Issue
Block a user