Fix a couple regressions from moving downloads to separate component
This commit is contained in:
1 parent
d307d48a82
commit
44ca2989fc
3 files changed
+38
-40
No files matched your search
+4
-4
@@ -457,6 +457,10 @@
|
||||
"resetAll": {
|
||||
"string": "Reset All",
|
||||
"context": "Button that resets all settings"
|
||||
},
|
||||
"downloadsWillAppearHere": {
|
||||
"string": "Downloads will appear here",
|
||||
"context": "Placeholder that appears when no project has been packaged yet so there is nothing to download"
|
||||
}
|
||||
},
|
||||
"downloads": {
|
||||
@@ -464,10 +468,6 @@
|
||||
"string": "Download {filename} ({size})",
|
||||
"context": "Link to download project after it has been packaged. filename might be \"Packaged Project.html\" and size might be \"6.2MB\""
|
||||
},
|
||||
"placeholder": {
|
||||
"string": "Downloads will appear here",
|
||||
"context": "Placeholder that appears when no project has been packaged yet so there is nothing to download"
|
||||
},
|
||||
"useWorkaround": {
|
||||
"string": "Click here if download link doesn't work",
|
||||
"context": "Buttons that appears when downloading certain file types on certain systems to work around system bugs that prevent downloading files."
|
||||
|
||||
+23
-31
@@ -46,36 +46,28 @@
|
||||
}
|
||||
</style>
|
||||
|
||||
{#if url}
|
||||
<Section center>
|
||||
<div>
|
||||
<p>
|
||||
<a href={url} download={name}>
|
||||
{$_('downloads.link')
|
||||
.replace('{size}', `${(blob.size / 1000 / 1000).toFixed(2)}MB`)
|
||||
.replace('{filename}', name)}
|
||||
</a>
|
||||
</p>
|
||||
{#if isChromeOS && name.endsWith('.html')}
|
||||
<p class="alternative">
|
||||
<button
|
||||
on:click={useAlternativeDownloadToBypassChromeOSBugs}
|
||||
disabled={zipping}
|
||||
>
|
||||
{#if zipping}
|
||||
{$_('downloads.workaroundInProgress')}
|
||||
{:else}
|
||||
{$_('downloads.useWorkaround')}
|
||||
{/if}
|
||||
</button>
|
||||
</p>
|
||||
{/if}
|
||||
</div>
|
||||
</Section>
|
||||
{:else}
|
||||
<Section caption>
|
||||
<Section center>
|
||||
<div>
|
||||
<p>
|
||||
{$_('downloads.placeholder')}
|
||||
<a href={url} download={name}>
|
||||
{$_('downloads.link')
|
||||
.replace('{size}', `${(blob.size / 1000 / 1000).toFixed(2)}MB`)
|
||||
.replace('{filename}', name)}
|
||||
</a>
|
||||
</p>
|
||||
</Section>
|
||||
{/if}
|
||||
{#if isChromeOS && name.endsWith('.html')}
|
||||
<p class="alternative">
|
||||
<button
|
||||
on:click={useAlternativeDownloadToBypassChromeOSBugs}
|
||||
disabled={zipping}
|
||||
>
|
||||
{#if zipping}
|
||||
{$_('downloads.workaroundInProgress')}
|
||||
{:else}
|
||||
{$_('downloads.useWorkaround')}
|
||||
{/if}
|
||||
</button>
|
||||
</p>
|
||||
{/if}
|
||||
</div>
|
||||
</Section>
|
||||
@@ -861,8 +861,14 @@
|
||||
</div>
|
||||
</Section>
|
||||
|
||||
<Downloads
|
||||
name={result ? result.filename : null}
|
||||
url={result ? result.url : null}
|
||||
blob={result ? result.blob : null}
|
||||
/>
|
||||
{#if result}
|
||||
<Downloads
|
||||
name={result ? result.filename : null}
|
||||
url={result ? result.url : null}
|
||||
blob={result ? result.blob : null}
|
||||
/>
|
||||
{:else if !$progress.visible}
|
||||
<Section caption>
|
||||
<p>{$_('options.downloadsWillAppearHere')}</p>
|
||||
</Section>
|
||||
{/if}
|
||||
Reference in new issue
Block a user