style(frontend): apply ultracite 7.12 formatting and lint rules
This commit is contained in:
1 parent
fc4758aa0b
commit
c8e5cff871
109 files changed
+845
-817
No files matched your search
@@ -27,9 +27,9 @@
|
||||
|
||||
const stateLabels: Record<string, string> = {
|
||||
active: "Открыт",
|
||||
revoked: "Отозван",
|
||||
expired: "Истёк",
|
||||
exhausted: "Лимит исчерпан",
|
||||
expired: "Истёк",
|
||||
revoked: "Отозван",
|
||||
};
|
||||
|
||||
let items = $state<FileShare[]>([]);
|
||||
@@ -51,7 +51,8 @@
|
||||
);
|
||||
|
||||
async function load() {
|
||||
const current = ++token;
|
||||
token += 1;
|
||||
const current = token;
|
||||
const activeOnly = filter === "active";
|
||||
loading = true;
|
||||
try {
|
||||
@@ -134,31 +135,31 @@
|
||||
<div class="toolbar">
|
||||
<div class="tabs">
|
||||
<button
|
||||
type="button"
|
||||
class="tab"
|
||||
class:selected={filter === "active"}
|
||||
onclick={() => {
|
||||
filter = "active";
|
||||
}}
|
||||
type="button"
|
||||
class:selected={filter === "active"}
|
||||
>
|
||||
Открытые{activeCount ? ` · ${activeCount}` : ""}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="tab"
|
||||
class:selected={filter === "all"}
|
||||
onclick={() => {
|
||||
filter = "all";
|
||||
}}
|
||||
type="button"
|
||||
class:selected={filter === "all"}
|
||||
>
|
||||
Все
|
||||
</button>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
class="reload"
|
||||
aria-label="Обновить"
|
||||
class="reload"
|
||||
onclick={() => load()}
|
||||
type="button"
|
||||
>
|
||||
<Icon name="reload" size="1.125rem" />
|
||||
</button>
|
||||
@@ -168,8 +169,8 @@
|
||||
<div class="center"><Spinner /></div>
|
||||
{:else if visible.length === 0}
|
||||
<EmptyState
|
||||
title="Ничего не открыто"
|
||||
description="Откройте доступ к файлу из меню медиа"
|
||||
title="Ничего не открыто"
|
||||
/>
|
||||
{:else}
|
||||
<ul class="list">
|
||||
@@ -180,11 +181,11 @@
|
||||
{#snippet children({ props })}
|
||||
<button
|
||||
{...props}
|
||||
type="button"
|
||||
class="head"
|
||||
onclick={() => {
|
||||
expanded = expanded === share.id ? null : share.id;
|
||||
}}
|
||||
type="button"
|
||||
>
|
||||
<span class="glyph" class:muted={state !== "active"}>
|
||||
<Icon
|
||||
@@ -248,23 +249,23 @@
|
||||
{/if}
|
||||
<div class="actions">
|
||||
{#if share.message_id !== null || share.peer_id !== null}
|
||||
<button type="button" class="pill" onclick={() => jump(share)}>
|
||||
<button class="pill" onclick={() => jump(share)} type="button">
|
||||
<Icon name="reply" size="1rem" />К сообщению
|
||||
</button>
|
||||
{/if}
|
||||
{#if state === "active"}
|
||||
<button
|
||||
type="button"
|
||||
class="pill danger"
|
||||
onclick={() => revoke(share)}
|
||||
type="button"
|
||||
>
|
||||
<Icon name="link-broken" size="1rem" />Отозвать
|
||||
</button>
|
||||
{:else}
|
||||
<button
|
||||
type="button"
|
||||
class="pill"
|
||||
onclick={() => reissue(share)}
|
||||
type="button"
|
||||
>
|
||||
<Icon name="replace" size="1rem" />Новая ссылка
|
||||
</button>
|
||||
|
||||
Reference in new issue
Block a user