diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-12 21:07:13 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-12 21:07:13 +0300 |
commit | ba5be4989e02566ad45191b6d97815e189a26dac (patch) | |
tree | 96a4ace3c3d61ec4aea31cbf548718ef67cfd84b /app/assets/javascripts/jira_connect | |
parent | 22a3da26ad21d67acaef7b2598429c8a003f1037 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/jira_connect')
4 files changed, 65 insertions, 15 deletions
diff --git a/app/assets/javascripts/jira_connect/subscriptions/constants.js b/app/assets/javascripts/jira_connect/subscriptions/constants.js index fc365746b54..01bc5dfc66b 100644 --- a/app/assets/javascripts/jira_connect/subscriptions/constants.js +++ b/app/assets/javascripts/jira_connect/subscriptions/constants.js @@ -38,7 +38,7 @@ export const INTEGRATIONS_DOC_LINK = helpPagePath('integration/jira/development_ anchor: 'use-the-integration', }); export const OAUTH_SELF_MANAGED_DOC_LINK = helpPagePath('integration/jira/connect-app', { - anchor: 'install-the-gitlabcom-for-jira-cloud-app-for-self-managed-instances', + anchor: 'connect-the-gitlabcom-for-jira-cloud-app-for-self-managed-instances', }); export const GITLAB_COM_BASE_PATH = 'https://gitlab.com'; diff --git a/app/assets/javascripts/jira_connect/subscriptions/pages/sign_in/sign_in_gitlab_multiversion/index.vue b/app/assets/javascripts/jira_connect/subscriptions/pages/sign_in/sign_in_gitlab_multiversion/index.vue index 5ff75e19425..7c6ff002014 100644 --- a/app/assets/javascripts/jira_connect/subscriptions/pages/sign_in/sign_in_gitlab_multiversion/index.vue +++ b/app/assets/javascripts/jira_connect/subscriptions/pages/sign_in/sign_in_gitlab_multiversion/index.vue @@ -5,10 +5,14 @@ import { s__ } from '~/locale'; import { reloadPage, persistBaseUrl, retrieveBaseUrl } from '~/jira_connect/subscriptions/utils'; import { updateInstallation, setApiBaseURL } from '~/jira_connect/subscriptions/api'; -import { I18N_UPDATE_INSTALLATION_ERROR_MESSAGE } from '~/jira_connect/subscriptions/constants'; +import { + GITLAB_COM_BASE_PATH, + I18N_UPDATE_INSTALLATION_ERROR_MESSAGE, +} from '~/jira_connect/subscriptions/constants'; import { SET_ALERT } from '~/jira_connect/subscriptions/store/mutation_types'; import SignInOauthButton from '../../../components/sign_in_oauth_button.vue'; +import SetupInstructions from './setup_instructions.vue'; import VersionSelectForm from './version_select_form.vue'; export default { @@ -16,12 +20,14 @@ export default { components: { GlButton, SignInOauthButton, + SetupInstructions, VersionSelectForm, }, data() { return { gitlabBasePath: null, loadingVersionSelect: false, + showSetupInstructions: false, }; }, computed: { @@ -37,6 +43,9 @@ export default { mounted() { this.gitlabBasePath = retrieveBaseUrl(); setApiBaseURL(this.gitlabBasePath); + if (this.gitlabBasePath !== GITLAB_COM_BASE_PATH) { + this.showSetupInstructions = true; + } }, methods: { ...mapMutations({ @@ -61,6 +70,9 @@ export default { this.loadingVersionSelect = false; }); }, + onSetupNext() { + this.showSetupInstructions = false; + }, onSignInError() { this.$emit('error'); }, @@ -88,19 +100,23 @@ export default { @submit="onVersionSelect" /> - <div v-else class="gl-text-center"> - <sign-in-oauth-button - class="gl-mb-5" - :gitlab-base-path="gitlabBasePath" - @sign-in="$emit('sign-in-oauth', $event)" - @error="onSignInError" - /> + <template v-else> + <setup-instructions v-if="showSetupInstructions" @next="onSetupNext" /> + + <div v-else class="gl-text-center"> + <sign-in-oauth-button + class="gl-mb-5" + :gitlab-base-path="gitlabBasePath" + @sign-in="$emit('sign-in-oauth', $event)" + @error="onSignInError" + /> - <div> - <gl-button category="tertiary" variant="confirm" @click="resetGitlabBasePath"> - {{ $options.i18n.changeVersionButtonText }} - </gl-button> + <div> + <gl-button category="tertiary" variant="confirm" @click="resetGitlabBasePath"> + {{ $options.i18n.changeVersionButtonText }} + </gl-button> + </div> </div> - </div> + </template> </div> </template> diff --git a/app/assets/javascripts/jira_connect/subscriptions/pages/sign_in/sign_in_gitlab_multiversion/setup_instructions.vue b/app/assets/javascripts/jira_connect/subscriptions/pages/sign_in/sign_in_gitlab_multiversion/setup_instructions.vue new file mode 100644 index 00000000000..00fa739b518 --- /dev/null +++ b/app/assets/javascripts/jira_connect/subscriptions/pages/sign_in/sign_in_gitlab_multiversion/setup_instructions.vue @@ -0,0 +1,35 @@ +<script> +import { GlButton, GlLink } from '@gitlab/ui'; +import { OAUTH_SELF_MANAGED_DOC_LINK } from '~/jira_connect/subscriptions/constants'; + +export default { + components: { + GlButton, + GlLink, + }, + OAUTH_SELF_MANAGED_DOC_LINK, +}; +</script> + +<template> + <div class="gl-max-w-62 gl-mx-auto gl-mt-7"> + <h3>{{ s__('JiraService|Continue setup in GitLab') }}</h3> + <p> + {{ + s__( + 'JiraService|In order to complete the set up, you’ll need to complete a few steps in GitLab.', + ) + }} + <gl-link + class="gl-reset-font-size!" + :href="$options.OAUTH_SELF_MANAGED_DOC_LINK" + target="_blank" + >{{ __('Learn more') }}</gl-link + > + </p> + + <gl-button variant="confirm" @click="$emit('next')"> + {{ __('Next') }} + </gl-button> + </div> +</template> diff --git a/app/assets/javascripts/jira_connect/subscriptions/pages/sign_in/sign_in_gitlab_multiversion/version_select_form.vue b/app/assets/javascripts/jira_connect/subscriptions/pages/sign_in/sign_in_gitlab_multiversion/version_select_form.vue index 6b32225ed11..37a65946b3f 100644 --- a/app/assets/javascripts/jira_connect/subscriptions/pages/sign_in/sign_in_gitlab_multiversion/version_select_form.vue +++ b/app/assets/javascripts/jira_connect/subscriptions/pages/sign_in/sign_in_gitlab_multiversion/version_select_form.vue @@ -55,7 +55,6 @@ export default { }, radioOptions: RADIO_OPTIONS, i18n: { - title: s__('JiraService|Welcome to GitLab for Jira'), saasRadioLabel: __('GitLab.com (SaaS)'), saasRadioHelp: __('Most common'), selfManagedRadioLabel: __('GitLab (self-managed)'), |