Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-02-10 15:18:48 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-02-10 15:18:48 +0300
commit190128fc72e015c383e7a96c128276d1833f3beb (patch)
treec9defcce34e8e0661c3a2cebe78847e9d9f14a39 /app/views/layouts/_flash.html.haml
parentde74d20b2596c8d27987744d24a7fc09fbe8ff37 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views/layouts/_flash.html.haml')
-rw-r--r--app/views/layouts/_flash.html.haml3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/views/layouts/_flash.html.haml b/app/views/layouts/_flash.html.haml
index dded5ba76b0..21cccb86398 100644
--- a/app/views/layouts/_flash.html.haml
+++ b/app/views/layouts/_flash.html.haml
@@ -1,5 +1,6 @@
-# We currently only support `alert`, `notice`, `success`, 'toast', and 'raw'
- icons = {'alert' => 'error', 'notice' => 'information-o', 'success' => 'check-circle'}
+- type_to_variant = {'alert' => 'danger', 'notice' => 'info', 'success' => 'success'}
.flash-container.flash-container-page.sticky{ data: { qa_selector: 'flash_container' } }
- flash.each do |key, value|
- if key == 'toast' && value
@@ -9,7 +10,7 @@
- elsif value == I18n.t('devise.failure.unconfirmed')
= render 'shared/confirm_your_email_alert'
- elsif value
- %div{ class: "flash-#{key} mb-2" }
+ %div{ class: "flash-#{key} mb-2", data: { testid: "alert-#{type_to_variant[key]}" } }
= sprite_icon(icons[key], css_class: 'align-middle mr-1') unless icons[key].nil?
%span= value
- if %w(alert notice success).include?(key)