app/components/signum/notification_body/component.html.slim in signum-0.7.2 vs app/components/signum/notification_body/component.html.slim in signum-0.7.4
- old
+ new
@@ -1,6 +1,6 @@
-.signum-notification-body data-controller="signum-notification-body" data-signum-notification-body-type-value=data[:type] data-signum-notification-body-timeout-value=data[:timeout] data-signum-notification-body-sticky-value="#{signal.sticky.present? ? signal.sticky.to_s : 'false'}" data-signum-notification-body-signal-state-value="#{signal.state}" data-signum-notification-body-signal-id-value="#{signal.id}" id="notification_#{data[:type]}_#{signal.signalable_id}_#{signal.id}"
+.signum-notification-body data-controller="signum-notification-body" data-signum-notification-body-type-value=data[:type] data-signum-notification-body-timeout-value=data[:timeout] data-signum-notification-body-sticky-value="#{signal.sticky.present? ? signal.sticky.to_s : 'false'}" data-signum-notification-body-signal-state-value="#{signal.state}" data-signum-notification-body-signal-id-value="#{signal.id}" id="#{Signum.config.notification_body_id.call(data[:type], signal)}"
.signum-notification-body__mb
.signum-notification-body__mb__bc
.signum-notification-body__mb__bc__ic
- if signal.icon.present?
= "<i class='#{signal.kind} #{signal.icon}' ></i>".html_safe
@@ -13,10 +13,10 @@
= sanitize signal.text
- if signal.links.present?
.signum-notification-body__mb__bc__mc__lkc
- signal.links.each do | link |
- next unless link.is_a?(Hash)
- a.signum-notification-body__mb__bc__mc__lkc__lk*{href: link.fetch('url', '#'), target:link.fetch("target", "_blank"), 'data-action': button["close"] ? "click->signum-notification-body#close" : "" }.merge(link.fetch("link_attributes", {}))
+ a.signum-notification-body__mb__bc__mc__lkc__lk*{href: link.fetch('url', '#'), target:link.fetch("target", "_blank"), 'data-action': link["close"] ? "click->signum-notification-body#close" : "" }.merge(link.fetch("link_attributes", {}))
i.fas.fa-link
=< link["title"] || link["url"] || '(...)'
- if signal.attachments.attached?
.signum-notification-body__mb__bc__mc__attc
- signal.attachments.each do | attachment |