Skip to content

Commit

Permalink
feat:制品搜索列表页面希望能显示完整的制品路径 TencentBlueKing#2329
Browse files Browse the repository at this point in the history
  • Loading branch information
lannoy0523 authored Sep 5, 2024
1 parent c017e5f commit 3ea551f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,18 @@
</forbid-tag>
</div>
<span class="package-card-description text-overflow" :title="cardData.description">{{ cardData.description }}</span>
<div class="package-card-data">
<template v-if="cardData.type">
<div class="package-card-data" v-if="cardData.type">
<template>
<div class="card-metadata" :title="$t('latestVersion') + ':' + `${cardData.latest}`"></div>
<div class="card-metadata" :title="$t('lastModified') + ':' + `${formatDate(cardData.lastModifiedDate)}`"></div>
<div class="card-metadata" :title="$t('versions') + ':' + `${cardData.versions}`"></div>
<div class="card-metadata" :title="$t('downloadStats') + ':' + `${cardData.downloads}`"></div>
</template>
<template v-else>
</div>
<div class="package-card-data-more" v-else>
<template>
<div class="card-metadata" :title="$t('repo') + ':' + `${cardData.repoName}`"></div>
<div class="card-metadata" :title="$t('filePath') + ':' + `${cardData.fullPath}`"></div>
<div class="card-metadata" :title="$t('fileSize') + ':' + `${convertFileSize(cardData.size)}`"></div>
<div class="card-metadata" :title="$t('lastModified') + ':' + `${formatDate(cardData.lastModifiedDate)}`"></div>
<div class="card-metadata" :title="$t('created') + ':' + `${formatDate(cardData.createdDate)}`"></div>
Expand Down Expand Up @@ -149,6 +152,20 @@
}
}
}
.package-card-data-more {
display: grid;
grid-template: auto / repeat(5, 1fr);
.card-metadata {
padding: 0 5px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
&:after {
content: attr(title);
color: var(--fontSubsidiaryColor);
}
}
}
}
.card-operation {
visibility: hidden;
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/locale/repository/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,8 @@
"downloadSorting": "Order by download count",
"projectNameSorting": "Order by project name",
"repo": "Repository",
"fileSize": "file size",
"lastModified": "last modified",
"fileSize": "File Size",
"lastModified": "Last Modified",
"created": "Created",
"versions": "Version count",
"downloadStats": "Download stats",
Expand Down

0 comments on commit 3ea551f

Please sign in to comment.