Fix iqdb link & add score cutoff to form

This commit is contained in:
Donovan Daniels 2024-10-13 02:43:10 -05:00
parent ce1df3bedf
commit 7a7d8c0dcc
Signed by: Donovan_DMC
GPG Key ID: 907D29CBFD6157BA
2 changed files with 3 additions and 2 deletions

View File

@ -10,6 +10,7 @@
<%= f.input(:file, as: :file) %>
<%= f.input(:url, label: "File URL") %>
<%= f.input(:image_id, label: "Image ID") %>
<%= f.input(:score_cutoff, label: "Score Cutoff", input_html: { min: 0, max: 100, value: 60 }) %>
<%= f.button(:submit, "Query", name: nil) %>
<% end %>
</div>

View File

@ -13,7 +13,7 @@
</li>
<% if params[:controller] == "yiff_rest/api_v2/manage" %>
<% elsif params[:controller] == "yiff_rest/api_v2/images" %>
<% if params[:action] == "index" %>
<% if %w[index iqdb query_iqdb].include?(params[:action]) %>
<li class="nav-item">
<%= link_to "Upload Image", new_yiff_rest_api_v2_manage_image_path(api_image: ({ category: @sp[:category] } if @sp[:category])), class: "nav-link#{if_active(' active', path: new_yiff_rest_api_v2_manage_image_path(manage_id: params[:id]))}" %>
</li>
@ -28,7 +28,7 @@
<% end %>
<% end %>
<li class="nav-item">
<%= link_to("IQDB", iqdb_query_yiff_rest_api_v2_manage_images_path, class: "nav-link") %>
<%= link_to("IQDB", iqdb_yiff_rest_api_v2_manage_images_path, class: "nav-link") %>
</li>
<% end %>
</ul>