0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-02-28 11:45:12 +01:00

Avoid opening new tab when downloading actions logs (#36740)

`target="_blank"` causes the browser to flash a new tab when actions
logs are downloaded. Using the
[`download`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/a#download)
attribute fixes this.
This commit is contained in:
silverwind 2026-02-25 21:08:08 +01:00 committed by GitHub
parent 569c49debe
commit 0de8a3d3d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -626,7 +626,7 @@ export default defineComponent({
</a>
<div class="divider"/>
<a :class="['item', !currentJob.steps.length ? 'disabled' : '']" :href="run.link+'/jobs/'+jobIndex+'/logs'" target="_blank">
<a :class="['item', !currentJob.steps.length ? 'disabled' : '']" :href="run.link+'/jobs/'+jobIndex+'/logs'" download>
<i class="icon"><SvgIcon name="octicon-download"/></i>
{{ locale.downloadLogs }}
</a>