Skip to content

Commit

Permalink
feat(UI): Change output link for button + add space between number an…
Browse files Browse the repository at this point in the history
…d 'download'

close #1769
  • Loading branch information
Skraye committed Jul 18, 2023
1 parent 45146c5 commit b507bd2
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions ui/src/components/executions/VarValue.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<template>
<el-link
<el-button
v-if="isFile(value)"
:icon="Download"
target="_blank"
@click="download(value)"
type="primary"
:href="itemUrl(value)"
>
{{ $t('download') }}
<span v-if="humanSize">({{ humanSize }})</span>
</el-link>
<span>
{{ $t('download') }}
<span v-if="humanSize">({{ humanSize }})</span>
</span>
</el-button>
<span v-else>
{{ value }}
</span>
Expand All @@ -35,6 +36,10 @@
itemUrl(value) {
return `${apiRoot}executions/${this.execution.id}/file?path=${value}`;
},
download(value) {
const url = this.itemUrl(value);
window.open(url, "_blank");
}
},
created() {
Expand Down

0 comments on commit b507bd2

Please sign in to comment.