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>2020-09-02 15:10:35 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-09-02 15:10:35 +0300
commit4fa04f789e6fed5f0dfeafe718eeb7f56a5086e9 (patch)
tree5ef2d1d8232d3bd359ec79bf95c9a35ce650ae0b /app/assets/javascripts/registry
parent4b9ace6c1fead1b44f173eaee0cfaa58f46a258a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/registry')
-rw-r--r--app/assets/javascripts/registry/explorer/components/delete_button.vue1
-rw-r--r--app/assets/javascripts/registry/explorer/components/details_page/tags_list.vue1
-rw-r--r--app/assets/javascripts/registry/explorer/components/details_page/tags_list_row.vue2
-rw-r--r--app/assets/javascripts/registry/explorer/components/list_item.vue128
-rw-r--r--app/assets/javascripts/registry/explorer/components/list_page/image_list.vue1
-rw-r--r--app/assets/javascripts/registry/explorer/components/list_page/image_list_row.vue2
6 files changed, 2 insertions, 133 deletions
diff --git a/app/assets/javascripts/registry/explorer/components/delete_button.vue b/app/assets/javascripts/registry/explorer/components/delete_button.vue
index dab6a26ea16..ee856a3e546 100644
--- a/app/assets/javascripts/registry/explorer/components/delete_button.vue
+++ b/app/assets/javascripts/registry/explorer/components/delete_button.vue
@@ -47,7 +47,6 @@ export default {
:disabled="disabled"
:title="title"
:aria-label="title"
- category="secondary"
variant="danger"
icon="remove"
@click="$emit('delete')"
diff --git a/app/assets/javascripts/registry/explorer/components/details_page/tags_list.vue b/app/assets/javascripts/registry/explorer/components/details_page/tags_list.vue
index 8494967ab57..328026d0953 100644
--- a/app/assets/javascripts/registry/explorer/components/details_page/tags_list.vue
+++ b/app/assets/javascripts/registry/explorer/components/details_page/tags_list.vue
@@ -67,7 +67,6 @@ export default {
:key="tag.path"
:tag="tag"
:first="index === 0"
- :last="index === tags.length - 1"
:selected="selectedItems[tag.name]"
:is-desktop="isDesktop"
@select="updateSelectedItems(tag.name)"
diff --git a/app/assets/javascripts/registry/explorer/components/details_page/tags_list_row.vue b/app/assets/javascripts/registry/explorer/components/details_page/tags_list_row.vue
index 8ec5cebbe8e..a4c497d0f59 100644
--- a/app/assets/javascripts/registry/explorer/components/details_page/tags_list_row.vue
+++ b/app/assets/javascripts/registry/explorer/components/details_page/tags_list_row.vue
@@ -5,8 +5,8 @@ import ClipboardButton from '~/vue_shared/components/clipboard_button.vue';
import { numberToHumanSize } from '~/lib/utils/number_utils';
import TimeAgoTooltip from '~/vue_shared/components/time_ago_tooltip.vue';
import { formatDate } from '~/lib/utils/datetime_utility';
+import ListItem from '~/vue_shared/components/registry/list_item.vue';
import DeleteButton from '../delete_button.vue';
-import ListItem from '../list_item.vue';
import DetailsRow from '~/registry/shared/components/details_row.vue';
import {
REMOVE_TAG_BUTTON_TITLE,
diff --git a/app/assets/javascripts/registry/explorer/components/list_item.vue b/app/assets/javascripts/registry/explorer/components/list_item.vue
deleted file mode 100644
index c57645cc3a1..00000000000
--- a/app/assets/javascripts/registry/explorer/components/list_item.vue
+++ /dev/null
@@ -1,128 +0,0 @@
-<script>
-import { GlButton } from '@gitlab/ui';
-
-export default {
- name: 'ListItem',
- components: { GlButton },
- props: {
- first: {
- type: Boolean,
- default: false,
- required: false,
- },
- last: {
- type: Boolean,
- default: false,
- required: false,
- },
- disabled: {
- type: Boolean,
- default: false,
- required: false,
- },
- selected: {
- type: Boolean,
- default: false,
- required: false,
- },
- },
- data() {
- return {
- isDetailsShown: false,
- detailsSlots: [],
- };
- },
- computed: {
- optionalClasses() {
- return {
- 'gl-border-t-1': !this.first,
- 'gl-border-t-2': this.first,
- 'gl-border-b-1': !this.last,
- 'gl-border-b-2': this.last,
- 'disabled-content': this.disabled,
- 'gl-border-gray-100': !this.selected,
- 'gl-bg-blue-50 gl-border-blue-200': this.selected,
- };
- },
- },
- mounted() {
- this.detailsSlots = Object.keys(this.$slots).filter(k => k.startsWith('details_'));
- },
- methods: {
- toggleDetails() {
- this.isDetailsShown = !this.isDetailsShown;
- },
- },
-};
-</script>
-
-<template>
- <div
- class="gl-display-flex gl-flex-direction-column gl-border-b-solid gl-border-t-solid"
- :class="optionalClasses"
- >
- <div class="gl-display-flex gl-align-items-center gl-py-4 gl-px-2">
- <div
- v-if="$slots['left-action']"
- class="gl-w-7 gl-display-none gl-display-sm-flex gl-justify-content-start gl-pl-2"
- >
- <slot name="left-action"></slot>
- </div>
- <div class="gl-display-flex gl-flex-direction-column gl-flex-fill-1">
- <div
- class="gl-display-flex gl-align-items-center gl-justify-content-space-between gl-text-body gl-font-weight-bold"
- >
- <div class="gl-display-flex gl-align-items-center">
- <slot name="left-primary"></slot>
- <gl-button
- v-if="detailsSlots.length > 0"
- :selected="isDetailsShown"
- icon="ellipsis_h"
- size="small"
- class="gl-ml-2 gl-display-none gl-display-sm-block"
- @click="toggleDetails"
- />
- </div>
- <div>
- <slot name="right-primary"></slot>
- </div>
- </div>
- <div
- class="gl-display-flex gl-align-items-center gl-justify-content-space-between gl-font-sm gl-text-gray-300"
- >
- <div>
- <slot name="left-secondary"></slot>
- </div>
- <div>
- <slot name="right-secondary"></slot>
- </div>
- </div>
- </div>
- <div
- v-if="$slots['right-action']"
- class="gl-w-9 gl-display-none gl-display-sm-flex gl-justify-content-end gl-pr-2"
- >
- <slot name="right-action"></slot>
- </div>
- </div>
- <div class="gl-display-flex">
- <div class="gl-w-7"></div>
- <div
- v-if="isDetailsShown"
- class="gl-display-flex gl-flex-direction-column gl-flex-fill-1 gl-bg-gray-10 gl-rounded-base gl-inset-border-1-gray-100 gl-mb-3"
- >
- <div
- v-for="(row, detailIndex) in detailsSlots"
- :key="detailIndex"
- class="gl-px-5 gl-py-2"
- :class="{
- 'gl-border-gray-100 gl-border-t-solid gl-border-t-1': detailIndex !== 0,
- }"
- >
- <slot :name="row"></slot>
- </div>
- </div>
- <div class="gl-w-9"></div>
- </div>
- </div>
-</template>
diff --git a/app/assets/javascripts/registry/explorer/components/list_page/image_list.vue b/app/assets/javascripts/registry/explorer/components/list_page/image_list.vue
index 65cf51fd1d1..d1b9894da0e 100644
--- a/app/assets/javascripts/registry/explorer/components/list_page/image_list.vue
+++ b/app/assets/javascripts/registry/explorer/components/list_page/image_list.vue
@@ -38,7 +38,6 @@ export default {
:key="index"
:item="listItem"
:first="index === 0"
- :last="index === images.length - 1"
@delete="$emit('delete', $event)"
/>
diff --git a/app/assets/javascripts/registry/explorer/components/list_page/image_list_row.vue b/app/assets/javascripts/registry/explorer/components/list_page/image_list_row.vue
index 102311c6062..32bf27f1143 100644
--- a/app/assets/javascripts/registry/explorer/components/list_page/image_list_row.vue
+++ b/app/assets/javascripts/registry/explorer/components/list_page/image_list_row.vue
@@ -2,7 +2,7 @@
import { GlTooltipDirective, GlIcon, GlSprintf } from '@gitlab/ui';
import { n__ } from '~/locale';
import ClipboardButton from '~/vue_shared/components/clipboard_button.vue';
-import ListItem from '../list_item.vue';
+import ListItem from '~/vue_shared/components/registry/list_item.vue';
import DeleteButton from '../delete_button.vue';
import {