From 7a7d8c0dcc305225d3da50deafbbb0fd9f5dd078 Mon Sep 17 00:00:00 2001 From: Donovan Daniels Date: Sun, 13 Oct 2024 02:43:10 -0500 Subject: [PATCH] Fix iqdb link & add score cutoff to form --- app/views/yiff_rest/api_v2/images/iqdb.html.erb | 1 + app/views/yiff_rest/api_v2/manage/_nav.html.erb | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/yiff_rest/api_v2/images/iqdb.html.erb b/app/views/yiff_rest/api_v2/images/iqdb.html.erb index 5671316..1651782 100644 --- a/app/views/yiff_rest/api_v2/images/iqdb.html.erb +++ b/app/views/yiff_rest/api_v2/images/iqdb.html.erb @@ -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 %> diff --git a/app/views/yiff_rest/api_v2/manage/_nav.html.erb b/app/views/yiff_rest/api_v2/manage/_nav.html.erb index 367fec8..e58eff6 100644 --- a/app/views/yiff_rest/api_v2/manage/_nav.html.erb +++ b/app/views/yiff_rest/api_v2/manage/_nav.html.erb @@ -13,7 +13,7 @@ <% 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]) %> @@ -28,7 +28,7 @@ <% end %> <% end %> <% end %>