Commit a522f94c authored by Martin Wortschack's avatar Martin Wortschack

Replace fa-warning icons with GitLab SVG

- This MR replaces the fa-warning icon
with the warning-solid SVG
parent aa222194
...@@ -7,11 +7,14 @@ import { deprecatedCreateFlash as createFlash } from './flash'; ...@@ -7,11 +7,14 @@ import { deprecatedCreateFlash as createFlash } from './flash';
import FilesCommentButton from './files_comment_button'; import FilesCommentButton from './files_comment_button';
import initImageDiffHelper from './image_diff/helpers/init_image_diff'; import initImageDiffHelper from './image_diff/helpers/init_image_diff';
import syntaxHighlight from './syntax_highlight'; import syntaxHighlight from './syntax_highlight';
import { spriteIcon } from '~/lib/utils/common_utils';
const WRAPPER = '<div class="diff-content"></div>'; const WRAPPER = '<div class="diff-content"></div>';
const LOADING_HTML = '<span class="spinner"></span>'; const LOADING_HTML = '<span class="spinner"></span>';
const ERROR_HTML = const ERROR_HTML = `<div class="nothing-here-block">${spriteIcon(
'<div class="nothing-here-block"><i class="fa fa-warning"></i> Could not load diff</div>'; 'warning-solid',
's16',
)} Could not load diff</div>`;
const COLLAPSED_HTML = const COLLAPSED_HTML =
'<div class="nothing-here-block diff-collapsed">This diff is collapsed. <button class="click-to-expand btn btn-link">Click to expand it.</button></div>'; '<div class="nothing-here-block diff-collapsed">This diff is collapsed. <button class="click-to-expand btn btn-link">Click to expand it.</button></div>';
......
...@@ -2,13 +2,15 @@ ...@@ -2,13 +2,15 @@
module Ci module Ci
module RunnersHelper module RunnersHelper
include IconsHelper
def runner_status_icon(runner) def runner_status_icon(runner)
status = runner.status status = runner.status
case status case status
when :not_connected when :not_connected
content_tag :i, nil, content_tag(:span, title: "New runner. Has not connected yet") do
class: "fa fa-warning", sprite_icon("warning-solid", size: 24, css_class: "gl-vertical-align-bottom!")
title: "New runner. Has not connected yet" end
when :online, :offline, :paused when :online, :offline, :paused
content_tag :i, nil, content_tag :i, nil,
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
= sprite_icon('check', css_class: 'cgreen') = sprite_icon('check', css_class: 'cgreen')
#{ s_('HealthCheck|Healthy') } #{ s_('HealthCheck|Healthy') }
- else - else
= icon('warning', class: 'cred') = sprite_icon('warning-solid', css_class: 'cred')
#{ s_('HealthCheck|Unhealthy') } #{ s_('HealthCheck|Unhealthy') }
.card-body .card-body
- if no_errors - if no_errors
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
- if @cpus - if @cpus
%h2= _('%{cores} cores') % { cores: @cpus.length } %h2= _('%{cores} cores') % { cores: @cpus.length }
- else - else
= icon('warning', class: 'text-warning') = sprite_icon('warning-solid', css_class: 'text-warning')
= _('Unable to collect CPU info') = _('Unable to collect CPU info')
.bg-light.light-well.gl-mt-3 .bg-light.light-well.gl-mt-3
%h4= _('Memory Usage') %h4= _('Memory Usage')
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
- if @memory - if @memory
%h2 #{number_to_human_size(@memory.active_bytes)} / #{number_to_human_size(@memory.total_bytes)} %h2 #{number_to_human_size(@memory.active_bytes)} / #{number_to_human_size(@memory.total_bytes)}
- else - else
= icon('warning', class: 'text-warning') = sprite_icon('warning-solid', css_class: 'text-warning')
= _('Unable to collect memory info') = _('Unable to collect memory info')
.bg-light.light-well.gl-mt-3 .bg-light.light-well.gl-mt-3
%h4= _('Uptime') %h4= _('Uptime')
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
- if ref - if ref
- if generic_commit_status.ref - if generic_commit_status.ref
.icon-container .icon-container
= generic_commit_status.tags.any? ? icon('tag') : sprite_icon('fork', size: 10) = generic_commit_status.tags.any? ? sprite_icon('tag', size: 10) : sprite_icon('fork', size: 10)
= link_to generic_commit_status.ref, project_commits_path(generic_commit_status.project, generic_commit_status.ref) = link_to generic_commit_status.ref, project_commits_path(generic_commit_status.project, generic_commit_status.ref)
- else - else
.light none .light none
...@@ -30,7 +30,8 @@ ...@@ -30,7 +30,8 @@
= link_to generic_commit_status.short_sha, project_commit_path(generic_commit_status.project, generic_commit_status.sha), class: "commit-sha" = link_to generic_commit_status.short_sha, project_commit_path(generic_commit_status.project, generic_commit_status.sha), class: "commit-sha"
- if retried - if retried
= icon('warning', class: 'text-warning has-tooltip', title: 'Status was retried.') %span.has-tooltip{ title: _('Status was retried.') }
= sprite_icon('warning-solid', class: 'text-warning')
.label-container .label-container
- if generic_commit_status.tags.any? - if generic_commit_status.tags.any?
......
- breadcrumb_title _("Details") - breadcrumb_title _("Details")
- page_title _("Details") - page_title _("Details")
%h2 %h2.gl-display-flex
%i.fa.fa-warning .gl-display-flex.gl-align-items-center.gl-justify-content-center
#{ _('No repository') } = sprite_icon('warning-solid', size: 24, css_class: 'gl-mr-2')
= _('No repository')
%p.slead %p.slead
#{ _('The repository for this project does not exist.') } #{ _('The repository for this project does not exist.') }
......
.bs-callout.bs-callout-warning .bs-callout.bs-callout-warning
%i.fa.fa-warning = sprite_icon("warning-solid", css_class: "gl-text-orange-600")
%strong= _("Warning:") %strong= _("Warning:")
- pages_host = Gitlab.config.pages.host - pages_host = Gitlab.config.pages.host
= s_("GitLabPages|When using Pages under the general domain of a GitLab instance (%{pages_host}), you cannot use HTTPS with sub-subdomains. This means that if your username/groupname contains a dot it will not work. This is a limitation of the HTTP Over TLS protocol. HTTP pages will continue to work provided you don't redirect HTTP to HTTPS.").html_safe % { pages_host: pages_host } = s_("GitLabPages|When using Pages under the general domain of a GitLab instance (%{pages_host}), you cannot use HTTPS with sub-subdomains. This means that if your username/groupname contains a dot it will not work. This is a limitation of the HTTP Over TLS protocol. HTTP pages will continue to work provided you don't redirect HTTP to HTTPS.").html_safe % { pages_host: pages_host }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
.col-sm-10.offset-sm-2 .col-sm-10.offset-sm-2
.bs-callout.bs-callout-warning.mt-0 .bs-callout.bs-callout-warning.mt-0
.row.align-items-center.mx-2 .row.align-items-center.mx-2
= icon('warning', class: 'mr-2') = sprite_icon('warning-solid', css_class: ' mr-2 gl-text-orange-600')
= _("Something went wrong while obtaining the Let's Encrypt certificate.") = _("Something went wrong while obtaining the Let's Encrypt certificate.")
.row.mx-0.mt-3 .row.mx-0.mt-3
= link_to s_('GitLabPagesDomains|Retry'), retry_auto_ssl_project_pages_domain_path(@project, domain_presenter), class: "btn btn-sm btn-grouped btn-warning", method: :post = link_to s_('GitLabPagesDomains|Retry'), retry_auto_ssl_project_pages_domain_path(@project, domain_presenter), class: "btn btn-sm btn-grouped btn-warning", method: :post
......
---
title: Replace fa-warning icons with GitLab SVG warning-solid icon
merge_request: 46214
author:
type: changed
...@@ -8,7 +8,7 @@ module EE ...@@ -8,7 +8,7 @@ module EE
return message if raw_message return message if raw_message
message = icon('warning') + ' ' + message message = sprite_icon('warning-solid') + ' ' + message
if can?(current_user, :admin_project, @project) if can?(current_user, :admin_project, @project)
link_to message, project_mirror_path(@project) link_to message, project_mirror_path(@project)
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
As #{ldap_group_link.human_access} on #{ldap_group_link.provider_label} server As #{ldap_group_link.human_access} on #{ldap_group_link.provider_label} server
- else - else
.cred .cred
%i.fa.fa-warning = sprite_icon('warning-solid')
Config for LDAP server Config for LDAP server
%code= ldap_group_link.provider %code= ldap_group_link.provider
is not present in GitLab is not present in GitLab
......
...@@ -46,7 +46,8 @@ RSpec.describe 'shared/_mirror_status.html.haml' do ...@@ -46,7 +46,8 @@ RSpec.describe 'shared/_mirror_status.html.haml' do
render 'shared/mirror_status' render 'shared/mirror_status'
expect(rendered).to have_content("Pull mirroring failed") expect(rendered).to have_content("Pull mirroring failed")
expect(rendered).to have_css('i', class: 'fa-warning')
expect(rendered).to have_selector('[data-testid="warning-solid-icon"]')
end end
context 'with a previous successful update' do context 'with a previous successful update' do
......
...@@ -25393,6 +25393,9 @@ msgstr "" ...@@ -25393,6 +25393,9 @@ msgstr ""
msgid "Status" msgid "Status"
msgstr "" msgstr ""
msgid "Status was retried."
msgstr ""
msgid "Status:" msgid "Status:"
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment