From 0776ad3977dc55032a33265d40e9aaef2f45ef42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toma=CC=81s=CC=8C=20Durc=CC=8Ca=CC=81k?= Date: Mon, 30 Sep 2024 08:00:48 +0200 Subject: [PATCH] Refactoring after review --- .../admin/tags/tag_form_component.html.erb | 2 +- .../filters/filter_form_component.html.erb | 2 +- app/components/icons/grip_component.html.erb | 3 --- app/components/icons/grip_component.rb | 6 ------ app/components/icons/star_component.html.erb | 7 ------- app/components/icons/star_component.rb | 15 --------------- 6 files changed, 2 insertions(+), 33 deletions(-) delete mode 100644 app/components/icons/grip_component.html.erb delete mode 100644 app/components/icons/grip_component.rb delete mode 100644 app/components/icons/star_component.html.erb delete mode 100644 app/components/icons/star_component.rb diff --git a/app/components/admin/tags/tag_form_component.html.erb b/app/components/admin/tags/tag_form_component.html.erb index 64584441b..1201aaec4 100644 --- a/app/components/admin/tags/tag_form_component.html.erb +++ b/app/components/admin/tags/tag_form_component.html.erb @@ -26,7 +26,7 @@
- <%= form.label :icon, "Icona" %> + <%= form.label :icon, "Ikona" %> <%= form.select :icon, helpers.icon_select_options, {}, class: "block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6" %>
diff --git a/app/components/filters/filter_form_component.html.erb b/app/components/filters/filter_form_component.html.erb index c98fbe623..d0782ce07 100644 --- a/app/components/filters/filter_form_component.html.erb +++ b/app/components/filters/filter_form_component.html.erb @@ -28,7 +28,7 @@ <% end %>
- <%= form.label :icon, "Icona" %> + <%= form.label :icon, "Ikona" %> <%= form.select :icon, helpers.icon_select_options, {}, class: "block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6" %>
diff --git a/app/components/icons/grip_component.html.erb b/app/components/icons/grip_component.html.erb deleted file mode 100644 index d3459f4b4..000000000 --- a/app/components/icons/grip_component.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512" stroke-width="<%= @stroke_width %>" stroke="currentColor" style="aspect-ratio: 1.6;"> - - \ No newline at end of file diff --git a/app/components/icons/grip_component.rb b/app/components/icons/grip_component.rb deleted file mode 100644 index d2b374863..000000000 --- a/app/components/icons/grip_component.rb +++ /dev/null @@ -1,6 +0,0 @@ -class Icons::GripComponent < ViewComponent::Base - def initialize(css_classes: nil, stroke_width: 1.5) - @css_classes = css_classes - @stroke_width = stroke_width - end -end diff --git a/app/components/icons/star_component.html.erb b/app/components/icons/star_component.html.erb deleted file mode 100644 index bdd75645c..000000000 --- a/app/components/icons/star_component.html.erb +++ /dev/null @@ -1,7 +0,0 @@ -" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" stroke-width="<%= @stroke_width %>" stroke="currentColor"> - <% if solid? %> - - <% elsif light? %> - - <% end %> - \ No newline at end of file diff --git a/app/components/icons/star_component.rb b/app/components/icons/star_component.rb deleted file mode 100644 index 35832232a..000000000 --- a/app/components/icons/star_component.rb +++ /dev/null @@ -1,15 +0,0 @@ -class Icons::StarComponent < ViewComponent::Base - def initialize(css_classes: nil, stroke_width: 1.5, variant: :solid) - @css_classes = css_classes - @stroke_width = stroke_width - @variant = variant - end - - def solid? - @variant == :solid - end - - def light? - @variant == :light - end -end