[web] Design review: last row's menu not clipped, Hostname focused after loading, popover closes on Esc and outside click, phone engine chip in the top bar, paused and needs-attention copy with Restore in the panel, change bar offers and countdown, focus after share and kept, fingerprint check when signing by hand, draft kept through sign-in
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
import { Banner, Button, Dialog, Segmented } from "@ianitor/ui";
|
||||
import { ApiError, call, del, get, newKey, patch, post, sentence } from "../lib/api";
|
||||
import { app, navigate, toast } from "../lib/app.svelte";
|
||||
import { shortDate, when } from "../lib/format";
|
||||
import { longDate, shortDate, whenInline } from "../lib/format";
|
||||
import type { CreatedToken, ShareLink, TokenRow } from "../lib/types";
|
||||
|
||||
let { tab }: { tab: string } = $props();
|
||||
@@ -164,7 +164,7 @@
|
||||
<div role="tabpanel" id="panel-{tab}" aria-labelledby="tab-{tab}" class="panel">
|
||||
{#if tab === "general"}
|
||||
<p class="ia-label">Routes repository</p>
|
||||
<p>{settings?.repo ? `${settings.repo.name} on Gitea · ${settings.repo.last_push_at ? "pushed " + when(settings.repo.last_push_at, app.now) : "not pushed yet"}` : "No place to push to is set up."}</p>
|
||||
<p>{settings?.repo ? `${settings.repo.name} on Gitea · ${settings.repo.last_push_at ? "pushed " + whenInline(settings.repo.last_push_at, app.now) : "not pushed yet"}` : "No place to push to is set up."}</p>
|
||||
<p class="ia-label">Health watch after apply</p>
|
||||
<p>{settings?.watch_seconds ?? app.overview?.site?.watch_seconds ?? 60} seconds</p>
|
||||
<p class="ia-label">Signed in</p>
|
||||
@@ -186,7 +186,7 @@
|
||||
<div class="grow">
|
||||
<span class="tname" class:struck={!!revoked[t.id] || !!t.revoked_at}>{t.name}</span>
|
||||
<span class="ia-sub" style="display:block">
|
||||
{#if revoked[t.id]}Revoked {when(revoked[t.id], app.now)}{:else}Made {shortDate(t.created_at)} · {t.last_used_at ? `last used ${when(t.last_used_at, app.now)}` : "never used"} · {t.expires_at ? `expires ${shortDate(t.expires_at)}` : "never expires"}{/if}
|
||||
{#if revoked[t.id]}Revoked {whenInline(revoked[t.id], app.now)}{:else}Made {shortDate(t.created_at)} · {t.last_used_at ? `last used ${whenInline(t.last_used_at, app.now)}` : "never used"} · {t.expires_at ? `expires ${shortDate(t.expires_at)}` : "never expires"}{/if}
|
||||
</span>
|
||||
</div>
|
||||
{#if !revoked[t.id] && !t.revoked_at}
|
||||
@@ -221,7 +221,7 @@
|
||||
{#each active as l (l.id)}
|
||||
<li>
|
||||
<div class="grow"><strong>{l.hostname}</strong>{l.path_prefix !== "/" ? l.path_prefix : ""}
|
||||
<span class="ia-sub" style="display:block">Made {when(l.created_at, app.now)} · expires {when(l.expires_at, app.now)}{l.has_password ? " · password" : ""}</span></div>
|
||||
<span class="ia-sub" style="display:block">Made {whenInline(l.created_at, app.now)} · expires {whenInline(l.expires_at, app.now)}{l.has_password ? " · password" : ""}</span></div>
|
||||
<Button small onclick={() => stop(l)}>Stop this link</Button>
|
||||
</li>
|
||||
{/each}
|
||||
@@ -255,7 +255,7 @@
|
||||
<Button variant={tokenCopied ? "quiet" : "primary"} icon="copy" onclick={copyToken} data-autofocus>{tokenCopied ? "Copy again" : "Copy token"}</Button>
|
||||
</div>
|
||||
{#if tokenCopied}<p role="status">Copied. Paste it into Custos now. Ianitor cannot show it again.</p>{/if}
|
||||
<p class="ia-muted">{made.expires_at ? `Expires on ${shortDate(made.expires_at)}.` : "Never expires."}</p>
|
||||
<p class="ia-muted">{made.expires_at ? `Expires on ${longDate(made.expires_at, false)}.` : "Never expires."}</p>
|
||||
{#if askClose}
|
||||
<p role="alert">Close without copying? The token cannot be shown again.
|
||||
<Button small onclick={() => (askClose = false)}>Go back</Button> <Button small variant="danger" onclick={() => closeToken(true)}>Close anyway</Button></p>
|
||||
|
||||
Reference in New Issue
Block a user