From 9cdba33385132eeb35bb1175db0531093037139e Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 9 Oct 2020 12:09:07 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- app/views/admin/abuse_reports/_abuse_report.html.haml | 2 +- .../application_settings/_repository_check.html.haml | 2 +- app/views/admin/applications/_delete_form.html.haml | 2 +- app/views/admin/deploy_keys/index.html.haml | 2 +- app/views/admin/groups/_group.html.haml | 2 +- app/views/admin/hooks/edit.html.haml | 2 +- app/views/admin/serverless/domains/_form.html.haml | 6 +++--- app/views/admin/spam_logs/_spam_log.html.haml | 2 +- app/views/admin/users/show.html.haml | 2 +- app/views/doorkeeper/applications/_delete_form.html.haml | 2 +- .../authorized_applications/_delete_form.html.haml | 2 +- app/views/groups/projects.html.haml | 2 +- app/views/groups/settings/_permanent_deletion.html.haml | 2 +- app/views/projects/artifacts/_artifact.html.haml | 2 +- app/views/projects/branches/_branch.html.haml | 8 ++++---- app/views/projects/branches/index.html.haml | 2 +- app/views/projects/buttons/_remove_tag.html.haml | 2 +- app/views/projects/edit.html.haml | 4 ++-- app/views/projects/no_repo.html.haml | 2 +- app/views/projects/pages/_destroy.haml | 2 +- app/views/projects/pages/_list.html.haml | 2 +- app/views/projects/pages_domains/_certificate.html.haml | 2 +- .../pipeline_schedules/_pipeline_schedule.html.haml | 2 +- app/views/shared/_delete_label_modal.html.haml | 2 +- app/views/shared/members/_group.html.haml | 2 +- package.json | 2 +- spec/features/admin/admin_groups_spec.rb | 2 +- spec/features/groups/members/leave_group_spec.rb | 2 +- spec/features/groups/members/manage_groups_spec.rb | 2 +- .../projects/branches/user_deletes_branch_spec.rb | 2 +- spec/features/projects/branches_spec.rb | 4 ++-- spec/features/projects/environments/environment_spec.rb | 2 +- .../projects/members/groups_with_access_list_spec.rb | 2 +- spec/features/projects/members/list_spec.rb | 2 +- spec/features/protected_branches_spec.rb | 2 +- yarn.lock | 8 ++++---- 36 files changed, 46 insertions(+), 46 deletions(-) diff --git a/app/views/admin/abuse_reports/_abuse_report.html.haml b/app/views/admin/abuse_reports/_abuse_report.html.haml index 5ed9a0d1adb..883586c6780 100644 --- a/app/views/admin/abuse_reports/_abuse_report.html.haml +++ b/app/views/admin/abuse_reports/_abuse_report.html.haml @@ -22,7 +22,7 @@ %td - if user = link_to _('Remove user & report'), admin_abuse_report_path(abuse_report, remove_user: true), - data: { confirm: _("USER %{user} WILL BE REMOVED! Are you sure?") % { user: user.name } }, remote: true, method: :delete, class: "btn btn-sm btn-block btn-remove js-remove-tr" + data: { confirm: _("USER %{user} WILL BE REMOVED! Are you sure?") % { user: user.name } }, remote: true, method: :delete, class: "gl-button btn btn-sm btn-block btn-danger js-remove-tr" - if user && !user.blocked? = link_to _('Block user'), block_admin_user_path(user), data: {confirm: _('USER WILL BE BLOCKED! Are you sure?')}, method: :put, class: "btn btn-sm btn-block" - else diff --git a/app/views/admin/application_settings/_repository_check.html.haml b/app/views/admin/application_settings/_repository_check.html.haml index e6874cc3f78..985dee6f594 100644 --- a/app/views/admin/application_settings/_repository_check.html.haml +++ b/app/views/admin/application_settings/_repository_check.html.haml @@ -18,7 +18,7 @@ If you got a lot of false alarms from repository checks you can choose to clear all repository check information from the database. - clear_repository_checks_link = _('Clear all repository checks') - clear_repository_checks_message = _('This will clear repository check states for ALL projects in the database. This cannot be undone. Are you sure?') - = link_to clear_repository_checks_link, clear_repository_check_states_admin_application_settings_path, data: { confirm: clear_repository_checks_message }, method: :put, class: "btn btn-sm btn-remove" + = link_to clear_repository_checks_link, clear_repository_check_states_admin_application_settings_path, data: { confirm: clear_repository_checks_message }, method: :put, class: "gl-button btn btn-sm btn-danger" .sub-section %h4 Housekeeping diff --git a/app/views/admin/applications/_delete_form.html.haml b/app/views/admin/applications/_delete_form.html.haml index 86f09bf1cb0..d348ad507c2 100644 --- a/app/views/admin/applications/_delete_form.html.haml +++ b/app/views/admin/applications/_delete_form.html.haml @@ -1,4 +1,4 @@ -- submit_btn_css ||= 'btn btn-link btn-remove btn-sm' +- submit_btn_css ||= 'gl-button btn btn-danger btn-sm' = form_tag admin_application_path(application) do %input{ :name => "_method", :type => "hidden", :value => "delete" }/ = submit_tag 'Destroy', class: submit_btn_css, data: { confirm: _('Are you sure?') } diff --git a/app/views/admin/deploy_keys/index.html.haml b/app/views/admin/deploy_keys/index.html.haml index e00367a8789..9b6aa278906 100644 --- a/app/views/admin/deploy_keys/index.html.haml +++ b/app/views/admin/deploy_keys/index.html.haml @@ -28,6 +28,6 @@ %td .float-right = link_to _('Edit'), edit_admin_deploy_key_path(deploy_key), class: 'btn gl-button btn-sm' - = link_to _('Remove'), admin_deploy_key_path(deploy_key), data: { confirm: _('Are you sure?') }, method: :delete, class: 'btn gl-button btn-sm btn-remove delete-key' + = link_to _('Remove'), admin_deploy_key_path(deploy_key), data: { confirm: _('Are you sure?') }, method: :delete, class: 'gl-button btn btn-sm btn-danger delete-key' - else = render 'shared/empty_states/deploy_keys' diff --git a/app/views/admin/groups/_group.html.haml b/app/views/admin/groups/_group.html.haml index 3a82f3803bd..a667fc7ca04 100644 --- a/app/views/admin/groups/_group.html.haml +++ b/app/views/admin/groups/_group.html.haml @@ -34,4 +34,4 @@ .controls.gl-flex-shrink-0.gl-ml-5 = link_to _('Edit'), admin_group_edit_path(group), id: "edit_#{dom_id(group)}", class: 'btn' - = link_to _('Delete'), [:admin, group], data: { confirm: _("Are you sure you want to remove %{group_name}?") % { group_name: group.name } }, method: :delete, class: 'btn btn-remove' + = link_to _('Delete'), [:admin, group], data: { confirm: _("Are you sure you want to remove %{group_name}?") % { group_name: group.name } }, method: :delete, class: 'gl-button btn btn-danger' diff --git a/app/views/admin/hooks/edit.html.haml b/app/views/admin/hooks/edit.html.haml index 924cc0fe54f..74f73b4972a 100644 --- a/app/views/admin/hooks/edit.html.haml +++ b/app/views/admin/hooks/edit.html.haml @@ -11,7 +11,7 @@ .form-actions %span>= f.submit _('Save changes'), class: 'btn gl-button btn-success gl-mr-3' = render 'shared/web_hooks/test_button', hook: @hook - = link_to _('Delete'), admin_hook_path(@hook), method: :delete, class: 'btn gl-button btn-remove float-right', data: { confirm: _('Are you sure?') } + = link_to _('Delete'), admin_hook_path(@hook), method: :delete, class: 'btn gl-button btn-danger float-right', data: { confirm: _('Are you sure?') } %hr diff --git a/app/views/admin/serverless/domains/_form.html.haml b/app/views/admin/serverless/domains/_form.html.haml index 9e7990ef8ca..fab1795e136 100644 --- a/app/views/admin/serverless/domains/_form.html.haml +++ b/app/views/admin/serverless/domains/_form.html.haml @@ -50,7 +50,7 @@ .d-flex.justify-content-between.align-items-center.p-3 %span = @domain.subject || _('missing') - %button.btn.btn-remove.btn-sm.js-domain-cert-replace-btn{ type: 'button' } + %button.gl-button.btn.btn-danger.btn-sm.js-domain-cert-replace-btn{ type: 'button' } = _('Replace') .js-domain-cert-inputs{ class: ('hidden' if show_certificate_card) } @@ -67,7 +67,7 @@ = f.submit @domain.persisted? ? _('Save changes') : _('Add domain'), class: "btn btn-success js-serverless-domain-submit", disabled: @domain.persisted? - if @domain.persisted? - %button.btn.btn-remove{ type: 'button', data: { toggle: 'modal', target: "#modal-delete-domain" } } + %button.gl-button.btn.btn-danger{ type: 'button', data: { toggle: 'modal', target: "#modal-delete-domain" } } = _('Delete domain') -# haml-lint:disable NoPlainNodes @@ -95,5 +95,5 @@ admin_serverless_domain_path(@domain.id), title: _('Delete'), method: :delete, - class: "btn btn-remove", + class: "gl-button btn btn-danger", disabled: domain_attached diff --git a/app/views/admin/spam_logs/_spam_log.html.haml b/app/views/admin/spam_logs/_spam_log.html.haml index 9d47dc1cce5..a381efcb0f2 100644 --- a/app/views/admin/spam_logs/_spam_log.html.haml +++ b/app/views/admin/spam_logs/_spam_log.html.haml @@ -24,7 +24,7 @@ %td - if user = link_to 'Remove user', admin_spam_log_path(spam_log, remove_user: true), - data: { confirm: "USER #{user.name} WILL BE REMOVED! Are you sure?" }, method: :delete, class: "btn btn-sm btn-remove" + data: { confirm: "USER #{user.name} WILL BE REMOVED! Are you sure?" }, method: :delete, class: "gl-button btn btn-sm btn-danger" %td - if spam_log.submitted_as_ham? .btn.btn-sm.disabled diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml index a08c29714e0..2d1ada78248 100644 --- a/app/views/admin/users/show.html.haml +++ b/app/views/admin/users/show.html.haml @@ -54,7 +54,7 @@ %strong{ class: @user.two_factor_enabled? ? 'cgreen' : 'cred' } - if @user.two_factor_enabled? Enabled - = link_to 'Disable', disable_two_factor_admin_user_path(@user), data: {confirm: 'Are you sure?'}, method: :patch, class: 'btn gl-button btn-sm btn-remove float-right', title: 'Disable Two-factor Authentication' + = link_to 'Disable', disable_two_factor_admin_user_path(@user), data: {confirm: 'Are you sure?'}, method: :patch, class: 'btn gl-button btn-sm btn-danger float-right', title: 'Disable Two-factor Authentication' - else Disabled diff --git a/app/views/doorkeeper/applications/_delete_form.html.haml b/app/views/doorkeeper/applications/_delete_form.html.haml index 77b7a50338c..64b872b5610 100644 --- a/app/views/doorkeeper/applications/_delete_form.html.haml +++ b/app/views/doorkeeper/applications/_delete_form.html.haml @@ -1,4 +1,4 @@ -- submit_btn_css ||= 'btn btn-link btn-remove btn-sm' +- submit_btn_css ||= 'gl-button btn btn-danger btn-sm' = form_tag oauth_application_path(application) do %input{ :name => "_method", :type => "hidden", :value => "delete" }/ - if defined? small diff --git a/app/views/doorkeeper/authorized_applications/_delete_form.html.haml b/app/views/doorkeeper/authorized_applications/_delete_form.html.haml index 9bc5e2ee42f..d73d171798e 100644 --- a/app/views/doorkeeper/authorized_applications/_delete_form.html.haml +++ b/app/views/doorkeeper/authorized_applications/_delete_form.html.haml @@ -5,4 +5,4 @@ = form_tag path do %input{ :name => "_method", :type => "hidden", :value => "delete" }/ - = submit_tag _('Revoke'), class: 'btn btn-remove btn-sm', data: { confirm: _('Are you sure?') } + = submit_tag _('Revoke'), class: 'gl-button btn btn-danger btn-sm', data: { confirm: _('Are you sure?') } diff --git a/app/views/groups/projects.html.haml b/app/views/groups/projects.html.haml index 555c4004a3f..4fa2fc6fd4d 100644 --- a/app/views/groups/projects.html.haml +++ b/app/views/groups/projects.html.haml @@ -15,7 +15,7 @@ .controls = link_to _('Members'), project_project_members_path(project), id: "edit_#{dom_id(project)}", class: "btn" = link_to _('Edit'), edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn" - = link_to _('Delete'), project, data: { confirm: remove_project_message(project)}, method: :delete, class: "btn btn-remove" + = link_to _('Delete'), project, data: { confirm: remove_project_message(project)}, method: :delete, class: "gl-button btn btn-danger" .stats %span.badge.badge-pill diff --git a/app/views/groups/settings/_permanent_deletion.html.haml b/app/views/groups/settings/_permanent_deletion.html.haml index 5cdcdefae8c..14719200b45 100644 --- a/app/views/groups/settings/_permanent_deletion.html.haml +++ b/app/views/groups/settings/_permanent_deletion.html.haml @@ -5,4 +5,4 @@ = _('Removing this group also removes all child projects, including archived projects, and their resources.') %br %strong= _('Removed group can not be restored!') - = button_to _('Remove group'), '#', class: 'btn btn-remove js-confirm-danger', data: { 'confirm-danger-message' => remove_group_message(group) } + = button_to _('Remove group'), '#', class: 'gl-button btn btn-danger js-confirm-danger', data: { 'confirm-danger-message' => remove_group_message(group) } diff --git a/app/views/projects/artifacts/_artifact.html.haml b/app/views/projects/artifacts/_artifact.html.haml index 81c5a634616..4b453e8fafd 100644 --- a/app/views/projects/artifacts/_artifact.html.haml +++ b/app/views/projects/artifacts/_artifact.html.haml @@ -57,5 +57,5 @@ = sprite_icon('folder-open') - if can?(current_user, :destroy_artifacts, @project) - = link_to project_artifact_path(@project, artifact), data: { placement: 'top', container: 'body', confirm: _('Are you sure you want to delete these artifacts?') }, method: :delete, title: _('Delete artifacts'), ref: 'tooltip', aria: { label: _('Delete artifacts') }, class: 'btn btn-remove has-tooltip' do + = link_to project_artifact_path(@project, artifact), data: { placement: 'top', container: 'body', confirm: _('Are you sure you want to delete these artifacts?') }, method: :delete, title: _('Delete artifacts'), ref: 'tooltip', aria: { label: _('Delete artifacts') }, class: 'gl-button btn btn-danger has-tooltip' do = sprite_icon('remove') diff --git a/app/views/projects/branches/_branch.html.haml b/app/views/projects/branches/_branch.html.haml index 020a4361203..30e710ead7f 100644 --- a/app/views/projects/branches/_branch.html.haml +++ b/app/views/projects/branches/_branch.html.haml @@ -50,13 +50,13 @@ - if can?(current_user, :push_code, @project) - if branch.name == @project.repository.root_ref - %button{ class: "btn btn-remove remove-row has-tooltip disabled", + %button{ class: "gl-button btn btn-danger remove-row has-tooltip disabled", disabled: true, title: s_('Branches|The default branch cannot be deleted') } = sprite_icon("remove") - elsif protected_branch?(@project, branch) - if can?(current_user, :push_to_delete_protected_branch, @project) - %button{ class: "btn btn-remove remove-row has-tooltip", + %button{ class: "gl-button btn btn-danger remove-row has-tooltip", title: s_('Branches|Delete protected branch'), data: { toggle: "modal", target: "#modal-delete-branch", @@ -65,13 +65,13 @@ is_merged: ("true" if merged) } } = sprite_icon("remove") - else - %button{ class: "btn btn-remove remove-row has-tooltip disabled", + %button{ class: "gl-button btn btn-danger remove-row has-tooltip disabled", disabled: true, title: s_('Branches|Only a project maintainer or owner can delete a protected branch') } = sprite_icon("remove") - else = link_to project_branch_path(@project, branch.name), - class: "btn btn-remove remove-row qa-remove-btn js-ajax-loading-spinner has-tooltip", + class: "gl-button btn btn-danger remove-row qa-remove-btn js-ajax-loading-spinner has-tooltip", title: s_('Branches|Delete branch'), method: :delete, data: { confirm: s_("Branches|Deleting the '%{branch_name}' branch cannot be undone. Are you sure?") % { branch_name: branch.name } }, diff --git a/app/views/projects/branches/index.html.haml b/app/views/projects/branches/index.html.haml index ba42f43088f..f3561ed5078 100644 --- a/app/views/projects/branches/index.html.haml +++ b/app/views/projects/branches/index.html.haml @@ -34,7 +34,7 @@ - if can? current_user, :push_code, @project = link_to project_merged_branches_path(@project), - class: 'btn btn-inverted btn-remove has-tooltip qa-delete-merged-branches', + class: 'gl-button btn btn-danger btn-danger-secondary has-tooltip qa-delete-merged-branches', title: s_("Branches|Delete all branches that are merged into '%{default_branch}'") % { default_branch: @project.repository.root_ref }, method: :delete, data: { confirm: s_('Branches|Deleting the merged branches cannot be undone. Are you sure?'), diff --git a/app/views/projects/buttons/_remove_tag.html.haml b/app/views/projects/buttons/_remove_tag.html.haml index bc378b847be..ae776e93203 100644 --- a/app/views/projects/buttons/_remove_tag.html.haml +++ b/app/views/projects/buttons/_remove_tag.html.haml @@ -2,5 +2,5 @@ - tag = local_assigns.fetch(:tag, nil) - return unless project && tag -%button{ type: "button", class: "js-remove-tag js-confirm-modal-button gl-button btn btn-remove remove-row has-tooltip gl-ml-3 #{protected_tag?(project, tag) ? 'disabled' : ''}", title: s_('TagsPage|Delete tag'), data: { container: 'body', path: project_tag_path(@project, tag.name), modal_attributes: delete_tag_modal_attributes(tag.name) } } +%button{ type: "button", class: "js-remove-tag js-confirm-modal-button gl-button btn btn-danger remove-row has-tooltip gl-ml-3 #{protected_tag?(project, tag) ? 'disabled' : ''}", title: s_('TagsPage|Delete tag'), data: { container: 'body', path: project_tag_path(@project, tag.name), modal_attributes: delete_tag_modal_attributes(tag.name) } } = sprite_icon("remove") diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml index a9693f985db..63d571e718e 100644 --- a/app/views/projects/edit.html.haml +++ b/app/views/projects/edit.html.haml @@ -107,7 +107,7 @@ %li= _('You can only transfer the project to namespaces you manage.') %li= _('You will need to update your local repositories to point to the new location.') %li= _('Project visibility level will be changed to match namespace rules when transferring to a group.') - = f.submit 'Transfer project', class: "btn btn-remove js-confirm-danger qa-transfer-button", data: { "confirm-danger-message" => transfer_project_message(@project) } + = f.submit 'Transfer project', class: "gl-button btn btn-danger js-confirm-danger qa-transfer-button", data: { "confirm-danger-message" => transfer_project_message(@project) } - if @project.forked? && can?(current_user, :remove_fork_project, @project) .sub-section @@ -117,7 +117,7 @@ = form_for @project, url: remove_fork_project_path(@project), method: :delete, remote: true, html: { class: 'transfer-project' } do |f| %p %strong= _('Once removed, the fork relationship cannot be restored and you will no longer be able to send merge requests to the source.') - = button_to _('Remove fork relationship'), '#', class: "btn btn-remove js-confirm-danger", data: { "confirm-danger-message" => remove_fork_project_warning_message(@project) } + = button_to _('Remove fork relationship'), '#', class: "gl-button btn btn-danger js-confirm-danger", data: { "confirm-danger-message" => remove_fork_project_warning_message(@project) } = render 'remove', project: @project diff --git a/app/views/projects/no_repo.html.haml b/app/views/projects/no_repo.html.haml index 0ab9d9c4005..c44d3da23bb 100644 --- a/app/views/projects/no_repo.html.haml +++ b/app/views/projects/no_repo.html.haml @@ -22,4 +22,4 @@ - if can? current_user, :remove_project, @project .prepend-top-20 - = link_to _('Delete project'), project_path(@project), data: { confirm: remove_project_message(@project)}, method: :delete, class: "btn btn-inverted btn-remove float-right" + = link_to _('Delete project'), project_path(@project), data: { confirm: remove_project_message(@project)}, method: :delete, class: "gl-button btn btn-danger btn-danger-secondary float-right" diff --git a/app/views/projects/pages/_destroy.haml b/app/views/projects/pages/_destroy.haml index 0833eba2c27..2714b5f221a 100644 --- a/app/views/projects/pages/_destroy.haml +++ b/app/views/projects/pages/_destroy.haml @@ -8,7 +8,7 @@ %p = s_('GitLabPages|Removing pages will prevent them from being exposed to the outside world.') .form-actions - = link_to s_('GitLabPages|Remove pages'), project_pages_path(@project), data: { confirm: s_('GitLabPages|Are you sure?')}, method: :delete, class: "btn gl-button btn-remove" + = link_to s_('GitLabPages|Remove pages'), project_pages_path(@project), data: { confirm: s_('GitLabPages|Are you sure?')}, method: :delete, class: "btn gl-button btn-danger" - else .nothing-here-block = s_('GitLabPages|Only project maintainers can remove pages') diff --git a/app/views/projects/pages/_list.html.haml b/app/views/projects/pages/_list.html.haml index 05e9e569a04..84c8ab0ceba 100644 --- a/app/views/projects/pages/_list.html.haml +++ b/app/views/projects/pages/_list.html.haml @@ -22,7 +22,7 @@ = s_('GitLabPages|Expired') %div = link_to s_('GitLabPages|Edit'), project_pages_domain_path(@project, domain), class: "btn gl-button btn-sm btn-grouped btn-success btn-inverted" - = link_to s_('GitLabPages|Remove'), project_pages_domain_path(@project, domain), data: { confirm: s_('GitLabPages|Are you sure?')}, method: :delete, class: "btn gl-button btn-remove btn-sm btn-grouped" + = link_to s_('GitLabPages|Remove'), project_pages_domain_path(@project, domain), data: { confirm: s_('GitLabPages|Are you sure?')}, method: :delete, class: "btn gl-button btn-danger btn-sm btn-grouped" - if domain.needs_verification? %li.list-group-item.bs-callout-warning - details_link_start = "".html_safe diff --git a/app/views/projects/pages_domains/_certificate.html.haml b/app/views/projects/pages_domains/_certificate.html.haml index 16d949c416b..33db7896065 100644 --- a/app/views/projects/pages_domains/_certificate.html.haml +++ b/app/views/projects/pages_domains/_certificate.html.haml @@ -40,7 +40,7 @@ = link_to _('Remove'), clean_certificate_project_pages_domain_path(@project, domain_presenter), data: { confirm: _('Are you sure?') }, - class: 'btn btn-remove btn-sm', + class: 'gl-button btn btn-danger btn-sm', method: :delete - else .row diff --git a/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml b/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml index ca71aa8a24d..45aaf2b64bf 100644 --- a/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml +++ b/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml @@ -36,5 +36,5 @@ = link_to edit_pipeline_schedule_path(pipeline_schedule), title: _('Edit'), class: 'btn gl-display-flex' do = sprite_icon('pencil') - if can?(current_user, :admin_pipeline_schedule, pipeline_schedule) - = link_to pipeline_schedule_path(pipeline_schedule), title: _('Delete'), method: :delete, class: 'btn btn-remove', data: { confirm: _("Are you sure you want to delete this pipeline schedule?") } do + = link_to pipeline_schedule_path(pipeline_schedule), title: _('Delete'), method: :delete, class: 'gl-button btn btn-danger', data: { confirm: _("Are you sure you want to delete this pipeline schedule?") } do = sprite_icon('remove') diff --git a/app/views/shared/_delete_label_modal.html.haml b/app/views/shared/_delete_label_modal.html.haml index ffc34ff34c3..8d761e3b9c4 100644 --- a/app/views/shared/_delete_label_modal.html.haml +++ b/app/views/shared/_delete_label_modal.html.haml @@ -17,4 +17,4 @@ label.destroy_path, title: _('Delete'), method: :delete, - class: 'btn btn-remove' + class: 'gl-button btn btn-danger' diff --git a/app/views/shared/members/_group.html.haml b/app/views/shared/members/_group.html.haml index cd24942616c..42e12d92a7d 100644 --- a/app/views/shared/members/_group.html.haml +++ b/app/views/shared/members/_group.html.haml @@ -44,7 +44,7 @@ = link_to group_link_path, method: :delete, data: { confirm: _("Are you sure you want to remove %{group_name}?") % { group_name: group.name }, qa_selector: 'delete_group_access_link' }, - class: 'btn btn-remove m-0 ml-sm-2 align-self-center' do + class: 'gl-button btn btn-danger m-0 ml-sm-2 align-self-center' do %span.d-block.d-sm-none = _("Delete") = sprite_icon('remove', css_class: 'd-none d-sm-block') diff --git a/package.json b/package.json index cf42c227095..ed0d631a036 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@babel/preset-env": "^7.10.1", "@gitlab/at.js": "1.5.5", "@gitlab/svgs": "1.171.0", - "@gitlab/ui": "21.22.0", + "@gitlab/ui": "21.25.0", "@gitlab/visual-review-tools": "1.6.1", "@rails/actioncable": "^6.0.3-3", "@rails/ujs": "^6.0.3-2", diff --git a/spec/features/admin/admin_groups_spec.rb b/spec/features/admin/admin_groups_spec.rb index f5c5a73c042..653a45a4bb8 100644 --- a/spec/features/admin/admin_groups_spec.rb +++ b/spec/features/admin/admin_groups_spec.rb @@ -194,7 +194,7 @@ RSpec.describe 'Admin Groups' do expect(page).to have_content('Developer') end - accept_confirm { find(:css, 'li', text: current_user.name).find(:css, 'a.btn-remove').click } + accept_confirm { find(:css, 'li', text: current_user.name).find(:css, 'a.btn-danger').click } visit group_group_members_path(group) diff --git a/spec/features/groups/members/leave_group_spec.rb b/spec/features/groups/members/leave_group_spec.rb index 9eb5cc15c5e..32acf7edd2a 100644 --- a/spec/features/groups/members/leave_group_spec.rb +++ b/spec/features/groups/members/leave_group_spec.rb @@ -70,7 +70,7 @@ RSpec.describe 'Groups > Members > Leave group' do visit group_group_members_path(group) - expect(find(:css, '.project-members-page li', text: user.name)).not_to have_selector(:css, 'a.btn-remove') + expect(find(:css, '.project-members-page li', text: user.name)).to have_no_selector(:css, 'a.btn-danger') end it 'owner can not leave the group by url param if they are the last owner', :js do diff --git a/spec/features/groups/members/manage_groups_spec.rb b/spec/features/groups/members/manage_groups_spec.rb index 8a7d997d5ac..33caa3af36d 100644 --- a/spec/features/groups/members/manage_groups_spec.rb +++ b/spec/features/groups/members/manage_groups_spec.rb @@ -64,7 +64,7 @@ RSpec.describe 'Groups > Members > Manage groups', :js do expect(page).to have_content(shared_with_group.name) accept_confirm do - find(:css, '#tab-groups li', text: shared_with_group.name).find(:css, 'a.btn-remove').click + find(:css, '#tab-groups li', text: shared_with_group.name).find(:css, 'a.btn-danger').click end expect(page).not_to have_content(shared_with_group.name) diff --git a/spec/features/projects/branches/user_deletes_branch_spec.rb b/spec/features/projects/branches/user_deletes_branch_spec.rb index 21a1d31bad4..c480c41709c 100644 --- a/spec/features/projects/branches/user_deletes_branch_spec.rb +++ b/spec/features/projects/branches/user_deletes_branch_spec.rb @@ -17,7 +17,7 @@ RSpec.describe "User deletes branch", :js do fill_in("branch-search", with: "improve/awesome").native.send_keys(:enter) page.within(".js-branch-improve\\/awesome") do - accept_alert { find(".btn-remove").click } + accept_alert { find(".btn-danger").click } end wait_for_requests diff --git a/spec/features/projects/branches_spec.rb b/spec/features/projects/branches_spec.rb index 4224fdbc1fc..dcad7ee66a3 100644 --- a/spec/features/projects/branches_spec.rb +++ b/spec/features/projects/branches_spec.rb @@ -101,7 +101,7 @@ RSpec.describe 'Branches' do visit project_branches_filtered_path(project, state: 'all') expect(all('.all-branches').last).to have_selector('li', count: 20) - accept_confirm { first('.js-branch-item .btn-remove').click } + accept_confirm { first('.js-branch-item .btn-danger').click } expect(all('.all-branches').last).to have_selector('li', count: 19) end @@ -163,7 +163,7 @@ RSpec.describe 'Branches' do expect(page).to have_content('fix') expect(find('.all-branches')).to have_selector('li', count: 1) - accept_confirm { find('.js-branch-fix .btn-remove').click } + accept_confirm { find('.js-branch-fix .btn-danger').click } expect(page).not_to have_content('fix') expect(find('.all-branches')).to have_selector('li', count: 0) diff --git a/spec/features/projects/environments/environment_spec.rb b/spec/features/projects/environments/environment_spec.rb index fa10e429af2..1d7be7fa7a3 100644 --- a/spec/features/projects/environments/environment_spec.rb +++ b/spec/features/projects/environments/environment_spec.rb @@ -333,7 +333,7 @@ RSpec.describe 'Environment' do visit project_branches_filtered_path(project, state: 'all', search: 'feature') remove_branch_with_hooks(project, user, 'feature') do - page.within('.js-branch-feature') { find('a.btn-remove').click } + page.within('.js-branch-feature') { find('a.btn-danger').click } end visit_environment(environment) diff --git a/spec/features/projects/members/groups_with_access_list_spec.rb b/spec/features/projects/members/groups_with_access_list_spec.rb index d652f6715db..d59f8eb4b1d 100644 --- a/spec/features/projects/members/groups_with_access_list_spec.rb +++ b/spec/features/projects/members/groups_with_access_list_spec.rb @@ -64,7 +64,7 @@ RSpec.describe 'Projects > Members > Groups with access list', :js do it 'deletes group link' do page.within(first('.group_member')) do - accept_confirm { find('.btn-remove').click } + accept_confirm { find('.btn-danger').click } end wait_for_requests diff --git a/spec/features/projects/members/list_spec.rb b/spec/features/projects/members/list_spec.rb index b32ccb0ccef..36ff461aac2 100644 --- a/spec/features/projects/members/list_spec.rb +++ b/spec/features/projects/members/list_spec.rb @@ -102,7 +102,7 @@ RSpec.describe 'Project members list' do visit_members_page expect(page).not_to have_selector("#edit_project_member_#{project_member.id}") - expect(page).not_to have_selector("#project_member_#{project_member.id} .btn-remove") + expect(page).to have_no_selector("#project_member_#{project_member.id} .btn-danger") end end diff --git a/spec/features/protected_branches_spec.rb b/spec/features/protected_branches_spec.rb index d8d9ccb5c6f..3be01595502 100644 --- a/spec/features/protected_branches_spec.rb +++ b/spec/features/protected_branches_spec.rb @@ -31,7 +31,7 @@ RSpec.describe 'Protected Branches', :js do fill_in 'branch-search', with: 'fix' find('#branch-search').native.send_keys(:enter) - expect(page).to have_css('.btn-remove.disabled') + expect(page).to have_css('.btn-danger.disabled') end end end diff --git a/yarn.lock b/yarn.lock index 4d76fab8050..912ecb18167 100644 --- a/yarn.lock +++ b/yarn.lock @@ -866,10 +866,10 @@ resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-1.171.0.tgz#abc3092bf804f0898301626130e0f3231834924a" integrity sha512-TPfdqIxQDda+0CQHhb9XdF50lmqDmADu6yT8R4oZi6BoUtWLdiHbyFt+RnVU6t7EmjIKicNAii7Ga+f2ljCfUA== -"@gitlab/ui@21.22.0": - version "21.22.0" - resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-21.22.0.tgz#349f6ff83f2ad2fc35e9d0345b7938b436f7bbbb" - integrity sha512-P7008dec7mUx6vMCpESy8hBfI2TftVYrwxnCtJKD3VIOG5jyPHr3lXxDiUwZRKdbLt9NFMLKWCm+tVPpbx05gw== +"@gitlab/ui@21.25.0": + version "21.25.0" + resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-21.25.0.tgz#993f7c179ffdcb6a421057cdb82de1a8bdc27d76" + integrity sha512-UoBfxQTOugSAEBeoCPQCcZKc0JAKKcAMLunPkaATh9A2lo1oAyGp0EnW4607dDiceDkG78BZXxmTQ2UEtkiU5g== dependencies: "@babel/standalone" "^7.0.0" "@gitlab/vue-toasted" "^1.3.0"