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>2022-02-18 12:45:46 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-02-18 12:45:46 +0300
commita7b3560714b4d9cc4ab32dffcd1f74a284b93580 (patch)
tree7452bd5c3545c2fa67a28aa013835fb4fa071baf /app/assets/javascripts/jira_connect/subscriptions/components/compatibility_alert.vue
parentee9173579ae56a3dbfe5afe9f9410c65bb327ca7 (diff)
Add latest changes from gitlab-org/gitlab@14-8-stable-eev14.8.0-rc42
Diffstat (limited to 'app/assets/javascripts/jira_connect/subscriptions/components/compatibility_alert.vue')
-rw-r--r--app/assets/javascripts/jira_connect/subscriptions/components/compatibility_alert.vue63
1 files changed, 63 insertions, 0 deletions
diff --git a/app/assets/javascripts/jira_connect/subscriptions/components/compatibility_alert.vue b/app/assets/javascripts/jira_connect/subscriptions/components/compatibility_alert.vue
new file mode 100644
index 00000000000..3cfbd87ac53
--- /dev/null
+++ b/app/assets/javascripts/jira_connect/subscriptions/components/compatibility_alert.vue
@@ -0,0 +1,63 @@
+<script>
+import { GlAlert, GlSprintf, GlLink } from '@gitlab/ui';
+import { s__ } from '~/locale';
+import { helpPagePath } from '~/helpers/help_page_helper';
+import LocalStorageSync from '~/vue_shared/components/local_storage_sync.vue';
+
+const COMPATIBILITY_ALERT_STATE_KEY = 'compatibility_alert_dismissed';
+
+export default {
+ name: 'CompatibilityAlert',
+ components: {
+ GlAlert,
+ GlSprintf,
+ GlLink,
+ LocalStorageSync,
+ },
+ data() {
+ return {
+ alertDismissed: false,
+ };
+ },
+ computed: {
+ shouldShowAlert() {
+ return !this.alertDismissed;
+ },
+ },
+ methods: {
+ dismissAlert() {
+ this.alertDismissed = true;
+ },
+ },
+ i18n: {
+ title: s__('Integrations|Known limitations'),
+ body: s__(
+ 'Integrations|This integration only works with GitLab.com. Adding a namespace only works in browsers that allow cross-site cookies. %{linkStart}Learn more%{linkEnd}.',
+ ),
+ },
+ DOCS_LINK_URL: helpPagePath('integration/jira/connect-app'),
+ COMPATIBILITY_ALERT_STATE_KEY,
+};
+</script>
+<template>
+ <local-storage-sync
+ v-model="alertDismissed"
+ :storage-key="$options.COMPATIBILITY_ALERT_STATE_KEY"
+ >
+ <gl-alert
+ v-if="shouldShowAlert"
+ class="gl-mb-7"
+ variant="info"
+ :title="$options.i18n.title"
+ @dismiss="dismissAlert"
+ >
+ <gl-sprintf :message="$options.i18n.body">
+ <template #link="{ content }">
+ <gl-link :href="$options.DOCS_LINK_URL" target="_blank" rel="noopener noreferrer">{{
+ content
+ }}</gl-link>
+ </template>
+ </gl-sprintf>
+ </gl-alert>
+ </local-storage-sync>
+</template>