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-color: white;
|
||||||
--preview-icon-background: rgba(0, 0, 0, 0.5);
|
--preview-icon-background: rgba(0, 0, 0, 0.5);
|
||||||
|
|
||||||
--modqueue-sample-warning-color: var(--error-background-color);
|
--modqueue-tag-warning-color: var(--error-background-color);
|
||||||
--modqueue-quality-warning-color: var(--warning-background-color);
|
|
||||||
|
|
||||||
--uploads-dropzone-background: #EEE;
|
--uploads-dropzone-background: #EEE;
|
||||||
--uploads-dropzone-progress-bar-foreground-color: var(--link-color);
|
--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-color: var(--text-color);
|
||||||
--keyboard-shortcut-background-color: var(--grey-2);
|
--keyboard-shortcut-background-color: var(--grey-2);
|
||||||
|
|
||||||
--modqueue-sample-warning-color: var(--error-background-color);
|
--modqueue-tag-warning-color: var(--error-background-color);
|
||||||
--modqueue-quality-warning-color: var(--warning-background-color);
|
|
||||||
|
|
||||||
--news-updates-background: var(--grey-3);
|
--news-updates-background: var(--grey-3);
|
||||||
--news-updates-border: 2px solid var(--grey-4);
|
--news-updates-border: 2px solid var(--grey-4);
|
||||||
|
|||||||
@@ -26,15 +26,9 @@ div#c-modqueue {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
<% Danbooru.config.modqueue_quality_warning_tags.each do |tag| %>
|
<% Danbooru.config.modqueue_warning_tags.each do |tag| %>
|
||||||
&[data-tags~="<%= tag %>"] {
|
li[data-tag-name="<%= tag %>"] {
|
||||||
background-color: var(--modqueue-quality-warning-color);
|
background-color: var(--modqueue-tag-warning-color);
|
||||||
}
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% Danbooru.config.modqueue_sample_warning_tags.each do |tag| %>
|
|
||||||
&[data-tags~="<%= tag %>"] {
|
|
||||||
background-color: var(--modqueue-sample-warning-color);
|
|
||||||
}
|
}
|
||||||
<% end %>
|
<% end %>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ class TagSetPresenter < Presenter
|
|||||||
count = tag.post_count
|
count = tag.post_count
|
||||||
category = tag.category
|
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
|
unless name_only
|
||||||
if category == Tag.categories.artist
|
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.
|
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>
|
||||||
|
|
||||||
<p>Posts with the <%= link_to_wikis(*Danbooru.config.modqueue_quality_warning_tags) %> tags are marked in yellow.</p>
|
<p>The <%= link_to_wikis(*Danbooru.config.modqueue_warning_tags) %> tags are highlighted in red.</p>
|
||||||
<p>Posts with the <%= link_to_wikis(*Danbooru.config.modqueue_sample_warning_tags) %> tags are marked in light 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
|
tag =~ /\A(?:replaceme|.*_sample|resized|upscaled|downscaled|md5_mismatch|jpeg_artifacts|corrupted_image|source_request|non-web_source)\z/i
|
||||||
end
|
end
|
||||||
|
|
||||||
# Posts with these tags will be highlighted yellow in the modqueue.
|
# Posts with these tags will be highlighted in the modqueue.
|
||||||
def modqueue_quality_warning_tags
|
def modqueue_warning_tags
|
||||||
%w[hard_translated self_upload nude_filter third-party_edit screencap]
|
%w[hard_translated self_upload nude_filter third-party_edit screencap
|
||||||
end
|
duplicate image_sample md5_mismatch resized upscaled downscaled]
|
||||||
|
|
||||||
# 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]
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def stripe_secret_key
|
def stripe_secret_key
|
||||||
|
|||||||
Reference in New Issue
Block a user