Use an icon for the button

This commit is contained in:
Kevin McConnell
2025-03-26 11:41:06 +00:00
parent e7d9259828
commit b1803e9853
4 changed files with 8 additions and 2 deletions
@@ -0,0 +1 @@
<svg enable-background="new 0 0 24 24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m15.9 19.5-11-11c-.3.8-.4 1.7-.4 2.6v4.9c0 .8-.7 1.5-1.5 1.5-.6 0-1 .4-1 1s.4 1 1 1z"/><path d="m9.5 21.2v.3c0 1.4 1.1 2.5 2.5 2.5s2.5-1.1 2.5-2.5c0-.1 0-.2 0-.3s-.1-.2-.2-.2h-4.5c-.2 0-.3.1-.3.2z"/><path d="m23.7 23.7c.4-.4.4-1 0-1.4l-2.8-2.8h.1c.6 0 1-.4 1-1s-.4-1-1-1c-.8 0-1.5-.7-1.5-1.5v-4.9c.1-3.9-2.6-7.4-6.5-8.1v-2c0-.6-.4-1-1-1s-1 .4-1 1v2.1c-1.6.3-3.1 1-4.3 2.3l-5-5c-.4-.4-1-.4-1.4 0-.4.4-.4 1 0 1.4l22 22c.2.2.4.3.7.3.3-.1.5-.2.7-.4z"/></svg>

After

Width:  |  Height:  |  Size: 557 B

@@ -0,0 +1 @@
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m21 17.5a1.5 1.5 0 0 1 -1.5-1.5v-4.862a7.957 7.957 0 0 0 -6.5-8.065v-2.073a1 1 0 0 0 -2 0v2.073a7.957 7.957 0 0 0 -6.5 8.065v4.862a1.5 1.5 0 0 1 -1.5 1.5 1 1 0 0 0 0 2h18a1 1 0 0 0 0-2z"/><path d="m14.236 21h-4.472a.25.25 0 0 0 -.248.222 2.319 2.319 0 0 0 -.016.278 2.5 2.5 0 1 0 5 0 2.319 2.319 0 0 0 -.016-.278.248.248 0 0 0 -.248-.222z"/></svg>

After

Width:  |  Height:  |  Size: 416 B

@@ -0,0 +1 @@
<svg enable-background="new 0 0 24 24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m7 16.4c0-5 4-9 9-9 1.1 0 2.2.2 3.2.6-.6-1.8-1.8-3.3-3.3-4.4-.7-.5-1.5-.8-2.3-.9v-1.2c-.1-.8-.8-1.5-1.6-1.5s-1.5.7-1.5 1.5v1.1c-1 .2-2 .6-2.9 1.3-2.2 1.8-3.4 4.4-3.3 7.2v.8c0 2.5-.6 5.1-1.7 7.3-.1.2 0 .5.2.7 0 .1.1.1.2.1h4.7c-.4-1.1-.7-2.3-.7-3.6z"/><path d="m22.1 11.4c-1.6-1.6-3.9-2.4-6.2-2.3-4.1 0-7.4 3.3-7.4 7.4s3.3 7.4 7.4 7.4c.7 0 1.5-.1 2.2-.3.5-.1.8-.7.6-1.2s-.7-.8-1.2-.6c-2.9.9-6-.7-6.9-3.6s.7-6 3.6-6.9c.5-.2 1.1-.2 1.6-.2 1.8-.1 3.5.5 4.8 1.7.9.9 1.4 2.1 1.4 3.4s-.6 2.6-1.5 2.6c-.1 0-.2 0-.3 0v-5c0-.5-.4-.9-.9-.9-.3 0-.6.2-.8.5-.7-.6-1.6-.9-2.5-.9-2.3 0-4.1 1.8-4.1 4.1s1.8 4.1 4.1 4.1c1 0 1.9-.3 2.6-1 .1.2.2.3.3.4.5.4 1.1.6 1.7.6 2 0 3.4-1.9 3.4-4.5 0-1.8-.7-3.5-1.9-4.8zm-6.2 7.4c-1.2 0-2.2-1-2.2-2.2s1-2.2 2.2-2.2 2.2 1 2.2 2.2-1 2.2-2.2 2.2z"/></svg>

After

Width:  |  Height:  |  Size: 873 B

+5 -2
View File
@@ -17,8 +17,11 @@ module AccessesHelper
access = bucket.access_for(user)
turbo_frame_tag dom_id(bucket, :involvement_button) do
button_to access.involvement, bucket_involvement_path(bucket), method: :put, class: "btn",
params: { involvement: next_involvement(access.involvement) }
button_to bucket_involvement_path(bucket), method: :put, class: "btn", params: { involvement: next_involvement(access.involvement) } do
image_tag("notification-bell-#{access.involvement.dasherize}.svg", aria: { hidden: true }, size: 24) +
# TODO: should the screen reader label include the state we're in, or the state the button sets it to?
tag.span("#{bucket.name} notification settings", class: "for-screen-reader")
end
end
end