Skip to content

Commit

Permalink
Hcode/add luma download (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
hyf-github-user authored Sep 6, 2024
1 parent 438df9b commit 1adb387
Show file tree
Hide file tree
Showing 71 changed files with 4,428 additions and 4,268 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "add luma download",
"packageName": "@acedatacloud/nexior",
"email": "[email protected]",
"dependentChangeType": "patch"
}
23 changes: 16 additions & 7 deletions src/components/luma/task/Preview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@
{{ $t('luma.button.extend') }}
</el-button>
</el-tooltip>
<el-tooltip class="box-item" effect="dark" :content="$t('luma.message.downloadVideo')" placement="top-start">
<el-button
type="info"
size="small"
class="btn-action"
@click="onDownload($event, modelValue?.response?.video_url)"
>
{{ $t('luma.button.download') }}
</el-button>
</el-tooltip>
</div>
<el-alert :closable="false" class="mt-2 success">
<p class="description">
Expand Down Expand Up @@ -144,6 +154,12 @@ export default defineComponent({
video_url: response.video_url
});
},
onDownload(event: MouseEvent, video_url: string) {
event.stopPropagation();
console.log('on download');
// download url here
window.open(video_url, '_blank');
},
onReload(event: Event) {
const target = event.target as HTMLImageElement;
// append a random url query to existing url query, to force reload the image
Expand All @@ -165,13 +181,6 @@ export default defineComponent({
},
onOpenVideo(url: string) {
window.open(url, '_blank');
},
onDownload(url: string) {
// download image using javascript
const link = document.createElement('a');
link.href = url;
link.download = url.split('/').pop() as string;
link.click();
}
}
});
Expand Down
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
222 changes: 111 additions & 111 deletions src/i18n/ar/common.json

Large diffs are not rendered by default.

374 changes: 191 additions & 183 deletions src/i18n/ar/luma.json

Large diffs are not rendered by default.

Loading

0 comments on commit 1adb387

Please sign in to comment.