style(message): replace legacy icons

This commit is contained in:
Colin Darie 2023-11-28 14:45:15 +01:00
parent 72b0bb3fa4
commit e9471d2843
No known key found for this signature in database
GPG key ID: 8C76CADD40253590
4 changed files with 5 additions and 13 deletions

View file

@ -22,10 +22,6 @@
background: $light-grey;
}
.person-icon {
margin-right: $default-spacer;
}
h2 {
margin-bottom: $default-spacer;
}

View file

@ -47,10 +47,6 @@
h2 {
font-size: 110%;
}
.person-icon {
display: none;
}
}
}

View file

@ -33,13 +33,13 @@ class Dossiers::MessageComponent < ApplicationComponent
end
end
def icon_path
def icon
if commentaire.sent_by_system?
'icons/mail.svg'
dsfr_icon('fr-icon-message-2-fill', :sm, :mr)
elsif commentaire.sent_by?(connected_user)
'icons/account-circle.svg'
dsfr_icon('fr-icon-user-fill', :sm, :mr)
else
'icons/blue-person.svg'
dsfr_icon('fr-icon-discuss-fill', :sm, :mr)
end
end

View file

@ -1,4 +1,4 @@
= image_tag(icon_path, class: 'person-icon', alt: '')
= icon
.width-100
%h2.fr-h6