style(frontend): apply ultracite 7.12 formatting and lint rules

This commit is contained in:
hh committed 2026-09-19 00:21:07 +02:00
1 parent fc4758aa0b
commit c8e5cff871
109 files changed
+845 -817

No files matched your search

@@ -45,12 +45,12 @@
const viewerItems = $derived<ViewerItem[]>(
items.map((item) => ({
messageId: item.message_id,
mediaId: item.id,
kind: item.kind,
downloaded: item.downloaded,
fileName: item.file_name,
fileSize: item.file_size,
kind: item.kind,
mediaId: item.id,
messageId: item.message_id,
mime: item.mime,
}))
);
@@ -102,7 +102,7 @@
return;
}
untrack(() => {
token++;
token += 1;
items = [];
done = false;
loading = false;
@@ -125,21 +125,21 @@
continue;
}
previews[item.id] = {
state: "not-downloaded",
mediaId: item.id,
kind: item.kind,
mediaId: item.id,
state: "not-downloaded",
};
loadMediaItem({
id: item.id,
message_id: item.message_id,
kind: item.kind,
downloaded: item.downloaded,
mime: item.mime,
duration: null,
file_name: item.file_name,
file_size: item.file_size,
ttl_seconds: item.ttl_seconds,
duration: null,
height: null,
id: item.id,
kind: item.kind,
message_id: item.message_id,
mime: item.mime,
ttl_seconds: item.ttl_seconds,
width: null,
}).then((result) => {
if (active) {
@@ -184,10 +184,10 @@
{#snippet children({ props })}
<button
{...props}
type="button"
class="tile"
tabindex="0"
onclick={() => open(index)}
tabindex="0"
type="button"
>
{#if preview(item)?.state === "ready"}
{@const ready = preview(item) as Extract<
@@ -196,15 +196,15 @@
>}
{#if visualKind(item.kind) === "video"}
<video
src={ready.url}
muted
playsinline
preload="metadata"
src={ready.url}
use:poster
></video>
<span class="play"><Icon name="play" size="1.5rem" /></span>
{:else}
<img src={ready.url} alt="">
<img alt="" src={ready.url}>
{/if}
{:else}
<span class="ph"
@@ -240,9 +240,9 @@
{#snippet children({ props })}
<button
{...props}
type="button"
tabindex="0"
onclick={() => open(index)}
tabindex="0"
type="button"
>
<span class="file-icon"><Icon name="document" /></span>
<span class="meta">
@@ -280,20 +280,20 @@
{#if !done && items.length > 0}
<button
type="button"
class="more"
onclick={() => loadMore()}
disabled={loading}
onclick={() => loadMore()}
type="button"
>
{loading ? "Загрузка…" : "Показать ещё"}
</button>
{/if}
<MediaViewer
bind:open={viewerOpen}
bind:index={viewerIndex}
{chatId}
items={viewerItems}
bind:index={viewerIndex}
bind:open={viewerOpen}
/>
<style lang="scss">