Commit d0500d6a authored by Tom Quirk's avatar Tom Quirk

Address reviewer feedback

- simplify jira connect alert display logic
- add namespacing to success translation
parent 5ec6487d
...@@ -41,17 +41,8 @@ export default { ...@@ -41,17 +41,8 @@ export default {
return this.usersPath; return this.usersPath;
}, },
alertLinkUrl() { shouldShowAlert() {
return this.alert?.linkUrl; return Boolean(this.alert?.message);
},
alertTitle() {
return this.alert?.title;
},
alertMessage() {
return this.alert?.message;
},
alertVariant() {
return this.alert?.variant;
}, },
}, },
modal: { modal: {
...@@ -81,20 +72,20 @@ export default { ...@@ -81,20 +72,20 @@ export default {
<template> <template>
<div> <div>
<gl-alert <gl-alert
v-if="alertMessage" v-if="shouldShowAlert"
class="gl-mb-7" class="gl-mb-7"
:variant="alertVariant" :variant="alert.variant"
:title="alertTitle" :title="alert.title"
@dismiss="setAlert" @dismiss="setAlert"
> >
<gl-sprintf v-if="alertLinkUrl" :message="alertMessage"> <gl-sprintf v-if="alert.linkUrl" :message="alert.message">
<template #link="{ content }"> <template #link="{ content }">
<gl-link :href="alertLinkUrl" target="_blank">{{ content }}</gl-link> <gl-link :href="alert.linkUrl" target="_blank">{{ content }}</gl-link>
</template> </template>
</gl-sprintf> </gl-sprintf>
<template v-else> <template v-else>
{{ alertMessage }} {{ alert.message }}
</template> </template>
</gl-alert> </gl-alert>
......
...@@ -36,7 +36,7 @@ export default { ...@@ -36,7 +36,7 @@ export default {
persistAlert({ persistAlert({
title: s__('Integrations|Namespace successfully linked'), title: s__('Integrations|Namespace successfully linked'),
message: s__( message: s__(
'You should now see GitLab.com activity inside your Jira Cloud issues. %{linkStart}Learn more%{linkEnd}', 'Integrations|You should now see GitLab.com activity inside your Jira Cloud issues. %{linkStart}Learn more%{linkEnd}',
), ),
linkUrl: helpPagePath('integration/jira_development_panel.html', { anchor: 'usage' }), linkUrl: helpPagePath('integration/jira_development_panel.html', { anchor: 'usage' }),
variant: 'success', variant: 'success',
......
...@@ -16435,6 +16435,9 @@ msgstr "" ...@@ -16435,6 +16435,9 @@ msgstr ""
msgid "Integrations|You must have owner or maintainer permissions to link namespaces." msgid "Integrations|You must have owner or maintainer permissions to link namespaces."
msgstr "" msgstr ""
msgid "Integrations|You should now see GitLab.com activity inside your Jira Cloud issues. %{linkStart}Learn more%{linkEnd}"
msgstr ""
msgid "Interactive mode" msgid "Interactive mode"
msgstr "" msgstr ""
...@@ -34513,9 +34516,6 @@ msgstr "" ...@@ -34513,9 +34516,6 @@ msgstr ""
msgid "You need to upload a GitLab project export archive (ending in .gz)." msgid "You need to upload a GitLab project export archive (ending in .gz)."
msgstr "" msgstr ""
msgid "You should now see GitLab.com activity inside your Jira Cloud issues. %{linkStart}Learn more%{linkEnd}"
msgstr ""
msgid "You successfully declined the invitation" msgid "You successfully declined the invitation"
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment