Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add luma download #136

Merged
merged 3 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading