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>2020-02-25 00:09:08 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-25 00:09:08 +0300
commit7671216b60e2796a050358ff808b4a0c2de3d22f (patch)
tree605dfc1339a3cd7dc7353ac6d725191086a9acca /app/assets/javascripts/blob
parentc2367afbf57ebc65d5b78a743b5d6a91f0aece9f (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/blob')
-rw-r--r--app/assets/javascripts/blob/pipeline_tour_success_modal.vue78
1 files changed, 78 insertions, 0 deletions
diff --git a/app/assets/javascripts/blob/pipeline_tour_success_modal.vue b/app/assets/javascripts/blob/pipeline_tour_success_modal.vue
new file mode 100644
index 00000000000..0739b4d5e39
--- /dev/null
+++ b/app/assets/javascripts/blob/pipeline_tour_success_modal.vue
@@ -0,0 +1,78 @@
+<script>
+import { GlModal, GlSprintf, GlLink } from '@gitlab/ui';
+import { sprintf, s__, __ } from '~/locale';
+import Cookies from 'js-cookie';
+import { glEmojiTag } from '~/emoji';
+
+export default {
+ beginnerLink:
+ 'https://about.gitlab.com/blog/2018/01/22/a-beginners-guide-to-continuous-integration/',
+ exampleLink: 'https://docs.gitlab.com/ee/ci/examples/',
+ bodyMessage: s__(
+ 'MR widget|The pipeline will now run automatically every time you commit code. Pipelines are useful for deploying static web pages, detecting vulnerabilities in dependencies, static or dynamic application security testing (SAST and DAST), and so much more!',
+ ),
+ modalTitle: sprintf(
+ __("That's it, well done!%{celebrate}"),
+ {
+ celebrate: glEmojiTag('tada'),
+ },
+ false,
+ ),
+ components: {
+ GlModal,
+ GlSprintf,
+ GlLink,
+ },
+ props: {
+ goToPipelinesPath: {
+ type: String,
+ required: true,
+ },
+ commitCookie: {
+ type: String,
+ required: true,
+ },
+ },
+ mounted() {
+ this.disableModalFromRenderingAgain();
+ },
+ methods: {
+ disableModalFromRenderingAgain() {
+ Cookies.remove(this.commitCookie);
+ },
+ },
+};
+</script>
+<template>
+ <gl-modal
+ visible
+ size="sm"
+ :title="$options.modalTitle"
+ modal-id="success-pipeline-modal-id-not-used"
+ >
+ <p>
+ {{ $options.bodyMessage }}
+ </p>
+ <gl-sprintf
+ :message="
+ s__(`MR widget|Take a look at our %{beginnerLinkStart}Beginner's Guide to Continuous Integration%{beginnerLinkEnd}
+ and our %{exampleLinkStart}examples of GitLab CI/CD%{exampleLinkEnd}
+ to see all the cool stuff you can do with it.`)
+ "
+ >
+ <template #beginnerLink="{content}">
+ <gl-link :href="$options.beginnerLink" target="_blank">
+ {{ content }}
+ </gl-link>
+ </template>
+ <template #exampleLink="{content}">
+ <gl-link :href="$options.exampleLink" target="_blank">
+ {{ content }}
+ </gl-link>
+ </template>
+ </gl-sprintf>
+ <template #modal-footer>
+ <a :href="goToPipelinesPath" class="btn btn-success">{{ __('Go to Pipelines') }}</a>
+ </template>
+ </gl-modal>
+</template>