Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/pull/4759'
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhughes committed May 6, 2024
2 parents e6ed4f6 + 29e1336 commit 31d879d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 77 deletions.
Binary file removed app/assets/images/notice.png
Binary file not shown.
73 changes: 0 additions & 73 deletions app/assets/images/notice.svg

This file was deleted.

6 changes: 6 additions & 0 deletions app/helpers/svg_helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
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(**options)
adjacent_page_svg_tag(dir == "rtl" ? 1 : -1, **options)
end
Expand Down
2 changes: 1 addition & 1 deletion app/views/account/deletions/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<div class="alert alert-danger row mx-0 p-3 align-items-center">
<div class="col-auto">
<%= image_tag("notice.png", :srcset => image_path("notice.svg")) %>
<%= notice_svg_tag %>
</div>
<div class="col">
<p class="mb-0"><%= t ".warning" %></p>
Expand Down
6 changes: 3 additions & 3 deletions app/views/layouts/_flash.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<% if flash[:error] %>
<div class="alert alert-danger row mx-0 mb-0 p-3 rounded-0 align-items-center">
<div class="col-auto">
<%= image_tag("notice.png", :srcset => image_path("notice.svg")) %>
<%= notice_svg_tag %>
</div>
<div class="col"><%= render_flash(flash[:error]) %></div>
</div>
Expand All @@ -10,7 +10,7 @@
<% if flash[:warning] %>
<div class="alert alert-warning row mx-0 mb-0 p-3 rounded-0 align-items-center">
<div class="col-auto">
<%= image_tag("notice.png", :srcset => image_path("notice.svg")) %>
<%= notice_svg_tag %>
</div>
<div class="col"><%= render_flash(flash[:warning]) %></div>
</div>
Expand All @@ -19,7 +19,7 @@
<% if flash[:notice] %>
<div class="alert alert-success row mx-0 mb-0 p-3 rounded-0 align-items-center">
<div class="col-auto">
<%= image_tag("notice.png", :srcset => image_path("notice.svg")) %>
<%= notice_svg_tag %>
</div>
<div class="col"><%= render_flash(flash[:notice]) %></div>
</div>
Expand Down

0 comments on commit 31d879d

Please sign in to comment.