diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-01-19 18:10:34 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-01-19 18:10:34 +0300 |
commit | ffa1a49e432cce959676688109e9c71eb08a59f6 (patch) | |
tree | 86f4f820708e2dc5b10f26a86c7d08ed8e11c002 /app | |
parent | 442a79b7336b763ad390285ef75f4e4ff48a9cd0 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/stylesheets/pages/profile.scss | 13 | ||||
-rw-r--r-- | app/models/ci/build_dependencies.rb | 2 | ||||
-rw-r--r-- | app/models/deployment.rb | 3 | ||||
-rw-r--r-- | app/views/admin/users/show.html.haml | 38 | ||||
-rw-r--r-- | app/views/authentication/_register.html.haml | 4 | ||||
-rw-r--r-- | app/views/profiles/emails/index.html.haml | 14 | ||||
-rw-r--r-- | app/views/shared/_email_with_badge.html.haml | 4 | ||||
-rw-r--r-- | app/views/shared/_milestone_expired.html.haml | 6 | ||||
-rw-r--r-- | app/views/shared/milestones/_milestone.html.haml | 4 | ||||
-rw-r--r-- | app/workers/jira_connect/sync_deployments_worker.rb | 1 |
10 files changed, 36 insertions, 53 deletions
diff --git a/app/assets/stylesheets/pages/profile.scss b/app/assets/stylesheets/pages/profile.scss index 3605283245f..60f2ce779f8 100644 --- a/app/assets/stylesheets/pages/profile.scss +++ b/app/assets/stylesheets/pages/profile.scss @@ -378,19 +378,6 @@ table.u2f-registrations, display: inline; margin-right: $gl-padding / 4; } - - .badge-verification-status { - border-width: 1px; - border-style: solid; - - &.verified { - @include green-status-color; - } - - &.unverified { - @include status-color($gray-dark, color('gray'), $common-gray-dark); - } - } } .edit-user { diff --git a/app/models/ci/build_dependencies.rb b/app/models/ci/build_dependencies.rb index a6abeb517c1..b50ecf99439 100644 --- a/app/models/ci/build_dependencies.rb +++ b/app/models/ci/build_dependencies.rb @@ -103,7 +103,7 @@ module Ci end def valid_local? - return true if Feature.enabled?(:ci_disable_validates_dependencies) + return true unless Gitlab::Ci::Features.validate_build_dependencies?(project) local.all?(&:valid_dependency?) end diff --git a/app/models/deployment.rb b/app/models/deployment.rb index 6f40466394a..1eb921da5fa 100644 --- a/app/models/deployment.rb +++ b/app/models/deployment.rb @@ -112,7 +112,6 @@ class Deployment < ApplicationRecord after_transition any => any - [:skipped] do |deployment, transition| next if transition.loopback? - next unless Feature.enabled?(:jira_sync_deployments, deployment.project) deployment.run_after_commit do ::JiraConnect::SyncDeploymentsWorker.perform_async(id) @@ -121,8 +120,6 @@ class Deployment < ApplicationRecord end after_create unless: :importing? do |deployment| - next unless Feature.enabled?(:jira_sync_deployments, deployment.project) - run_after_commit do ::JiraConnect::SyncDeploymentsWorker.perform_async(deployment.id) end diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml index 26f78ea4d6a..380348f9a98 100644 --- a/app/views/admin/users/show.html.haml +++ b/app/views/admin/users/show.html.haml @@ -138,10 +138,10 @@ .col-md-6 - unless @user == current_user - if can_force_email_confirmation?(@user) - .card.border-info - .card-header.bg-info.text-white + .gl-card.border-info.gl-mb-5 + .gl-card-header.bg-info.text-white Confirm user - .card-body + .gl-card-body - if @user.unconfirmed_email.present? - email = " (#{@user.unconfirmed_email})" %p This user has an unconfirmed email address#{email}. You may force a confirmation. @@ -152,19 +152,19 @@ - unless @user.internal? - if @user.deactivated? - .card.border-info - .card-header.bg-info.text-white + .gl-card.border-info.gl-mb-5 + .gl-card-header.bg-info.text-white Reactivate this user - .card-body + .gl-card-body = render partial: 'admin/users/user_activation_effects' %br %button.btn.gl-button.btn-info.js-confirm-modal-button{ data: user_activation_data(@user) } = s_('AdminUsers|Activate user') - elsif @user.can_be_deactivated? - .card.border-warning - .card-header.bg-warning.text-white + .gl-card.border-warning.gl-mb-5 + .gl-card-header.bg-warning.text-white Deactivate this user - .card-body + .gl-card-body = user_deactivation_effects %br %button.btn.gl-button.btn-warning.js-confirm-modal-button{ data: user_deactivation_data(@user, s_('AdminUsers|You can always re-activate their account, their data will remain intact.')) } @@ -174,10 +174,10 @@ = render 'admin/users/approve_user', user: @user = render 'admin/users/reject_pending_user', user: @user - else - .card.border-info - .card-header.gl-bg-blue-500.gl-text-white + .gl-card.border-info.gl-mb-5 + .gl-card-header.gl-bg-blue-500.gl-text-white This user is blocked - .card-body + .gl-card-body %p A blocked user cannot: %ul %li Log in @@ -189,7 +189,7 @@ = render 'admin/users/block_user', user: @user - if @user.access_locked? - .card.border-info + .card.border-info.gl-mb-5 .card-header.bg-info.text-white This account has been locked .card-body @@ -197,10 +197,10 @@ %br = link_to 'Unlock user', unlock_admin_user_path(@user), method: :put, class: "btn gl-button btn-info", data: { confirm: 'Are you sure?' } - if !@user.blocked_pending_approval? - .card.border-danger - .card-header.bg-danger.text-white + .gl-card.border-danger.gl-mb-5 + .gl-card-header.bg-danger.text-white = s_('AdminUsers|Delete user') - .card-body + .gl-card-body - if @user.can_be_removed? && can?(current_user, :destroy_user, @user) %p Deleting a user has the following effects: = render 'users/deletion_guidance', user: @user @@ -221,10 +221,10 @@ %p You don't have access to delete this user. - .card.border-danger - .card-header.bg-danger.text-white + .gl-card.border-danger + .gl-card-header.bg-danger.text-white = s_('AdminUsers|Delete user and contributions') - .card-body + .gl-card-body - if can?(current_user, :destroy_user, @user) %p This option deletes the user and any contributions that diff --git a/app/views/authentication/_register.html.haml b/app/views/authentication/_register.html.haml index f1aa76d115a..912aca99d6a 100644 --- a/app/views/authentication/_register.html.haml +++ b/app/views/authentication/_register.html.haml @@ -7,13 +7,13 @@ - if current_user.two_factor_otp_enabled? .row.gl-mb-3 .col-md-5 - %button#js-setup-token-2fa-device.btn.btn-info= _("Set up new device") + %button#js-setup-token-2fa-device.gl-button.btn.btn-info= _("Set up new device") .col-md-7 %p= _("Your device needs to be set up. Plug it in (if needed) and click the button on the left.") - else .row.gl-mb-3 .col-md-4 - %button#js-setup-token-2fa-device.btn.btn-info.btn-block{ disabled: true }= _("Set up new device") + %button#js-setup-token-2fa-device.gl-button.btn.btn-info.btn-block{ disabled: true }= _("Set up new device") .col-md-8 %p= _("You need to register a two-factor authentication app before you can set up a device.") diff --git a/app/views/profiles/emails/index.html.haml b/app/views/profiles/emails/index.html.haml index 0c6dc1a05d8..0a1b08f3c68 100644 --- a/app/views/profiles/emails/index.html.haml +++ b/app/views/profiles/emails/index.html.haml @@ -37,23 +37,23 @@ %li = render partial: 'shared/email_with_badge', locals: { email: @primary_email, verified: current_user.confirmed? } %span.float-right - %span.badge.badge-success= s_('Profiles|Primary email') + %span.badge.badge-muted.badge-pill.gl-badge.badge-success= s_('Profiles|Primary email') - if @primary_email === current_user.commit_email - %span.badge.badge-info= s_('Profiles|Commit email') + %span.badge.badge-muted.badge-pill.gl-badge.badge-info= s_('Profiles|Commit email') - if @primary_email === current_user.public_email - %span.badge.badge-info= s_('Profiles|Public email') + %span.badge.badge-muted.badge-pill.gl-badge.badge-info= s_('Profiles|Public email') - if @primary_email === current_user.notification_email - %span.badge.badge-info= s_('Profiles|Default notification email') + %span.badge.badge-muted.badge-pill.gl-badge.badge-info= s_('Profiles|Default notification email') - @emails.each do |email| %li{ data: { qa_selector: 'email_row_content' } } = render partial: 'shared/email_with_badge', locals: { email: email.email, verified: email.confirmed? } %span.float-right - if email.email === current_user.commit_email - %span.badge.badge-info= s_('Profiles|Commit email') + %span.badge.badge-muted.badge-pill.gl-badge.badge-info= s_('Profiles|Commit email') - if email.email === current_user.public_email - %span.badge.badge-info= s_('Profiles|Public email') + %span.badge.badge-muted.badge-pill.gl-badge.badge-info= s_('Profiles|Public email') - if email.email === current_user.notification_email - %span.badge.badge-info= s_('Profiles|Notification email') + %span.badge.badge-muted.badge-pill.gl-badge.badge-info= s_('Profiles|Notification email') - unless email.confirmed? - confirm_title = "#{email.confirmation_sent_at ? _('Resend confirmation email') : _('Send confirmation email')}" = link_to confirm_title, resend_confirmation_instructions_profile_email_path(email), method: :put, class: 'gl-button btn btn-sm btn-warning gl-ml-3' diff --git a/app/views/shared/_email_with_badge.html.haml b/app/views/shared/_email_with_badge.html.haml index 294fe74a5ca..8b9ca966ed6 100644 --- a/app/views/shared/_email_with_badge.html.haml +++ b/app/views/shared/_email_with_badge.html.haml @@ -1,5 +1,5 @@ -- css_classes = %w(badge badge-verification-status) -- css_classes << (verified ? 'verified': 'unverified') +- css_classes = %w(badge gl-badge) +- css_classes << (verified ? 'badge-success': 'badge-danger') - text = verified ? _('Verified') : _('Unverified') .email-badge diff --git a/app/views/shared/_milestone_expired.html.haml b/app/views/shared/_milestone_expired.html.haml index 2261e9e3121..171ae9d2c07 100644 --- a/app/views/shared/_milestone_expired.html.haml +++ b/app/views/shared/_milestone_expired.html.haml @@ -1,6 +1,6 @@ - if milestone.expired? and not milestone.closed? - .status-box.status-box-expired.gl-mb-2= _('Expired') + .gl-badge.badge-warning.badge-pill.gl-mb-2= _('Expired') - if milestone.upcoming? - .status-box.status-box-mr-merged.gl-mb-2= _('Upcoming') + .gl-badge.badge-primary.badge-pill.gl-mb-2= _('Upcoming') - if milestone.closed? - .status-box.status-box-closed.gl-mb-2= _('Closed') + .gl-badge.badge-danger.badge-pill.gl-mb-2= _('Closed') diff --git a/app/views/shared/milestones/_milestone.html.haml b/app/views/shared/milestones/_milestone.html.haml index 48a97ed66bb..4301bf01858 100644 --- a/app/views/shared/milestones/_milestone.html.haml +++ b/app/views/shared/milestones/_milestone.html.haml @@ -29,10 +29,10 @@ %div = render('shared/milestone_expired', milestone: milestone) - if milestone.group_milestone? - .label-badge.gl-bg-blue-50.d-inline-block + .gl-badge.badge-info.badge-pill = milestone.group.full_name - if milestone.project_milestone? - .label-badge.gl-bg-gray-50.d-inline-block + .gl-badge.badge-muted.badge-pill = milestone.project.full_name .col-sm-4.milestone-progress diff --git a/app/workers/jira_connect/sync_deployments_worker.rb b/app/workers/jira_connect/sync_deployments_worker.rb index 0f261e29464..7272d35f4cb 100644 --- a/app/workers/jira_connect/sync_deployments_worker.rb +++ b/app/workers/jira_connect/sync_deployments_worker.rb @@ -14,7 +14,6 @@ module JiraConnect deployment = Deployment.find_by_id(deployment_id) return unless deployment - return unless Feature.enabled?(:jira_sync_deployments, deployment.project) ::JiraConnect::SyncService .new(deployment.project) |