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
|
<script>
import { GlBanner, GlLink } from '@gitlab/ui';
import { __, s__ } from '~/locale';
import { helpPagePath } from '~/helpers/help_page_helper';
import { CATALOG_FEEDBACK_DISMISSED_KEY } from '../../constants';
const defaultTitle = __('CI/CD Catalog');
const defaultDescription = s__(
'CiCatalog|Discover CI configuration resources for a seamless CI/CD experience.',
);
export default {
components: {
GlBanner,
GlLink,
},
inject: {
pageTitle: { default: defaultTitle },
pageDescription: {
default: defaultDescription,
},
},
data() {
return {
isFeedbackBannerDismissed: localStorage.getItem(CATALOG_FEEDBACK_DISMISSED_KEY) === 'true',
};
},
methods: {
handleDismissBanner() {
localStorage.setItem(CATALOG_FEEDBACK_DISMISSED_KEY, 'true');
this.isFeedbackBannerDismissed = true;
},
},
i18n: {
banner: {
title: __('Your feedback is important to us 👋'),
description: s__(
"CiCatalog|We want to help you create and manage pipeline component repositories, while also making it easier to reuse pipeline configurations. Let us know how we're doing!",
),
btnText: __('Give us some feedback'),
},
learnMore: __('Learn more'),
},
learnMorePath: helpPagePath('ci/components/index'),
};
</script>
<template>
<div class="gl-border-b-1 gl-border-gray-100 gl-border-b-solid">
<gl-banner
v-if="!isFeedbackBannerDismissed"
class="gl-mt-5"
:title="$options.i18n.banner.title"
:button-text="$options.i18n.banner.btnText"
button-link="https://gitlab.com/gitlab-org/gitlab/-/issues/407556"
@close="handleDismissBanner"
>
<p>
{{ $options.i18n.banner.description }}
</p>
</gl-banner>
<h1 class="gl-font-size-h-display">{{ pageTitle }}</h1>
<p>
<span data-testid="description">{{ pageDescription }}</span>
<gl-link :href="$options.learnMorePath" target="_blank">{{
$options.i18n.learnMore
}}</gl-link>
</p>
</div>
</template>
|