1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
<script>
import { GlKeysetPagination, GlSkeletonLoader } from '@gitlab/ui';
import { s__ } from '~/locale';
import ManifestRow from '~/packages_and_registries/dependency_proxy/components/manifest_row.vue';
export default {
name: 'ManifestsLists',
components: {
ManifestRow,
GlKeysetPagination,
GlSkeletonLoader,
},
props: {
manifests: {
type: Array,
required: false,
default: () => [],
},
pagination: {
type: Object,
required: true,
},
loading: {
type: Boolean,
required: false,
default: () => false,
},
dependencyProxyImagePrefix: {
type: String,
default: '',
required: false,
},
},
i18n: {
listTitle: s__('DependencyProxy|Image list'),
},
computed: {
showPagination() {
return this.pagination.hasNextPage || this.pagination.hasPreviousPage;
},
},
};
</script>
<template>
<div class="gl-mt-6">
<h3 class="gl-font-base">{{ $options.i18n.listTitle }}</h3>
<gl-skeleton-loader v-if="loading" />
<div v-else data-testid="main-area">
<div
class="gl-border-t-1 gl-border-gray-100 gl-border-t-solid gl-display-flex gl-flex-direction-column"
>
<manifest-row
v-for="(manifest, index) in manifests"
:key="index"
:dependency-proxy-image-prefix="dependencyProxyImagePrefix"
:manifest="manifest"
/>
</div>
<div class="gl-display-flex gl-justify-content-center">
<gl-keyset-pagination
v-if="showPagination"
v-bind="pagination"
class="gl-mt-3"
@prev="$emit('prev-page')"
@next="$emit('next-page')"
/>
</div>
</div>
</div>
</template>
|