feat: polish install guide loading state
This commit is contained in:
@@ -14,7 +14,7 @@
|
|||||||
Share2,
|
Share2,
|
||||||
Smartphone,
|
Smartphone,
|
||||||
} from "$components/ui/icons.js";
|
} 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 { Select } from "$components/ui/primitives.js";
|
||||||
import Button from "$components/ui/button.svelte";
|
import Button from "$components/ui/button.svelte";
|
||||||
import Card from "$components/ui/card.svelte";
|
import Card from "$components/ui/card.svelte";
|
||||||
@@ -335,9 +335,14 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{#if guideState?.loading && !guideState?.loaded}
|
{#if guideState?.loading && !guideState?.loaded}
|
||||||
<Card class="install-empty">
|
<div
|
||||||
<p>{t("wa_install_loading", {}, "Loading instructions...")}</p>
|
class="install-loading"
|
||||||
</Card>
|
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}
|
{:else if !guideState?.enabled || !config || !platforms.length}
|
||||||
<Card class="install-empty">
|
<Card class="install-empty">
|
||||||
<p>{t("wa_install_unavailable", {}, "Instructions are unavailable.")}</p>
|
<p>{t("wa_install_unavailable", {}, "Instructions are unavailable.")}</p>
|
||||||
@@ -553,6 +558,22 @@
|
|||||||
gap: 14px;
|
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 {
|
.install-selector-block {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 9px;
|
gap: 9px;
|
||||||
@@ -1047,4 +1068,16 @@
|
|||||||
transform: scale(1);
|
transform: scale(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@keyframes install-loader-enter {
|
||||||
|
from {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(4px);
|
||||||
|
}
|
||||||
|
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user