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
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/design_management/components/design_notes/design_note.vue21
-rw-r--r--app/assets/javascripts/diffs/components/diff_content.vue2
-rw-r--r--app/assets/javascripts/emoji/components/picker.vue12
-rw-r--r--app/assets/javascripts/notes/components/note_actions.vue24
-rw-r--r--app/assets/javascripts/observability/components/skeleton/index.vue2
-rw-r--r--app/assets/javascripts/work_items/components/notes/work_item_note_actions.vue18
-rw-r--r--app/models/concerns/expirable.rb6
-rw-r--r--app/models/namespace.rb4
-rw-r--r--app/views/admin/runners/edit.html.haml3
-rw-r--r--app/views/profiles/two_factor_auths/show.html.haml3
-rw-r--r--app/views/shared/form_elements/_description.html.haml1
-rw-r--r--app/views/shared/integrations/gitlab_slack_application/_slack_button.html.haml4
-rw-r--r--app/views/shared/integrations/gitlab_slack_application/_slack_integration_form.html.haml13
-rw-r--r--app/views/shared/issue_type/_details_header.html.haml3
14 files changed, 42 insertions, 74 deletions
diff --git a/app/assets/javascripts/design_management/components/design_notes/design_note.vue b/app/assets/javascripts/design_management/components/design_notes/design_note.vue
index d4982e39525..1f2c9f19a95 100644
--- a/app/assets/javascripts/design_management/components/design_notes/design_note.vue
+++ b/app/assets/javascripts/design_management/components/design_notes/design_note.vue
@@ -5,7 +5,6 @@ import {
GlButton,
GlDisclosureDropdown,
GlLink,
- GlIcon,
GlTooltipDirective,
} from '@gitlab/ui';
import * as Sentry from '@sentry/browser';
@@ -32,10 +31,9 @@ export default {
deleteCommentText: __('Delete comment'),
},
components: {
- EmojiPicker,
DesignNoteAwardsList,
DesignReplyForm,
- GlIcon,
+ EmojiPicker,
GlAvatar,
GlAvatarLink,
GlButton,
@@ -296,22 +294,7 @@ export default {
:right="false"
data-testid="note-emoji-button"
@click="handleAwardEmoji"
- >
- <template #button-content>
- <gl-icon
- class="award-control-icon-neutral gl-button-icon gl-icon"
- name="slight-smile"
- />
- <gl-icon
- class="award-control-icon-positive gl-button-icon gl-icon gl-left-3!"
- name="smiley"
- />
- <gl-icon
- class="award-control-icon-super-positive gl-button-icon gl-icon gl-left-3!"
- name="smile"
- />
- </template>
- </emoji-picker>
+ />
<gl-button
v-if="isEditingAndHasPermissions"
v-gl-tooltip
diff --git a/app/assets/javascripts/diffs/components/diff_content.vue b/app/assets/javascripts/diffs/components/diff_content.vue
index 64cabaf4367..1c93cb4d021 100644
--- a/app/assets/javascripts/diffs/components/diff_content.vue
+++ b/app/assets/javascripts/diffs/components/diff_content.vue
@@ -163,7 +163,7 @@ export default {
{{ __('Contains only whitespace changes.') }}
<gl-button
category="tertiary"
- variant="info"
+ variant="confirm"
size="small"
class="gl-ml-3"
data-testid="diff-load-file-button"
diff --git a/app/assets/javascripts/emoji/components/picker.vue b/app/assets/javascripts/emoji/components/picker.vue
index b6e86cc2a60..0e3dd9f7535 100644
--- a/app/assets/javascripts/emoji/components/picker.vue
+++ b/app/assets/javascripts/emoji/components/picker.vue
@@ -107,7 +107,17 @@ export default {
@hidden="$emit('hidden')"
>
<template #button-content>
- <slot name="button-content"></slot>
+ <slot name="button-content">
+ <gl-icon class="award-control-icon-neutral gl-button-icon gl-icon" name="slight-smile" />
+ <gl-icon
+ class="award-control-icon-positive gl-button-icon gl-icon gl-left-3!"
+ name="smiley"
+ />
+ <gl-icon
+ class="award-control-icon-super-positive gl-button-icon gl-icon gl-left-3!"
+ name="smile"
+ />
+ </slot>
<span class="gl-sr-only">{{ __('Add reaction') }}</span>
</template>
<gl-search-box-by-type
diff --git a/app/assets/javascripts/notes/components/note_actions.vue b/app/assets/javascripts/notes/components/note_actions.vue
index d17db6c6b4c..8d2d8095a44 100644
--- a/app/assets/javascripts/notes/components/note_actions.vue
+++ b/app/assets/javascripts/notes/components/note_actions.vue
@@ -1,7 +1,6 @@
<script>
import {
GlTooltipDirective,
- GlIcon,
GlButton,
GlDisclosureDropdown,
GlDisclosureDropdownItem,
@@ -30,15 +29,14 @@ export default {
},
name: 'NoteActions',
components: {
- GlIcon,
- ReplyButton,
- TimelineEventButton,
+ AbuseCategorySelector,
+ EmojiPicker: () => import('~/emoji/components/picker.vue'),
GlButton,
GlDisclosureDropdown,
GlDisclosureDropdownItem,
+ ReplyButton,
+ TimelineEventButton,
UserAccessRoleBadge,
- EmojiPicker: () => import('~/emoji/components/picker.vue'),
- AbuseCategorySelector,
},
directives: {
GlTooltip: GlTooltipDirective,
@@ -323,19 +321,7 @@ export default {
toggle-class="note-action-button note-emoji-button btn-icon btn-default-tertiary"
data-testid="note-emoji-button"
@click="setAwardEmoji"
- >
- <template #button-content>
- <gl-icon class="award-control-icon-neutral gl-button-icon gl-icon" name="slight-smile" />
- <gl-icon
- class="award-control-icon-positive gl-button-icon gl-icon gl-left-3!"
- name="smiley"
- />
- <gl-icon
- class="award-control-icon-super-positive gl-button-icon gl-icon gl-left-3!"
- name="smile"
- />
- </template>
- </emoji-picker>
+ />
<reply-button
v-if="showReply"
ref="replyButton"
diff --git a/app/assets/javascripts/observability/components/skeleton/index.vue b/app/assets/javascripts/observability/components/skeleton/index.vue
index ecf68d6488c..4df0f86be1f 100644
--- a/app/assets/javascripts/observability/components/skeleton/index.vue
+++ b/app/assets/javascripts/observability/components/skeleton/index.vue
@@ -143,7 +143,7 @@ export default {
<!-- The double condition is only here temporarily for back-compatibility reasons. Will be removed in next iteration https://gitlab.com/gitlab-org/opstrace/opstrace/-/issues/2275 -->
<div
- v-if="spinnerVariant && skeletonHidden"
+ v-else-if="spinnerVariant && skeletonHidden"
data-testid="content-wrapper"
class="gl-flex-grow-1 gl-display-flex gl-flex-direction-column gl-flex-align-items-stretch"
>
diff --git a/app/assets/javascripts/work_items/components/notes/work_item_note_actions.vue b/app/assets/javascripts/work_items/components/notes/work_item_note_actions.vue
index 427115695d6..e5da3d346ae 100644
--- a/app/assets/javascripts/work_items/components/notes/work_item_note_actions.vue
+++ b/app/assets/javascripts/work_items/components/notes/work_item_note_actions.vue
@@ -1,7 +1,6 @@
<script>
import {
GlButton,
- GlIcon,
GlTooltipDirective,
GlDisclosureDropdown,
GlDisclosureDropdownItem,
@@ -24,12 +23,11 @@ export default {
reportAbuseText: __('Report abuse to administrator'),
},
components: {
+ EmojiPicker: () => import('~/emoji/components/picker.vue'),
GlButton,
- GlIcon,
GlDisclosureDropdown,
GlDisclosureDropdownItem,
ReplyButton,
- EmojiPicker: () => import('~/emoji/components/picker.vue'),
UserAccessRoleBadge,
},
directives: {
@@ -201,19 +199,7 @@ export default {
toggle-class="note-action-button note-emoji-button btn-icon btn-default-tertiary"
data-testid="note-emoji-button"
@click="setAwardEmoji"
- >
- <template #button-content>
- <gl-icon class="award-control-icon-neutral gl-button-icon gl-icon" name="slight-smile" />
- <gl-icon
- class="award-control-icon-positive gl-button-icon gl-icon gl-left-3!"
- name="smiley"
- />
- <gl-icon
- class="award-control-icon-super-positive gl-button-icon gl-icon gl-left-3!"
- name="smile"
- />
- </template>
- </emoji-picker>
+ />
<reply-button v-if="showReply" ref="replyButton" @startReplying="$emit('startReplying')" />
<gl-button
v-if="showEdit"
diff --git a/app/models/concerns/expirable.rb b/app/models/concerns/expirable.rb
index cc55315d6d7..af139e735af 100644
--- a/app/models/concerns/expirable.rb
+++ b/app/models/concerns/expirable.rb
@@ -6,10 +6,8 @@ module Expirable
DAYS_TO_EXPIRE = 7
included do
- scope :not, ->(scope) { where(scope.arel.constraints.reduce(:and).not) }
-
- scope :expired, -> { where.not(expires_at: nil).where(arel_table[:expires_at].lteq(Time.current)) }
- scope :not_expired, -> { self.not(expired) }
+ scope :expired, -> { where(arel_table[:expires_at].lteq(Time.current)) }
+ scope :not_expired, -> { where(arel_table[:expires_at].gt(Time.current)).or(where(expires_at: nil)) }
end
def expired?
diff --git a/app/models/namespace.rb b/app/models/namespace.rb
index 4561c1b82cc..5449f006a2e 100644
--- a/app/models/namespace.rb
+++ b/app/models/namespace.rb
@@ -424,6 +424,10 @@ class Namespace < ApplicationRecord
false
end
+ def all_project_ids
+ all_projects.pluck(:id)
+ end
+
def all_project_ids_except(ids)
all_projects.where.not(id: ids).pluck(:id)
end
diff --git a/app/views/admin/runners/edit.html.haml b/app/views/admin/runners/edit.html.haml
index 3d245722270..6ce094bacf1 100644
--- a/app/views/admin/runners/edit.html.haml
+++ b/app/views/admin/runners/edit.html.haml
@@ -39,7 +39,8 @@
.input-group
= search_field_tag :search, params[:search], class: 'form-control gl-form-input', spellcheck: false
.input-group-append
- = submit_tag _('Search'), class: 'gl-button btn btn-default'
+ = render Pajamas::ButtonComponent.new(type: 'submit', variant: :default) do
+ = _('Search')
%td
- @projects.each do |project|
diff --git a/app/views/profiles/two_factor_auths/show.html.haml b/app/views/profiles/two_factor_auths/show.html.haml
index bfd6b133a93..42297a0cf3d 100644
--- a/app/views/profiles/two_factor_auths/show.html.haml
+++ b/app/views/profiles/two_factor_auths/show.html.haml
@@ -55,7 +55,8 @@
= label_tag :pin_code, _('Enter verification code'), class: "label-bold"
= text_field_tag :pin_code, nil, autocomplete: 'off', inputmode: 'numeric', class: "form-control gl-form-input", required: true, data: { qa_selector: 'pin_code_field' }
.gl-mt-3
- = submit_tag _('Register with two-factor app'), class: 'gl-button btn btn-confirm', data: { qa_selector: 'register_2fa_app_button' }
+ = render Pajamas::ButtonComponent.new(type: :submit, variant: :confirm, button_options: { data: { qa_selector: 'register_2fa_app_button' } }) do
+ = _('Register with two-factor app')
%hr
diff --git a/app/views/shared/form_elements/_description.html.haml b/app/views/shared/form_elements/_description.html.haml
index 415849672b6..9c06efc9398 100644
--- a/app/views/shared/form_elements/_description.html.haml
+++ b/app/views/shared/form_elements/_description.html.haml
@@ -21,6 +21,7 @@
quick_actions_docs_path: help_page_path('user/project/quick_actions'),
qa_selector: 'issuable_form_description_field',
form_field_placeholder: placeholder,
+ autofocus: 'false',
form_field_classes: 'js-gfm-input markdown-area note-textarea rspec-issuable-form-description' } }
= form.hidden_field :description
diff --git a/app/views/shared/integrations/gitlab_slack_application/_slack_button.html.haml b/app/views/shared/integrations/gitlab_slack_application/_slack_button.html.haml
deleted file mode 100644
index 1ec669d5745..00000000000
--- a/app/views/shared/integrations/gitlab_slack_application/_slack_button.html.haml
+++ /dev/null
@@ -1,4 +0,0 @@
-= link_button_to add_to_slack_link(project, slack_app_id), class: 'gl-pr-6!' do
- = image_tag 'illustrations/slack_logo.svg', class: 'gl-icon gl-button-icon gl-w-9! gl-h-9! gl-my-n3! gl-mr-0!'
- %strong.gl-button-text
- = label
diff --git a/app/views/shared/integrations/gitlab_slack_application/_slack_integration_form.html.haml b/app/views/shared/integrations/gitlab_slack_application/_slack_integration_form.html.haml
index e6e7ec28807..e5d05a8a83d 100644
--- a/app/views/shared/integrations/gitlab_slack_application/_slack_integration_form.html.haml
+++ b/app/views/shared/integrations/gitlab_slack_application/_slack_integration_form.html.haml
@@ -20,13 +20,16 @@
%td{ class: 'gl-py-3!' }
= time_ago_with_tooltip(slack_integration.created_at)
%td{ class: 'gl-py-3!' }
- .controls
+ .controls.gl-display-flex.gl-gap-3
- project = integration.project
- = link_button_to _('Edit'), edit_project_settings_slack_path(project)
- = link_to sprite_icon('remove', css_class: 'gl-icon'), project_settings_slack_path(project), method: :delete, class: 'btn gl-button btn-danger btn-danger-secondary', aria: { label: s_('SlackIntegration|Remove project') }, data: { confirm_btn_variant: "danger", confirm: s_('SlackIntegration|Are you sure you want to remove this project from the GitLab for Slack app?') }
+ = render Pajamas::ButtonComponent.new(href: edit_project_settings_slack_path(project)) do
+ = _('Edit')
+ = render Pajamas::ButtonComponent.new(method: :delete, category: 'secondary', variant: "danger", href: project_settings_slack_path(project), icon: 'remove', button_options: { aria: { label: s_('SlackIntegration|Remove project') }, data: { confirm_btn_variant: "danger", confirm: s_('SlackIntegration|Are you sure you want to remove this project from the GitLab for Slack app?') }})
.gl-my-5
- = render 'shared/integrations/gitlab_slack_application/slack_button', project: @project, label: s_('SlackIntegration|Reinstall GitLab for Slack app')
+ = render Pajamas::ButtonComponent.new(href: add_to_slack_link(@project, slack_app_id)) do
+ = s_('SlackIntegration|Reinstall GitLab for Slack app…')
%p
= html_escape(s_('SlackIntegration|You may need to reinstall the GitLab for Slack app when we %{linkStart}make updates or change permissions%{linkEnd}.')) % { linkStart: %(<a href="#{help_page_path('user/project/integrations/gitlab_slack_application.md', anchor: 'update-the-gitlab-for-slack-app')}">).html_safe, linkEnd: '</a>'.html_safe}
- else
- = render 'shared/integrations/gitlab_slack_application/slack_button', project: @project, label: s_('SlackIntegration|Install GitLab for Slack app')
+ = render Pajamas::ButtonComponent.new(href: add_to_slack_link(@project, slack_app_id)) do
+ = s_('SlackIntegration|Install GitLab for Slack app…')
diff --git a/app/views/shared/issue_type/_details_header.html.haml b/app/views/shared/issue_type/_details_header.html.haml
index b6c0b73a83d..4997d429587 100644
--- a/app/views/shared/issue_type/_details_header.html.haml
+++ b/app/views/shared/issue_type/_details_header.html.haml
@@ -16,7 +16,6 @@
#js-issuable-header-warnings{ data: { hidden: issue_hidden?(issuable).to_s } }
= issuable_meta(issuable, @project)
- %a.btn.gl-button.btn-default.btn-icon.float-right.gl-display-block.d-sm-none.gutter-toggle.issuable-gutter-toggle.js-sidebar-toggle{ href: "#" }
- = sprite_icon('chevron-double-lg-left')
+ = render Pajamas::ButtonComponent.new(href: '#', icon: 'chevron-double-lg-left', button_options: { class: 'gl-float-right gl-display-block gl-sm-display-none! gutter-toggle issuable-gutter-toggle js-sidebar-toggle' })
.js-issue-header-actions{ data: issue_header_actions_data(@project, issuable, current_user, @issuable_sidebar) }