diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-20 15:08:50 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-20 15:08:50 +0300 |
commit | 81fb153d0550c2c0b707a374cb6ee9f2ad089790 (patch) | |
tree | 0326c005bea62adc258bb0d4d1a3a7f5fc6a9532 /app/assets/javascripts/jira_connect | |
parent | 084d7453e0866f2b29923552fb1c5f380f283ab5 (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/app.vue | 86 | ||||
-rw-r--r-- | app/assets/javascripts/jira_connect/subscriptions/components/user_link.vue | 2 |
2 files changed, 53 insertions, 35 deletions
diff --git a/app/assets/javascripts/jira_connect/subscriptions/components/app.vue b/app/assets/javascripts/jira_connect/subscriptions/components/app.vue index 22422872183..66aea60c5b5 100644 --- a/app/assets/javascripts/jira_connect/subscriptions/components/app.vue +++ b/app/assets/javascripts/jira_connect/subscriptions/components/app.vue @@ -60,6 +60,12 @@ export default { isBrowserSupported() { return !this.isOauthEnabled || AccessorUtilities.canUseCrypto(); }, + gitlabUrl() { + return gon.gitlab_url; + }, + gitlabLogo() { + return gon.gitlab_logo; + }, }, created() { this.setInitialAlert(); @@ -99,43 +105,55 @@ export default { </script> <template> - <browser-support-alert v-if="!isBrowserSupported" class="gl-mb-7" /> - <div v-else data-testid="jira-connect-app"> - <compatibility-alert class="gl-mb-7" /> - - <gl-alert - v-if="shouldShowAlert" - :variant="alert.variant" - :title="alert.title" - class="gl-mb-5" - data-testid="jira-connect-persisted-alert" - @dismiss="setAlert" + <div> + <header + class="jira-connect-header gl-display-flex gl-align-items-center gl-justify-content-center gl-px-5 gl-border-b-solid gl-border-b-gray-100 gl-border-b-1 gl-bg-white" > - <gl-sprintf v-if="alert.linkUrl" :message="alert.message"> - <template #link="{ content }"> - <gl-link :href="alert.linkUrl" target="_blank">{{ content }}</gl-link> - </template> - </gl-sprintf> + <gl-link :href="gitlabUrl" target="_blank"> + <img :src="gitlabLogo" class="gl-h-6" :alt="__('GitLab')" /> + </gl-link> + <user-link + :user-signed-in="userSignedIn" + :has-subscriptions="hasSubscriptions" + :user="currentUser" + class="gl-fixed gl-right-4" + /> + </header> - <template v-else> - {{ alert.message }} - </template> - </gl-alert> + <main class="jira-connect-app gl-px-5 gl-pt-7 gl-mx-auto"> + <browser-support-alert v-if="!isBrowserSupported" class="gl-mb-7" /> + <div v-else data-testid="jira-connect-app"> + <compatibility-alert class="gl-mb-7" /> - <user-link - :user-signed-in="userSignedIn" - :has-subscriptions="hasSubscriptions" - :user="currentUser" - /> + <gl-alert + v-if="shouldShowAlert" + :variant="alert.variant" + :title="alert.title" + class="gl-mb-5" + data-testid="jira-connect-persisted-alert" + @dismiss="setAlert" + > + <gl-sprintf v-if="alert.linkUrl" :message="alert.message"> + <template #link="{ content }"> + <gl-link :href="alert.linkUrl" target="_blank">{{ content }}</gl-link> + </template> + </gl-sprintf> - <div class="gl-layout-w-limited gl-mx-auto gl-px-5 gl-mb-7"> - <sign-in-page - v-if="!userSignedIn" - :has-subscriptions="hasSubscriptions" - @sign-in-oauth="onSignInOauth" - @error="onSignInError" - /> - <subscriptions-page v-else :has-subscriptions="hasSubscriptions" /> - </div> + <template v-else> + {{ alert.message }} + </template> + </gl-alert> + + <div class="gl-layout-w-limited gl-mx-auto gl-px-5 gl-mb-7"> + <sign-in-page + v-if="!userSignedIn" + :has-subscriptions="hasSubscriptions" + @sign-in-oauth="onSignInOauth" + @error="onSignInError" + /> + <subscriptions-page v-else :has-subscriptions="hasSubscriptions" /> + </div> + </div> + </main> </div> </template> 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 5e2c83aff65..1c589abb07f 100644 --- a/app/assets/javascripts/jira_connect/subscriptions/components/user_link.vue +++ b/app/assets/javascripts/jira_connect/subscriptions/components/user_link.vue @@ -63,7 +63,7 @@ export default { }; </script> <template> - <div class="jira-connect-user gl-font-base"> + <div class="gl-font-base"> <gl-sprintf v-if="userSignedIn" :message="signedInText"> <template #user_link> <gl-link data-testid="gitlab-user-link" :href="gitlabUserLink" target="_blank"> |