diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-15 15:09:10 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-15 15:09:10 +0300 |
commit | 3e0c035fe3a10436be36b4e22a4986479821b8e4 (patch) | |
tree | ca812645f554800b2b3d828c48d7da7ed1ae50c2 /app/assets/javascripts/jira_connect | |
parent | 74e6480896d7fd478930426460021883ba3b83a4 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/jira_connect')
-rw-r--r-- | app/assets/javascripts/jira_connect/subscriptions/components/sign_in_oauth_button.vue | 2 | ||||
-rw-r--r-- | app/assets/javascripts/jira_connect/subscriptions/components/user_link.vue | 23 |
2 files changed, 16 insertions, 9 deletions
diff --git a/app/assets/javascripts/jira_connect/subscriptions/components/sign_in_oauth_button.vue b/app/assets/javascripts/jira_connect/subscriptions/components/sign_in_oauth_button.vue index b9e8bab019f..ad3e70bcb5f 100644 --- a/app/assets/javascripts/jira_connect/subscriptions/components/sign_in_oauth_button.vue +++ b/app/assets/javascripts/jira_connect/subscriptions/components/sign_in_oauth_button.vue @@ -112,7 +112,7 @@ export default { </script> <template> <gl-button - category="primary" + v-bind="$attrs" variant="info" :loading="loading" :disabled="!canUseCrypto" diff --git a/app/assets/javascripts/jira_connect/subscriptions/components/user_link.vue b/app/assets/javascripts/jira_connect/subscriptions/components/user_link.vue index 1c589abb07f..b253f888d22 100644 --- a/app/assets/javascripts/jira_connect/subscriptions/components/user_link.vue +++ b/app/assets/javascripts/jira_connect/subscriptions/components/user_link.vue @@ -1,5 +1,6 @@ <script> import { GlLink, GlSprintf } from '@gitlab/ui'; +import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import { __ } from '~/locale'; import { getGitlabSignInURL } from '~/jira_connect/subscriptions/utils'; @@ -7,7 +8,9 @@ export default { components: { GlLink, GlSprintf, + SignInOauthButton: () => import('./sign_in_oauth_button.vue'), }, + mixins: [glFeatureFlagMixin()], inject: { usersPath: { default: '', @@ -51,6 +54,9 @@ export default { ? this.$options.i18n.signedInAsUserText : this.$options.i18n.signedInText; }, + isOauthEnabled() { + return this.glFeatures.jiraConnectOauth; + }, }, async created() { this.signInURL = await getGitlabSignInURL(this.usersPath); @@ -72,13 +78,14 @@ export default { </template> </gl-sprintf> - <gl-link - v-else-if="hasSubscriptions" - data-testid="sign-in-link" - :href="signInURL" - target="_blank" - > - {{ $options.i18n.signInText }} - </gl-link> + <template v-else-if="hasSubscriptions"> + <sign-in-oauth-button v-if="isOauthEnabled" category="tertiary"> + {{ $options.i18n.signInText }} + </sign-in-oauth-button> + + <gl-link v-else data-testid="sign-in-link" :href="signInURL" target="_blank"> + {{ $options.i18n.signInText }} + </gl-link> + </template> </div> </template> |