Commit 7a2912ea authored by Justin Ho Tuan Duong's avatar Justin Ho Tuan Duong Committed by Martin Wortschack

Replace exclamation-triangle with GitLab SVG

In HAML
parent 623db01b
<script> <script>
import { GlIcon } from '@gitlab/ui';
import { __, sprintf } from '~/locale'; import { __, sprintf } from '~/locale';
export default { export default {
components: {
GlIcon,
},
props: { props: {
user: { user: {
type: Object, type: Object,
...@@ -46,6 +50,6 @@ export default { ...@@ -46,6 +50,6 @@ export default {
class="avatar avatar-inline m-0" class="avatar avatar-inline m-0"
data-qa-selector="avatar_image" data-qa-selector="avatar_image"
/> />
<i v-if="hasMergeIcon" aria-hidden="true" class="fa fa-exclamation-triangle merge-icon"></i> <gl-icon v-if="hasMergeIcon" name="warning-solid" aria-hidden="true" class="merge-icon" />
</span> </span>
</template> </template>
...@@ -112,11 +112,12 @@ export default { ...@@ -112,11 +112,12 @@ export default {
/> />
<button v-if="hasMoreThanTwoAssignees" class="btn-link" type="button"> <button v-if="hasMoreThanTwoAssignees" class="btn-link" type="button">
<span class="avatar-counter sidebar-avatar-counter"> {{ sidebarAvatarCounter }} </span> <span class="avatar-counter sidebar-avatar-counter"> {{ sidebarAvatarCounter }} </span>
<i <gl-icon
v-if="isMergeRequest && !allAssigneesCanMerge" v-if="isMergeRequest && !allAssigneesCanMerge"
name="warning-solid"
aria-hidden="true" aria-hidden="true"
class="fa fa-exclamation-triangle merge-icon" class="merge-icon"
></i> />
</button> </button>
</div> </div>
</template> </template>
...@@ -97,11 +97,12 @@ export default { ...@@ -97,11 +97,12 @@ export default {
<collapsed-reviewer v-for="user in collapsedUsers" :key="user.id" :user="user" /> <collapsed-reviewer v-for="user in collapsedUsers" :key="user.id" :user="user" />
<button v-if="hasMoreThanTwoReviewers" class="btn-link" type="button"> <button v-if="hasMoreThanTwoReviewers" class="btn-link" type="button">
<span class="avatar-counter sidebar-avatar-counter"> {{ sidebarAvatarCounter }} </span> <span class="avatar-counter sidebar-avatar-counter"> {{ sidebarAvatarCounter }} </span>
<i <gl-icon
v-if="!allReviewersCanMerge" v-if="!allReviewersCanMerge"
name="warning-solid"
aria-hidden="true" aria-hidden="true"
class="fa fa-exclamation-triangle merge-icon" class="merge-icon"
></i> />
</button> </button>
</div> </div>
</template> </template>
<script> <script>
// NOTE! For the first iteration, we are simply copying the implementation of Assignees // NOTE! For the first iteration, we are simply copying the implementation of Assignees
// It will soon be overhauled in Issue https://gitlab.com/gitlab-org/gitlab/-/issues/233736 // It will soon be overhauled in Issue https://gitlab.com/gitlab-org/gitlab/-/issues/233736
import { GlIcon } from '@gitlab/ui';
import { __, sprintf } from '~/locale'; import { __, sprintf } from '~/locale';
export default { export default {
components: {
GlIcon,
},
props: { props: {
user: { user: {
type: Object, type: Object,
...@@ -38,6 +42,6 @@ export default { ...@@ -38,6 +42,6 @@ export default {
class="avatar avatar-inline m-0" class="avatar avatar-inline m-0"
data-qa-selector="avatar_image" data-qa-selector="avatar_image"
/> />
<i v-if="hasMergeIcon" aria-hidden="true" class="fa fa-exclamation-triangle merge-icon"></i> <gl-icon v-if="hasMergeIcon" name="warning-solid" aria-hidden="true" class="merge-icon" />
</span> </span>
</template> </template>
...@@ -796,7 +796,7 @@ UsersSelect.prototype.renderRowAvatar = function(issuableType, user, img) { ...@@ -796,7 +796,7 @@ UsersSelect.prototype.renderRowAvatar = function(issuableType, user, img) {
const mergeIcon = const mergeIcon =
issuableType === 'merge_request' && !user.can_merge issuableType === 'merge_request' && !user.can_merge
? `${spriteIcon('warning-solid', 's12 merge-icon')}` ? spriteIcon('warning-solid', 's12 merge-icon')
: ''; : '';
return `<span class="position-relative mr-2"> return `<span class="position-relative mr-2">
......
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
position: absolute; position: absolute;
bottom: 0; bottom: 0;
right: 0; right: 0;
text-shadow: -1px -1px 2px $white, 1px -1px 2px $white, -1px 1px 2px $white, 1px 1px 2px $white; filter: drop-shadow(0 0 0.5px $white) drop-shadow(0 0 1px $white) drop-shadow(0 0 2px $white);
} }
} }
...@@ -391,6 +391,13 @@ ...@@ -391,6 +391,13 @@
text-align: center; text-align: center;
} }
.merge-icon {
height: 12px;
width: 12px;
bottom: -5px;
right: 4px;
}
.sidebar-collapsed-icon { .sidebar-collapsed-icon {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -401,7 +408,7 @@ ...@@ -401,7 +408,7 @@
text-align: center; text-align: center;
color: $gl-text-color-secondary; color: $gl-text-color-secondary;
svg { > svg {
fill: $gl-text-color-secondary; fill: $gl-text-color-secondary;
} }
...@@ -409,7 +416,7 @@ ...@@ -409,7 +416,7 @@
&:hover .todo-undone { &:hover .todo-undone {
color: $gl-text-color; color: $gl-text-color;
svg { > svg {
fill: $gl-text-color; fill: $gl-text-color;
} }
} }
...@@ -481,10 +488,6 @@ ...@@ -481,10 +488,6 @@
display: none; display: none;
} }
.merge-icon {
font-size: 10px;
}
.multiple-users { .multiple-users {
position: relative; position: relative;
height: 24px; height: 24px;
......
...@@ -287,10 +287,6 @@ $mr-widget-min-height: 69px; ...@@ -287,10 +287,6 @@ $mr-widget-min-height: 69px;
margin-top: 0; margin-top: 0;
margin-bottom: 0; margin-bottom: 0;
&.has-conflicts .fa-exclamation-triangle {
color: $orange-500;
}
time { time {
font-weight: $gl-font-weight-normal; font-weight: $gl-font-weight-normal;
} }
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
- if current_user.admin? - if current_user.admin?
.text-warning .text-warning
%p %p
= icon("exclamation-triangle fw") = sprite_icon('warning-solid')
= html_escape(_('You are an admin, which means granting access to %{client_name} will allow them to interact with GitLab as an admin as well. Proceed with caution.')) % { client_name: tag.strong(@pre_auth.client.name) } = html_escape(_('You are an admin, which means granting access to %{client_name} will allow them to interact with GitLab as an admin as well. Proceed with caution.')) % { client_name: tag.strong(@pre_auth.client.name) }
%p %p
- link_to_client = link_to(@pre_auth.client.name, @pre_auth.redirect_uri, target: '_blank', rel: 'noopener noreferrer') - link_to_client = link_to(@pre_auth.client.name, @pre_auth.redirect_uri, target: '_blank', rel: 'noopener noreferrer')
......
- if project.archived? - if project.archived?
.text-warning.center.prepend-top-20 .text-warning.center.prepend-top-20
%p %p
= icon("exclamation-triangle fw") = sprite_icon('warning-solid')
= _('Archived project! Repository and other project resources are read only') = _('Archived project! Repository and other project resources are read only')
%h4 %h4
= icon('exclamation-triangle') = sprite_icon('warning-solid')
This merge request failed to be merged automatically This merge request failed to be merged automatically
%p %p
......
%tr.tree-truncated-warning %tr.tree-truncated-warning
%td{ colspan: '3' } %td{ colspan: '3' }
= icon('exclamation-triangle fw') = sprite_icon('warning-solid')
%span %span
Too many items to show. To preserve performance only Too many items to show. To preserve performance only
%strong #{number_with_delimiter(limit)} of #{number_with_delimiter(total)} %strong #{number_with_delimiter(limit)} of #{number_with_delimiter(total)}
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
- if referenced_users - if referenced_users
.referenced-users.hide .referenced-users.hide
%span %span
= icon("exclamation-triangle") = sprite_icon('warning-solid')
You are about to add You are about to add
%strong %strong
%span.js-referenced-users-count 0 %span.js-referenced-users-count 0
......
---
title: Replace fa-exclamation-triangle icons with GitLab SVG warning-solid icon
merge_request: 47089
author:
type: changed
...@@ -3,5 +3,5 @@ ...@@ -3,5 +3,5 @@
- if project.archived? - if project.archived?
.text-warning.center.prepend-top-20 .text-warning.center.prepend-top-20
%p %p
= icon("exclamation-triangle fw") = sprite_icon('warning-solid')
= _('Archived project! Repository and other project resources are read-only') = _('Archived project! Repository and other project resources are read-only')
- if project.marked_for_deletion? - if project.marked_for_deletion?
.text-warning.center.prepend-top-20 .text-warning.center.prepend-top-20
%p %p
= icon("exclamation-triangle fw") = sprite_icon('warning-solid')
= _("Deletion pending. This project will be removed on %{date}. Repository and other project resources are read-only.") % { date: permanent_deletion_date(project.marked_for_deletion_at) } = _("Deletion pending. This project will be removed on %{date}. Repository and other project resources are read-only.") % { date: permanent_deletion_date(project.marked_for_deletion_at) }
- if @project.mirror_ever_updated_successfully? && @repository.diverged_from_upstream?(branch.name) - if @project.mirror_ever_updated_successfully? && @repository.diverged_from_upstream?(branch.name)
%span.badge.badge-danger.gl-ml-2.has-tooltip{ data: { html: "true", title: branch_diverged_tooltip_message } } %span.badge.badge-danger.gl-ml-2.has-tooltip{ data: { html: "true", title: branch_diverged_tooltip_message } }
= icon('exclamation-triangle') = sprite_icon('warning-solid')
= s_('Branches|diverged from upstream') = s_('Branches|diverged from upstream')
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
- if @ref.present? && @project.mirror_ever_updated_successfully? && @repository.diverged_from_upstream?(@ref) - if @ref.present? && @project.mirror_ever_updated_successfully? && @repository.diverged_from_upstream?(@ref)
%span.has-tooltip{ data: { html: "true", title: branch_diverged_tooltip_message } } %span.has-tooltip{ data: { html: "true", title: branch_diverged_tooltip_message } }
= icon('exclamation-triangle') = sprite_icon('warning-solid')
This branch has diverged from upstream. This branch has diverged from upstream.
.project-mirror-button .project-mirror-button
= render "shared/mirror_update_button" = render "shared/mirror_update_button"
- error_messages = @project.repository_size_checker.error_message - error_messages = @project.repository_size_checker.error_message
%h4.size-limit-reached %h4.size-limit-reached
= icon("exclamation-triangle") = sprite_icon('warning-solid')
= error_messages.merge_error = error_messages.merge_error
%p %p
......
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