diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-08 06:09:54 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-08 06:09:54 +0000 |
commit | f6cdec670b9b757fc2225a2c6627ab79765e5b8a (patch) | |
tree | 7a1fde030f117b69332d01b22deefd1c81fff458 /app/assets/javascripts | |
parent | e2ee1eec50aa8df8543d7ecc585ec0ba5ee544ac (diff) | |
download | gitlab-ce-f6cdec670b9b757fc2225a2c6627ab79765e5b8a.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r-- | app/assets/javascripts/static_site_editor/components/saved_changes_message.vue | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/app/assets/javascripts/static_site_editor/components/saved_changes_message.vue b/app/assets/javascripts/static_site_editor/components/saved_changes_message.vue new file mode 100644 index 00000000000..adcacf8a1b0 --- /dev/null +++ b/app/assets/javascripts/static_site_editor/components/saved_changes_message.vue @@ -0,0 +1,80 @@ +<script> +import { isString } from 'lodash'; + +import { GlLink, GlNewButton } from '@gitlab/ui'; + +const validateUrlAndLabel = value => isString(value.label) && isString(value.url); + +export default { + components: { + GlLink, + GlNewButton, + }, + props: { + branch: { + type: Object, + required: true, + validator: validateUrlAndLabel, + }, + commit: { + type: Object, + required: true, + validator: validateUrlAndLabel, + }, + mergeRequest: { + type: Object, + required: true, + validator: validateUrlAndLabel, + }, + returnUrl: { + type: String, + required: true, + }, + }, +}; +</script> + +<template> + <div> + <div> + <h3>{{ s__('StaticSiteEditor|Success!') }}</h3> + <p> + {{ + s__( + 'StaticSiteEditor|Your changes have been submitted and a merge request has been created. The changes won’t be visible on the site until the merge request has been accepted.', + ) + }} + </p> + <div> + <gl-new-button ref="returnToSiteButton" :href="returnUrl">{{ + s__('StaticSiteEditor|Return to site') + }}</gl-new-button> + <gl-new-button ref="mergeRequestButton" :href="mergeRequest.url" variant="info">{{ + s__('StaticSiteEditor|View merge request') + }}</gl-new-button> + </div> + </div> + + <hr /> + + <div> + <h4>{{ s__('StaticSiteEditor|Summary of changes') }}</h4> + <ul> + <li> + {{ s__('StaticSiteEditor|A new branch was created:') }} + <gl-link ref="branchLink" :href="branch.url">{{ branch.label }}</gl-link> + </li> + <li> + {{ s__('StaticSiteEditor|Your changes were committed to it:') }} + <gl-link ref="commitLink" :href="commit.url">{{ commit.label }}</gl-link> + </li> + <li> + {{ s__('StaticSiteEditor|A merge request was created:') }} + <gl-link ref="mergeRequestLink" :href="mergeRequest.url">{{ + mergeRequest.label + }}</gl-link> + </li> + </ul> + </div> + </div> +</template> |