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-04 15:07:32 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-02-04 15:07:32 +0300
commit48bfbd4f1866c43c121543fb2b3db1b07958b460 (patch)
tree29088cba64c055d0debff9c24f8c3d3c866c7b3b /app/assets/javascripts/vue_shared/components/incubation
parent4ba8e68892892de8366ce8ad677fbfe6dbae64c9 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/vue_shared/components/incubation')
-rw-r--r--app/assets/javascripts/vue_shared/components/incubation/incubation_alert.vue61
1 files changed, 61 insertions, 0 deletions
diff --git a/app/assets/javascripts/vue_shared/components/incubation/incubation_alert.vue b/app/assets/javascripts/vue_shared/components/incubation/incubation_alert.vue
new file mode 100644
index 00000000000..b704cec2475
--- /dev/null
+++ b/app/assets/javascripts/vue_shared/components/incubation/incubation_alert.vue
@@ -0,0 +1,61 @@
+<script>
+import { GlAlert, GlLink } from '@gitlab/ui';
+import { s__, sprintf } from '~/locale';
+
+export default {
+ name: 'IncubationAlert',
+ components: { GlAlert, GlLink },
+ props: {
+ featureName: {
+ type: String,
+ required: true,
+ },
+ linkToFeedbackIssue: {
+ type: String,
+ required: true,
+ },
+ },
+ data() {
+ return {
+ isAlertDismissed: false,
+ };
+ },
+ computed: {
+ shouldShowAlert() {
+ return !this.isAlertDismissed;
+ },
+ titleLabel() {
+ return sprintf(this.$options.i18n.titleLabel, { featureName: this.featureName });
+ },
+ },
+ methods: {
+ dismissAlert() {
+ this.isAlertDismissed = true;
+ },
+ },
+ i18n: {
+ titleLabel: s__('Incubation|%{featureName} is in incubating phase'),
+ contentLabel: s__(
+ 'Incubation|GitLab incubates features to explore new use cases. These features are updated regularly, and support is limited.',
+ ),
+ learnMoreLabel: s__('Incubation|Learn more about incubating features'),
+ feedbackLabel: s__('Incubation|Give feedback on this feature'),
+ },
+};
+</script>
+
+<template>
+ <gl-alert
+ v-if="shouldShowAlert"
+ :title="titleLabel"
+ variant="warning"
+ :primary-button-text="$options.i18n.feedbackLabel"
+ :primary-button-link="linkToFeedbackIssue"
+ @dismiss="dismissAlert"
+ >
+ {{ $options.i18n.contentLabel }}
+ <gl-link href="https://about.gitlab.com/handbook/engineering/incubation/" target="_blank">{{
+ $options.i18n.learnMoreLabel
+ }}</gl-link>
+ </gl-alert>
+</template>