From ac5739982af584a98bd434a3271ae67bff9d2060 Mon Sep 17 00:00:00 2001 From: Marwin Hochfelsner <50826859+hlfan@users.noreply.github.com> Date: Mon, 26 May 2025 16:24:17 +0200 Subject: [PATCH] Store more icons separately --- app/assets/images/icons/company.svg | 3 +++ app/assets/images/icons/feed.svg | 4 ++++ app/assets/images/icons/gear.svg | 4 ++++ app/assets/images/icons/home_location.svg | 3 +++ app/assets/images/icons/language.svg | 3 +++ app/assets/images/icons/link.svg | 4 ++++ app/assets/images/icons/notice.svg | 3 +++ app/helpers/svg_helper.rb | 6 ------ app/views/accounts/deletions/show.html.erb | 2 +- app/views/changesets/show.html.erb | 7 +------ app/views/directions/show.html.erb | 6 +----- app/views/layouts/_flash.html.erb | 2 +- app/views/layouts/_select_language_button.html.erb | 11 ++++------- app/views/traces/index.html.erb | 9 +++------ app/views/users/show.html.erb | 10 ++-------- 15 files changed, 37 insertions(+), 40 deletions(-) create mode 100644 app/assets/images/icons/company.svg create mode 100644 app/assets/images/icons/feed.svg create mode 100644 app/assets/images/icons/gear.svg create mode 100644 app/assets/images/icons/home_location.svg create mode 100644 app/assets/images/icons/language.svg create mode 100644 app/assets/images/icons/link.svg create mode 100644 app/assets/images/icons/notice.svg diff --git a/app/assets/images/icons/company.svg b/app/assets/images/icons/company.svg new file mode 100644 index 000000000..a81a414db --- /dev/null +++ b/app/assets/images/icons/company.svg @@ -0,0 +1,3 @@ + diff --git a/app/assets/images/icons/feed.svg b/app/assets/images/icons/feed.svg new file mode 100644 index 000000000..6a8c70ed8 --- /dev/null +++ b/app/assets/images/icons/feed.svg @@ -0,0 +1,4 @@ + diff --git a/app/assets/images/icons/gear.svg b/app/assets/images/icons/gear.svg new file mode 100644 index 000000000..c14fa7382 --- /dev/null +++ b/app/assets/images/icons/gear.svg @@ -0,0 +1,4 @@ + diff --git a/app/assets/images/icons/home_location.svg b/app/assets/images/icons/home_location.svg new file mode 100644 index 000000000..19f6619c6 --- /dev/null +++ b/app/assets/images/icons/home_location.svg @@ -0,0 +1,3 @@ + diff --git a/app/assets/images/icons/language.svg b/app/assets/images/icons/language.svg new file mode 100644 index 000000000..eea81da58 --- /dev/null +++ b/app/assets/images/icons/language.svg @@ -0,0 +1,3 @@ + diff --git a/app/assets/images/icons/link.svg b/app/assets/images/icons/link.svg new file mode 100644 index 000000000..8692914d9 --- /dev/null +++ b/app/assets/images/icons/link.svg @@ -0,0 +1,4 @@ + diff --git a/app/assets/images/icons/notice.svg b/app/assets/images/icons/notice.svg new file mode 100644 index 000000000..ed6afa11c --- /dev/null +++ b/app/assets/images/icons/notice.svg @@ -0,0 +1,3 @@ + diff --git a/app/helpers/svg_helper.rb b/app/helpers/svg_helper.rb index fe9e4727f..5daa176f7 100644 --- a/app/helpers/svg_helper.rb +++ b/app/helpers/svg_helper.rb @@ -1,10 +1,4 @@ module SvgHelper - def notice_svg_tag - path_data = "M 2 0 C 0.892 0 0 0.892 0 2 L 0 14 C 0 15.108 0.892 16 2 16 L 14 16 C 15.108 16 16 15.108 16 14 L 16 2 C 16 0.892 15.108 0 14 0 L 2 0 z M 7 3 L 9 3 L 9 8 L 7 8 L 7 3 z M 7 10 L 9 10 L 9 12 L 7 12 L 7 10 z" - path_tag = tag.path :d => path_data, :fill => "currentColor" - tag.svg path_tag, :width => 16, :height => 16 - end - def previous_page_svg_tag(**) adjacent_page_svg_tag(dir == "rtl" ? 1 : -1, **) end diff --git a/app/views/accounts/deletions/show.html.erb b/app/views/accounts/deletions/show.html.erb index 5a22aa67b..dd21894c0 100644 --- a/app/views/accounts/deletions/show.html.erb +++ b/app/views/accounts/deletions/show.html.erb @@ -6,7 +6,7 @@
<%= t ".warning" %>
diff --git a/app/views/changesets/show.html.erb b/app/views/changesets/show.html.erb index 429ce55d2..a3d55b87a 100644 --- a/app/views/changesets/show.html.erb +++ b/app/views/changesets/show.html.erb @@ -50,12 +50,7 @@ :data => { :method => comment.visible ? "DELETE" : "POST", :url => api_changeset_comment_visibility_path(comment) } %> <% end %> - - - + <%= link_to inline_svg_tag("icons/link.svg"), "#c#{comment.id}" %>