2019-12-10 02:53:40 -05:00
|
|
|
-# We currently only support `alert`, `notice`, `success`, 'toast'
|
2021-04-14 08:09:25 -04:00
|
|
|
- icons = {'alert' => 'error', 'notice' => 'information-o', 'success' => 'check-circle'}
|
2020-11-05 19:09:14 -05:00
|
|
|
.flash-container.flash-container-page.sticky{ data: { qa_selector: 'flash_container' } }
|
2017-11-20 11:40:01 -05:00
|
|
|
- flash.each do |key, value|
|
2019-12-10 02:53:40 -05:00
|
|
|
- if key == 'toast' && value
|
|
|
|
.js-toast-message{ data: { message: value } }
|
2021-06-24 14:07:15 -04:00
|
|
|
- elsif value == I18n.t('devise.failure.unconfirmed')
|
|
|
|
= render 'shared/confirm_your_email_alert'
|
2019-12-10 02:53:40 -05:00
|
|
|
- elsif value
|
2019-11-18 04:06:43 -05:00
|
|
|
%div{ class: "flash-#{key} mb-2" }
|
2020-08-10 14:09:54 -04:00
|
|
|
= sprite_icon(icons[key], css_class: 'align-middle mr-1') unless icons[key].nil?
|
2019-09-03 05:03:35 -04:00
|
|
|
%span= value
|
2020-07-17 17:09:23 -04:00
|
|
|
- if %w(alert notice success).include?(key)
|
|
|
|
%div{ class: "close-icon-wrapper js-close-icon" }
|
2020-09-15 14:09:43 -04:00
|
|
|
= sprite_icon('close', css_class: 'close-icon gl-vertical-align-baseline!')
|