feat: polish install guide loading state

This commit is contained in:
3252a8
2026-05-22 23:24:59 +03:00
parent d9a4a007e2
commit 40414264be
@@ -14,7 +14,7 @@
Share2,
Smartphone,
} from "$components/ui/icons.js";
import { AttentionDot } from "$components/ui/index.js";
import { AttentionDot, Spinner } from "$components/ui/index.js";
import { Select } from "$components/ui/primitives.js";
import Button from "$components/ui/button.svelte";
import Card from "$components/ui/card.svelte";
@@ -335,9 +335,14 @@
</div>
{#if guideState?.loading && !guideState?.loaded}
<Card class="install-empty">
<p>{t("wa_install_loading", {}, "Loading instructions...")}</p>
</Card>
<div
class="install-loading"
role="status"
aria-label={t("wa_install_loading", {}, "Loading instructions...")}
>
<Spinner size="lg" />
<span>{t("wa_install_loading", {}, "Loading instructions...")}</span>
</div>
{:else if !guideState?.enabled || !config || !platforms.length}
<Card class="install-empty">
<p>{t("wa_install_unavailable", {}, "Instructions are unavailable.")}</p>
@@ -553,6 +558,22 @@
gap: 14px;
}
.install-loading {
display: grid;
min-height: min(360px, 48dvh);
place-items: center;
align-content: center;
gap: 12px;
color: var(--muted);
font-size: 13px;
font-weight: 700;
animation: install-loader-enter 0.16s ease-out both;
}
.install-loading :global(.ui-spinner) {
color: var(--accent);
}
.install-selector-block {
display: grid;
gap: 9px;
@@ -1047,4 +1068,16 @@
transform: scale(1);
}
}
@keyframes install-loader-enter {
from {
opacity: 0;
transform: translateY(4px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
</style>