diff --git a/app/assets/images/clipboard.svg b/app/assets/images/clipboard.svg new file mode 100644 index 000000000..4467e7204 --- /dev/null +++ b/app/assets/images/clipboard.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/comment.svg b/app/assets/images/comment.svg new file mode 100644 index 000000000..26eb50ca9 --- /dev/null +++ b/app/assets/images/comment.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/stylesheets/events.css b/app/assets/stylesheets/events.css index 7b2d79385..008e619e1 100644 --- a/app/assets/stylesheets/events.css +++ b/app/assets/stylesheets/events.css @@ -120,3 +120,20 @@ grid-row-start: unset !important; } } + +.event__icon { + aspect-ratio: 1; + background-color: var(--bubble-color); + block-size: 1.7em; + border-radius: 1.7em; + inline-size: 1.7em; + display: grid; + place-content: center; + margin-inline-end: -0.75em; + + img { + block-size: 1.1em; + inline-size: 1.1em; + grid-area: 1 / 1; + } +} diff --git a/app/helpers/events_helper.rb b/app/helpers/events_helper.rb index 88bd09f68..15e28b709 100644 --- a/app/helpers/events_helper.rb +++ b/app/helpers/events_helper.rb @@ -92,4 +92,19 @@ module EventsHelper "#{event.creator.name} renamed on #{ event.bubble.title } (was: '#{event.particulars.dig('particulars', 'old_title')})'".html_safe end end + + def event_action_icon(event) + case event.action + when "assigned" + "clipboard" + when "boosted" + "thumb-up" + when "staged" + "bolt" + when "commented" + "comment" + else + "person" + end + end end diff --git a/app/views/events/_event.html.erb b/app/views/events/_event.html.erb index f1cc451fb..ce46c90cc 100644 --- a/app/views/events/_event.html.erb +++ b/app/views/events/_event.html.erb @@ -13,9 +13,17 @@