ui: rename download to save for offline
cx
This commit is contained in:
1 parent
73cc935d99
commit
db1957bedd
3 files changed
+20
-20
No files matched your search
@@ -7,7 +7,7 @@
|
|||||||
ListPlus,
|
ListPlus,
|
||||||
ListEnd,
|
ListEnd,
|
||||||
Share2,
|
Share2,
|
||||||
Download,
|
CloudDownload,
|
||||||
Link,
|
Link,
|
||||||
RefreshCw
|
RefreshCw
|
||||||
} from 'lucide-svelte';
|
} from 'lucide-svelte';
|
||||||
@@ -321,15 +321,15 @@
|
|||||||
if (downloadOpen) setDownloadSubmenuPosition();
|
if (downloadOpen) setDownloadSubmenuPosition();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Download size={14} />
|
<CloudDownload size={14} />
|
||||||
<span>Download album</span>
|
<span>Save album for offline</span>
|
||||||
<ChevronRight size={14} class="chevron" />
|
<ChevronRight size={14} class="chevron" />
|
||||||
{#if downloadOpen}
|
{#if downloadOpen}
|
||||||
<div class="submenu" bind:this={downloadSubmenuEl} style={downloadSubmenuStyle}>
|
<div class="submenu" bind:this={downloadSubmenuEl} style={downloadSubmenuStyle}>
|
||||||
{#if onReDownloadAlbum}
|
{#if onReDownloadAlbum}
|
||||||
<button class="menu-item" onclick={() => handleAction(onReDownloadAlbum)}>
|
<button class="menu-item" onclick={() => handleAction(onReDownloadAlbum)}>
|
||||||
<RefreshCw size={14} />
|
<RefreshCw size={14} />
|
||||||
<span>Re-download album</span>
|
<span>Refresh album offline copy</span>
|
||||||
</button>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
@@ -337,8 +337,8 @@
|
|||||||
</div>
|
</div>
|
||||||
{:else}
|
{:else}
|
||||||
<button class="menu-item" onclick={() => handleAction(onDownload)}>
|
<button class="menu-item" onclick={() => handleAction(onDownload)}>
|
||||||
<Download size={14} />
|
<CloudDownload size={14} />
|
||||||
<span>Download album</span>
|
<span>Save album for offline</span>
|
||||||
</button>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Download, Check, Loader, AlertCircle, CloudOff } from 'lucide-svelte';
|
import { CloudDownload, CloudCheck, Loader, AlertCircle, CloudOff } from 'lucide-svelte';
|
||||||
import { t } from '$lib/i18n';
|
import { t } from '$lib/i18n';
|
||||||
import {
|
import {
|
||||||
subscribe as subscribeOffline,
|
subscribe as subscribeOffline,
|
||||||
@@ -55,11 +55,11 @@
|
|||||||
return $t('offline.featureDisabled');
|
return $t('offline.featureDisabled');
|
||||||
}
|
}
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case 'none': return 'Download for offline';
|
case 'none': return 'Save for offline';
|
||||||
case 'queued': return 'Queued for download';
|
case 'queued': return 'Queued for offline';
|
||||||
case 'downloading': return `Downloading ${progress}%`;
|
case 'downloading': return `Downloading ${progress}%`;
|
||||||
case 'ready': return 'Downloaded (click to remove)';
|
case 'ready': return 'Available offline (click to remove)';
|
||||||
case 'failed': return 'Download failed (click to retry)';
|
case 'failed': return 'Failed to save for offline (click to retry)';
|
||||||
default: return '';
|
default: return '';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
disabled={isDisabled}
|
disabled={isDisabled}
|
||||||
>
|
>
|
||||||
{#if status === 'ready'}
|
{#if status === 'ready'}
|
||||||
<Check {size} />
|
<CloudCheck {size} />
|
||||||
{:else if status === 'downloading' || status === 'queued'}
|
{:else if status === 'downloading' || status === 'queued'}
|
||||||
<div class="progress-ring" style="--progress: {progress}">
|
<div class="progress-ring" style="--progress: {progress}">
|
||||||
<Loader {size} class="spinning" />
|
<Loader {size} class="spinning" />
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
{:else if isOffline}
|
{:else if isOffline}
|
||||||
<CloudOff {size} />
|
<CloudOff {size} />
|
||||||
{:else}
|
{:else}
|
||||||
<Download {size} />
|
<CloudDownload {size} />
|
||||||
{/if}
|
{/if}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
User,
|
User,
|
||||||
Link,
|
Link,
|
||||||
Trash2,
|
Trash2,
|
||||||
Download,
|
CloudDownload,
|
||||||
RefreshCw,
|
RefreshCw,
|
||||||
Radio
|
Radio
|
||||||
} from 'lucide-svelte';
|
} from 'lucide-svelte';
|
||||||
@@ -365,21 +365,21 @@
|
|||||||
if (downloadOpen) setDownloadSubmenuPosition();
|
if (downloadOpen) setDownloadSubmenuPosition();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Download size={14} />
|
<CloudDownload size={14} />
|
||||||
<span>Download</span>
|
<span>Save for offline</span>
|
||||||
<ChevronRight size={14} class="chevron" />
|
<ChevronRight size={14} class="chevron" />
|
||||||
{#if downloadOpen}
|
{#if downloadOpen}
|
||||||
<div class="submenu" bind:this={downloadSubmenuEl} style={downloadSubmenuStyle}>
|
<div class="submenu" bind:this={downloadSubmenuEl} style={downloadSubmenuStyle}>
|
||||||
{#if onReDownload}
|
{#if onReDownload}
|
||||||
<button class="menu-item" onclick={() => handleAction(onReDownload)}>
|
<button class="menu-item" onclick={() => handleAction(onReDownload)}>
|
||||||
<RefreshCw size={14} />
|
<RefreshCw size={14} />
|
||||||
<span>Re-download</span>
|
<span>Refresh offline copy</span>
|
||||||
</button>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
{#if onRemoveDownload}
|
{#if onRemoveDownload}
|
||||||
<button class="menu-item danger" onclick={() => handleAction(onRemoveDownload)}>
|
<button class="menu-item danger" onclick={() => handleAction(onRemoveDownload)}>
|
||||||
<Trash2 size={14} />
|
<Trash2 size={14} />
|
||||||
<span>Remove download</span>
|
<span>Remove offline copy</span>
|
||||||
</button>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
@@ -387,8 +387,8 @@
|
|||||||
</div>
|
</div>
|
||||||
{:else}
|
{:else}
|
||||||
<button class="menu-item" onclick={() => handleAction(onDownload)}>
|
<button class="menu-item" onclick={() => handleAction(onDownload)}>
|
||||||
<Download size={14} />
|
<CloudDownload size={14} />
|
||||||
<span>Download</span>
|
<span>Save for offline</span>
|
||||||
</button>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
Reference in new issue
Block a user