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:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-01-14 03:10:35 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-01-14 03:10:35 +0300
commite7cc427bc63dccac50cc3ccda2976befcea1ecf5 (patch)
tree975f48cc89009a9877c305ddf4dbea2a3e89d233 /app
parentacba9e99b4f8bfeaaed143b72b07170a8506f893 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/pipeline_editor/pipeline_editor_app.vue2
-rw-r--r--app/assets/javascripts/pipelines/components/pipelines_list/pipelines.vue2
-rw-r--r--app/assets/javascripts/vue_shared/components/navigation_tabs.vue37
-rw-r--r--app/models/user.rb9
-rw-r--r--app/views/shared/issuable/_sidebar.html.haml4
5 files changed, 32 insertions, 22 deletions
diff --git a/app/assets/javascripts/pipeline_editor/pipeline_editor_app.vue b/app/assets/javascripts/pipeline_editor/pipeline_editor_app.vue
index d6884ae121f..21993e2120a 100644
--- a/app/assets/javascripts/pipeline_editor/pipeline_editor_app.vue
+++ b/app/assets/javascripts/pipeline_editor/pipeline_editor_app.vue
@@ -126,7 +126,7 @@ export default {
return this.$apollo.queries.content.loading;
},
isBlobContentError() {
- return this.failureType === LOAD_FAILURE_NO_FILE || this.failureType === LOAD_FAILURE_UNKNOWN;
+ return this.failureType === LOAD_FAILURE_NO_FILE;
},
isCiConfigDataLoading() {
return this.$apollo.queries.ciConfigData.loading;
diff --git a/app/assets/javascripts/pipelines/components/pipelines_list/pipelines.vue b/app/assets/javascripts/pipelines/components/pipelines_list/pipelines.vue
index 396fbd0a834..ec7c5764be1 100644
--- a/app/assets/javascripts/pipelines/components/pipelines_list/pipelines.vue
+++ b/app/assets/javascripts/pipelines/components/pipelines_list/pipelines.vue
@@ -279,7 +279,7 @@ export default {
<div class="pipelines-container">
<div
v-if="shouldRenderTabs || shouldRenderButtons"
- class="top-area scrolling-tabs-container inner-page-scroll-tabs"
+ class="top-area scrolling-tabs-container inner-page-scroll-tabs gl-border-none"
>
<div class="fade-left"><gl-icon name="chevron-lg-left" :size="12" /></div>
<div class="fade-right"><gl-icon name="chevron-lg-right" :size="12" /></div>
diff --git a/app/assets/javascripts/vue_shared/components/navigation_tabs.vue b/app/assets/javascripts/vue_shared/components/navigation_tabs.vue
index 3749888ee36..653ee7f20e9 100644
--- a/app/assets/javascripts/vue_shared/components/navigation_tabs.vue
+++ b/app/assets/javascripts/vue_shared/components/navigation_tabs.vue
@@ -1,5 +1,6 @@
<script>
import $ from 'jquery';
+import { GlBadge, GlTabs, GlTab } from '@gitlab/ui';
/**
* Given an array of tabs, renders non linked bootstrap tabs.
@@ -23,6 +24,11 @@ import $ from 'jquery';
*/
export default {
name: 'NavigationTabs',
+ components: {
+ GlBadge,
+ GlTabs,
+ GlTab,
+ },
props: {
tabs: {
type: Array,
@@ -50,24 +56,21 @@ export default {
};
</script>
<template>
- <ul class="nav-links scrolling-tabs separator">
- <li
+ <gl-tabs class="gl-display-flex gl-w-full" nav-class="gl-border-0!">
+ <gl-tab
v-for="(tab, i) in tabs"
:key="i"
- :class="{
- active: tab.isActive,
- }"
+ :title-link-class="`js-${scope}-tab-${tab.scope} gl-display-inline-flex`"
+ :title-link-attributes="{ 'data-testid': `${scope}-tab-${tab.scope}` }"
+ :active="tab.isActive"
+ @click="onTabClick(tab)"
>
- <a
- :class="`js-${scope}-tab-${tab.scope}`"
- :data-testid="`${scope}-tab-${tab.scope}`"
- role="button"
- @click="onTabClick(tab)"
- >
- {{ tab.name }}
-
- <span v-if="shouldRenderBadge(tab.count)" class="badge badge-pill"> {{ tab.count }} </span>
- </a>
- </li>
- </ul>
+ <template #title>
+ <span class="gl-mr-2"> {{ tab.name }} </span>
+ <gl-badge v-if="shouldRenderBadge(tab.count)" size="sm" class="gl-tab-counter-badge">{{
+ tab.count
+ }}</gl-badge>
+ </template>
+ </gl-tab>
+ </gl-tabs>
</template>
diff --git a/app/models/user.rb b/app/models/user.rb
index c6be3d6a839..b4ec6064ff8 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -1378,7 +1378,14 @@ class User < ApplicationRecord
def set_username_errors
namespace_path_errors = self.errors.delete(:"namespace.path")
- self.errors[:username].concat(namespace_path_errors) if namespace_path_errors
+
+ return unless namespace_path_errors&.any?
+
+ if namespace_path_errors.include?('has already been taken') && !User.exists?(username: username)
+ self.errors.add(:base, :username_exists_as_a_different_namespace)
+ else
+ self.errors[:username].concat(namespace_path_errors)
+ end
end
def username_changed_hook
diff --git a/app/views/shared/issuable/_sidebar.html.haml b/app/views/shared/issuable/_sidebar.html.haml
index 8fe278a9695..f69af45af9d 100644
--- a/app/views/shared/issuable/_sidebar.html.haml
+++ b/app/views/shared/issuable/_sidebar.html.haml
@@ -154,7 +154,7 @@
.sidebar-collapsed-icon{ data: { toggle: 'tooltip', placement: 'left', container: 'body', boundary: 'viewport' }, title: _('Move issue') }
= custom_icon('icon_arrow_right')
.dropdown.sidebar-move-issue-dropdown.hide-collapsed
- %button.btn.btn-default.btn-block.js-sidebar-dropdown-toggle.js-move-issue{ type: 'button',
+ %button.gl-button.btn.btn-default.btn-block.js-sidebar-dropdown-toggle.js-move-issue{ type: 'button',
data: { toggle: 'dropdown', display: 'static', track_label: "right_sidebar", track_property: "move_issue", track_event: "click_button", track_value: "" } }
= _('Move issue')
.dropdown-menu.dropdown-menu-selectable.dropdown-extended-height
@@ -163,7 +163,7 @@
= dropdown_content
= dropdown_loading
= dropdown_footer add_content_class: true do
- %button.btn.btn-success.sidebar-move-issue-confirmation-button.js-move-issue-confirmation-button{ type: 'button', disabled: true }
+ %button.gl-button.btn.btn-success.sidebar-move-issue-confirmation-button.js-move-issue-confirmation-button{ type: 'button', disabled: true }
= _('Move')
= loading_icon(css_class: 'gl-vertical-align-text-bottom sidebar-move-issue-confirmation-loading-icon')