Commit 6f35f30b by Jonathan Thomas

Fixing download buttons to not target=new window, and download the file instead…

Fixing download buttons to not target=new window, and download the file instead of redirecting to the file. Also fixing a lint issue.
parent ed036f0b
...@@ -141,15 +141,15 @@ ...@@ -141,15 +141,15 @@
<ul class="dropdown-menu dropdown-menu-end"> <ul class="dropdown-menu dropdown-menu-end">
<li> <li>
<a class="dropdown-item" <a class="dropdown-item"
:href="current_export.output" :href="exportDownloadUrl || '#'"
download> download
rel="noopener">
Download Video (*.mp4) Download Video (*.mp4)
</a> </a>
</li> </li>
<li> <li>
<a class="dropdown-item" <a class="dropdown-item"
:href="projectDownloadUrl || '#'" :href="projectDownloadUrl || '#'"
target="_blank"
rel="noopener"> rel="noopener">
Download OpenShot Project (*.zip) Download OpenShot Project (*.zip)
</a> </a>
...@@ -585,6 +585,13 @@ export default { ...@@ -585,6 +585,13 @@ export default {
const link = '<a href="https://www.openshot.org/cloud-api/" target="_blank" rel="noopener">OpenShot Cloud API</a>' const link = '<a href="https://www.openshot.org/cloud-api/" target="_blank" rel="noopener">OpenShot Cloud API</a>'
return `Deploy ${link} on AWS, Azure, or Google Cloud to access full-length exports, scalable rendering resources, persistent project storage, and a reliable cloud backend for your video production pipeline.` return `Deploy ${link} on AWS, Azure, or Google Cloud to access full-length exports, scalable rendering resources, persistent project storage, and a reliable cloud backend for your video production pipeline.`
}, },
exportDownloadUrl() {
if (!this.current_export || !this.current_export.url) {
return this.current_export?.output || null
}
const trimmed = this.current_export.url.replace(/\/+$/, '')
return `${trimmed}/download/`
},
projectDownloadUrl() { projectDownloadUrl() {
if (!this.project) { if (!this.project) {
return null return null
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment