Skip to content

Commit 37cd410

Browse files
BeowulfRGusted
authored andcommitted
feat(ui): always show restart button for Actions jobs (go-gitea#6923)
Always show the rerun button if the job can be rerun. This PR just removes the handling for hiding the rerun button if the item isn't hovered. Closes go-gitea#6737 Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6923 Reviewed-by: Gusted <[email protected]> Co-authored-by: Beowulf <[email protected]> Co-committed-by: Beowulf <[email protected]>
1 parent 24784b2 commit 37cd410

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

web_src/js/components/RepoActionView.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ const sfc = {
3030
intervalID: null,
3131
currentJobStepsStates: [],
3232
artifacts: [],
33-
onHoverRerunIndex: -1,
3433
menuVisible: false,
3534
isFullScreen: false,
3635
timeVisible: {
@@ -457,13 +456,13 @@ export function initRepositoryActionView() {
457456
<div class="action-view-left">
458457
<div class="job-group-section">
459458
<div class="job-brief-list">
460-
<a class="job-brief-item" :href="run.link+'/jobs/'+index" :class="parseInt(jobIndex) === index ? 'selected' : ''" v-for="(job, index) in run.jobs" :key="job.id" @mouseenter="onHoverRerunIndex = job.id" @mouseleave="onHoverRerunIndex = -1">
459+
<a class="job-brief-item" :href="run.link+'/jobs/'+index" :class="parseInt(jobIndex) === index ? 'selected' : ''" v-for="(job, index) in run.jobs" :key="job.id">
461460
<div class="job-brief-item-left">
462461
<ActionRunStatus :locale-status="locale.status[job.status]" :status="job.status"/>
463462
<span class="job-brief-name tw-mx-2 gt-ellipsis">{{ job.name }}</span>
464463
</div>
465464
<span class="job-brief-item-right">
466-
<SvgIcon name="octicon-sync" role="button" :data-tooltip-content="locale.rerun" class="job-brief-rerun tw-mx-2 link-action" :data-url="`${run.link}/jobs/${index}/rerun`" v-if="job.canRerun && onHoverRerunIndex === job.id"/>
465+
<SvgIcon name="octicon-sync" role="button" :data-tooltip-content="locale.rerun" class="job-brief-rerun tw-mx-3 link-action" :data-url="`${run.link}/jobs/${index}/rerun`" v-if="job.canRerun"/>
467466
<span class="step-summary-duration">{{ job.duration }}</span>
468467
</span>
469468
</a>

0 commit comments

Comments
 (0)