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:
Diffstat (limited to 'app/assets/javascripts/serverless/survey_banner.vue')
-rw-r--r--app/assets/javascripts/serverless/survey_banner.vue52
1 files changed, 52 insertions, 0 deletions
diff --git a/app/assets/javascripts/serverless/survey_banner.vue b/app/assets/javascripts/serverless/survey_banner.vue
new file mode 100644
index 00000000000..a0a90fa5e80
--- /dev/null
+++ b/app/assets/javascripts/serverless/survey_banner.vue
@@ -0,0 +1,52 @@
+<script>
+import Cookies from 'js-cookie';
+import { parseBoolean } from '~/lib/utils/common_utils';
+import { GlBanner } from '@gitlab/ui';
+
+export default {
+ components: {
+ GlBanner,
+ },
+ props: {
+ surveyUrl: {
+ type: String,
+ required: true,
+ },
+ },
+ data() {
+ return {
+ visible: true,
+ };
+ },
+ created() {
+ if (parseBoolean(Cookies.get('hide_serverless_survey'))) {
+ this.visible = false;
+ }
+ },
+ methods: {
+ handleClose() {
+ Cookies.set('hide_serverless_survey', 'true', { expires: 365 * 10 });
+ this.visible = false;
+ },
+ },
+};
+</script>
+
+<template>
+ <gl-banner
+ v-if="visible"
+ class="mt-4"
+ :title="s__('Serverless|Help shape the future of Serverless at GitLab')"
+ :button-text="s__('Serverless|Sign up for First Look')"
+ :button-link="surveyUrl"
+ @close="handleClose"
+ >
+ <p>
+ {{
+ s__(
+ 'Serverless|We are continually striving to improve our Serverless functionality. As a Knative user, we would love to hear how we can make this experience better for you. Sign up for GitLab First Look today and we will be in touch shortly.',
+ )
+ }}
+ </p>
+ </gl-banner>
+</template>