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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-02-20 16:49:51 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-02-20 16:49:51 +0300
commit71786ddc8e28fbd3cb3fcc4b3ff15e5962a1c82e (patch)
tree6a2d93ef3fb2d353bb7739e4b57e6541f51cdd71 /app/assets/javascripts/groups_projects
parenta7253423e3403b8c08f8a161e5937e1488f5f407 (diff)
Add latest changes from gitlab-org/gitlab@15-9-stable-eev15.9.0-rc42
Diffstat (limited to 'app/assets/javascripts/groups_projects')
-rw-r--r--app/assets/javascripts/groups_projects/components/transfer_locations.vue18
1 files changed, 18 insertions, 0 deletions
diff --git a/app/assets/javascripts/groups_projects/components/transfer_locations.vue b/app/assets/javascripts/groups_projects/components/transfer_locations.vue
index e0c8ce36e3c..360af772a10 100644
--- a/app/assets/javascripts/groups_projects/components/transfer_locations.vue
+++ b/app/assets/javascripts/groups_projects/components/transfer_locations.vue
@@ -25,6 +25,7 @@ export const i18n = {
'ProjectTransfer|An error occurred fetching the transfer locations, please refresh the page and try again.',
),
ALERT_DISMISS_LABEL: __('Dismiss'),
+ NO_RESULTS_TEXT: __('No results found.'),
};
export default {
@@ -90,6 +91,9 @@ export default {
hasGroupTransferLocations() {
return this.groupTransferLocations.length;
},
+ hasAdditionalDropdownItems() {
+ return this.filteredAdditionalDropdownItems.length;
+ },
selectedText() {
return this.value?.humanName || this.label;
},
@@ -99,6 +103,17 @@ export default {
showAdditionalDropdownItems() {
return !this.isLoading && this.filteredAdditionalDropdownItems.length;
},
+ hasNoResults() {
+ if (this.isLoading || this.isSearchLoading) {
+ return false;
+ }
+
+ return (
+ !this.hasAdditionalDropdownItems &&
+ !this.hasUserTransferLocations &&
+ !this.hasGroupTransferLocations
+ );
+ },
},
watch: {
searchTerm() {
@@ -274,6 +289,9 @@ export default {
>{{ item.humanName }}</gl-dropdown-item
>
</div>
+ <gl-dropdown-item v-if="hasNoResults" button-class="gl-text-gray-900!" disabled>{{
+ $options.i18n.NO_RESULTS_TEXT
+ }}</gl-dropdown-item>
<gl-loading-icon v-if="isLoading" class="gl-mb-3" size="sm" />
<gl-intersection-observer v-if="hasNextPageOfGroups" @appear="handleLoadMoreGroups" />
</gl-dropdown>