Disable download action logs button when there's no logs (#26114)

If there's no logs, you can also click the download button, then you
will get `job is not started` page

![image](https://github.com/go-gitea/gitea/assets/18380374/c0dad309-1fb9-4505-99da-bf0038423744)
https://gitea.com/yp05327/testrepo/actions/runs/38

After:
If there's no steps displayed, the download button will be disabled.

![image](https://github.com/go-gitea/gitea/assets/18380374/5f51ba70-3d0b-46d8-ad77-f02c4c8fa52c)
This commit is contained in:
yp05327 2023-07-27 03:51:26 +09:00 committed by GitHub
parent 79995a8194
commit 36732005b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -74,7 +74,7 @@
<SvgIcon name="octicon-gear" :size="18"/> <SvgIcon name="octicon-gear" :size="18"/>
</button> </button>
<div class="menu transition action-job-menu" :class="{visible: menuVisible}" v-if="menuVisible" v-cloak> <div class="menu transition action-job-menu" :class="{visible: menuVisible}" v-if="menuVisible" v-cloak>
<a class="item" :href="run.link+'/jobs/'+jobIndex+'/logs'" target="_blank"> <a :class="['item', currentJob.steps.length === 0 ? 'disabled' : '']" :href="run.link+'/jobs/'+jobIndex+'/logs'" target="_blank">
<i class="icon"><SvgIcon name="octicon-download"/></i> <i class="icon"><SvgIcon name="octicon-download"/></i>
{{ locale.downloadLogs }} {{ locale.downloadLogs }}
</a> </a>