Fix rerun icon on action view component (#25531)

Right now rerun icon on action view component will not be seen when
duration text length is long, because the wrapper `job-brief-info` has a
fixed width, and the svg is squeezed. The way to fix this in this PR is
to change width to `fit-content` and exchange position of duration text
and rerun svg.

Before (rerun svg not shown on hover):

<img width="1401" alt="Screen Shot 2023-06-27 at 12 53 41"
src="https://github.com/go-gitea/gitea/assets/17645053/bb3f62ec-8c56-4dbc-96f1-718b50426d91">

After:

<img width="1409" alt="Screen Shot 2023-06-27 at 12 50 59"
src="https://github.com/go-gitea/gitea/assets/17645053/620aa02c-2326-408d-a763-453f48f42c40">
This commit is contained in:
HesterG 2023-06-27 22:34:33 +08:00 committed by GitHub
parent 6dbcf6fbc5
commit 00b98bc8e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,8 +38,8 @@
<span class="job-brief-name gt-mx-3 gt-ellipsis">{{ job.name }}</span> <span class="job-brief-name gt-mx-3 gt-ellipsis">{{ job.name }}</span>
</a> </a>
<span class="job-brief-info"> <span class="job-brief-info">
<span class="step-summary-duration">{{ job.duration }}</span>
<SvgIcon name="octicon-sync" role="button" :data-tooltip-content="locale.rerun" class="job-brief-rerun gt-mx-3" @click="rerunJob(index)" v-if="job.canRerun && onHoverRerunIndex === job.id"/> <SvgIcon name="octicon-sync" role="button" :data-tooltip-content="locale.rerun" class="job-brief-rerun gt-mx-3" @click="rerunJob(index)" v-if="job.canRerun && onHoverRerunIndex === job.id"/>
<span class="step-summary-duration">{{ job.duration }}</span>
</span> </span>
</div> </div>
</div> </div>
@ -590,6 +590,7 @@ export function initRepositoryActionView() {
.job-brief-item .job-brief-link { .job-brief-item .job-brief-link {
display: flex; display: flex;
width: 100%; width: 100%;
min-width: 0;
} }
.job-brief-item .job-brief-link span { .job-brief-item .job-brief-link span {
@ -610,7 +611,6 @@ export function initRepositoryActionView() {
.job-brief-item .job-brief-info { .job-brief-item .job-brief-info {
display: flex; display: flex;
align-items: center; align-items: center;
width: 55px;
} }
/* ================ */ /* ================ */