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

@@ -28,36 +28,36 @@
let chatFilter = $state("");
const DEFAULT_SCOPES: { label: string; scope: PolicyScopeType }[] = [
{ scope: "default_dm", label: "Личные чаты" },
{ scope: "default_group", label: "Группы" },
{ scope: "default_channel", label: "Каналы" },
{ label: "Личные чаты", scope: "default_dm" },
{ label: "Группы", scope: "default_group" },
{ label: "Каналы", scope: "default_channel" },
];
const ALL_FALSE: CaptureToggles = {
messages: false,
media: false,
self_destruct_media: false,
stt: false,
reactions: false,
track_edits_deletes: false,
profile_history: false,
stories: false,
presence: false,
backfill: false,
media: false,
messages: false,
presence: false,
profile_history: false,
reactions: false,
self_destruct_media: false,
stories: false,
stt: false,
track_edits_deletes: false,
};
function pickToggles(t: CaptureToggles): CaptureToggles {
return {
messages: t.messages,
media: t.media,
self_destruct_media: t.self_destruct_media,
stt: t.stt,
reactions: t.reactions,
track_edits_deletes: t.track_edits_deletes,
profile_history: t.profile_history,
stories: t.stories,
presence: t.presence,
backfill: t.backfill,
media: t.media,
messages: t.messages,
presence: t.presence,
profile_history: t.profile_history,
reactions: t.reactions,
self_destruct_media: t.self_destruct_media,
stories: t.stories,
stt: t.stt,
track_edits_deletes: t.track_edits_deletes,
};
}
@@ -133,8 +133,8 @@
try {
const record = await createPolicy({
...ALL_FALSE,
scope_type: scope,
scope_id: scopeId,
scope_type: scope,
});
policies = [...policies, record];
pickFolder = false;
@@ -181,18 +181,18 @@
{/if}
{#if onremove && record.account_id !== null}
<button
type="button"
class="remove"
aria-label="Удалить оверрайд"
class="remove"
onclick={onremove}
type="button"
>
<Icon name="close" size="1.125rem" />
</button>
{/if}
</div>
<CaptureToggleList
toggles={record}
onchange={(key, value) => toggle(record, key, value)}
toggles={record}
/>
</div>
{/snippet}
@@ -217,11 +217,11 @@
{/each}
{#if availableFolders.length > 0}
<button
type="button"
class="add"
onclick={() => {
pickFolder = !pickFolder;
}}
type="button"
>
<Icon name="add" size="1.25rem" />
<span>Добавить папку</span>
@@ -230,9 +230,9 @@
<div class="picker">
{#each availableFolders as folder (folder.folder_id)}
<button
type="button"
class="pick-row"
onclick={() => addOverride("folder", folder.folder_id)}
type="button"
>
{folder.title}
</button>
@@ -250,11 +250,11 @@
)}
{/each}
<button
type="button"
class="add"
onclick={() => {
pickChat = !pickChat;
}}
type="button"
>
<Icon name="add" size="1.25rem" />
<span>Добавить чат</span>
@@ -263,15 +263,15 @@
<div class="picker">
<input
class="filter"
type="text"
placeholder="Поиск чата"
type="text"
bind:value={chatFilter}
>
{#each availableChats as chat (chat.chat_id)}
<button
type="button"
class="pick-row"
onclick={() => addOverride("chat", chat.chat_id)}
type="button"
>
{chat.title ?? `Чат ${chat.chat_id}`}
</button>