summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/pipelines/components/pipelines_list/empty_state/ci_templates.vue
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-08-18 08:17:02 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-08-18 08:17:02 +0000
commitb39512ed755239198a9c294b6a45e65c05900235 (patch)
treed234a3efade1de67c46b9e5a38ce813627726aa7 /app/assets/javascripts/pipelines/components/pipelines_list/empty_state/ci_templates.vue
parentd31474cf3b17ece37939d20082b07f6657cc79a9 (diff)
downloadgitlab-ce-b39512ed755239198a9c294b6a45e65c05900235.tar.gz
Add latest changes from gitlab-org/gitlab@15-3-stable-eev15.3.0-rc42
Diffstat (limited to 'app/assets/javascripts/pipelines/components/pipelines_list/empty_state/ci_templates.vue')
-rw-r--r--app/assets/javascripts/pipelines/components/pipelines_list/empty_state/ci_templates.vue14
1 files changed, 10 insertions, 4 deletions
diff --git a/app/assets/javascripts/pipelines/components/pipelines_list/empty_state/ci_templates.vue b/app/assets/javascripts/pipelines/components/pipelines_list/empty_state/ci_templates.vue
index 64d4414eb94..439dc0eb253 100644
--- a/app/assets/javascripts/pipelines/components/pipelines_list/empty_state/ci_templates.vue
+++ b/app/assets/javascripts/pipelines/components/pipelines_list/empty_state/ci_templates.vue
@@ -32,9 +32,10 @@ export default {
.map(({ name, logo, title }) => {
return {
name: title || name,
+ description: sprintf(this.$options.i18n.description, { name: title || name }),
+ isPng: logo.endsWith('png'),
logo,
link: mergeUrlParams({ template: name }, this.pipelineEditorPath),
- description: sprintf(this.$options.i18n.description, { name: title || name }),
};
});
@@ -48,6 +49,9 @@ export default {
label: template,
});
},
+ logoStyle(template) {
+ return template.isPng ? { objectFit: 'contain' } : '';
+ },
},
i18n: {
description: s__(
@@ -66,11 +70,13 @@ export default {
>
<div class="gl-display-flex gl-flex-direction-row gl-align-items-center">
<gl-avatar
- :src="template.logo"
- :size="48"
+ :alt="template.name"
class="gl-mr-5 gl-bg-white dark-mode-override"
+ :class="{ 'gl-p-2': template.isPng }"
+ :style="logoStyle(template)"
:shape="$options.AVATAR_SHAPE_OPTION_RECT"
- :alt="template.name"
+ :size="48"
+ :src="template.logo"
data-testid="template-logo"
/>
<div class="gl-flex-direction-row">