fix(frontend,backend): storage categories keep one hue in both themes, trash counted in the total, undo keeps the list, larger touch targets
This commit is contained in:
1 parent
06ae3e928f
commit
580927da0a
11 files changed
+112
-47
No files matched your search
@@ -19,7 +19,11 @@
|
||||
import Spinner from "#lib/components/ui/Spinner.svelte";
|
||||
import { formatBytes } from "#lib/format/media.js";
|
||||
import { plural } from "#lib/format/shares.js";
|
||||
import { filesLabel, purgeLabel } from "#lib/format/storage.js";
|
||||
import {
|
||||
filesLabel,
|
||||
messagesLabel,
|
||||
purgeLabel,
|
||||
} from "#lib/format/storage.js";
|
||||
import { chats } from "#lib/stores/chats.svelte.js";
|
||||
import { ui } from "#lib/stores/ui.svelte.js";
|
||||
import { isMobile } from "#lib/viewport.js";
|
||||
@@ -50,6 +54,7 @@
|
||||
);
|
||||
const viewerItems = $derived<ViewerItem[]>(
|
||||
items.map((item) => ({
|
||||
caption: `${formatBytes(item.file_size)} · ${chatTitle(item.chat_id)}`,
|
||||
downloaded: true,
|
||||
fileName: item.file_name,
|
||||
fileSize: item.file_size,
|
||||
@@ -180,6 +185,7 @@
|
||||
size={item.file_size}
|
||||
src={trashedUrl(item.storage_key)}
|
||||
sub={chatTitle(item.chat_id)}
|
||||
tail={item.refs > 1 ? messagesLabel(item.refs) : undefined}
|
||||
weight={heaviest > 0 ? (item.file_size ?? 0) / heaviest : 0}
|
||||
>
|
||||
{#snippet menu()}
|
||||
@@ -292,17 +298,7 @@
|
||||
"будут удалены"
|
||||
)}
|
||||
с диска.
|
||||
{#if doomedGone < doomed.length}
|
||||
{doomedGone === 0 ? "Потом их" : "Остальные потом"}
|
||||
можно скачать из Telegram заново.
|
||||
{/if}
|
||||
</p>
|
||||
{#if problem}
|
||||
<p class="confirm warn">
|
||||
<Icon name="warning" size="1.25rem" />
|
||||
<span>{problem}.</span>
|
||||
</p>
|
||||
{/if}
|
||||
{#if doomedGone > 0}
|
||||
<p class="confirm warn">
|
||||
<Icon name="warning" size="1.25rem" />
|
||||
@@ -314,6 +310,18 @@
|
||||
</span>
|
||||
</p>
|
||||
{/if}
|
||||
{#if doomedGone < doomed.length}
|
||||
<p class="confirm rest">
|
||||
{doomedGone === 0 ? "Потом их" : "Остальные"}
|
||||
можно скачать из Telegram заново.
|
||||
</p>
|
||||
{/if}
|
||||
{#if problem}
|
||||
<p class="confirm warn">
|
||||
<Icon name="warning" size="1.25rem" />
|
||||
<span>{problem}.</span>
|
||||
</p>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
<div class="dialog-actions">
|
||||
@@ -431,6 +439,10 @@
|
||||
font-size: 0.9375rem;
|
||||
line-height: 1.45;
|
||||
|
||||
&.rest {
|
||||
margin-top: 0.75rem;
|
||||
}
|
||||
|
||||
&.warn {
|
||||
display: flex;
|
||||
gap: 0.625rem;
|
||||
|
||||
Reference in new issue
Block a user