mirror of
https://github.com/aljazceru/mutiny-web.git
synced 2026-02-23 15:14:19 +01:00
handle "running on another device" error state
This commit is contained in:
committed by
Tony Giorgio
parent
d54f43f978
commit
9c9fe609e9
@@ -1,7 +1,9 @@
|
||||
import { Match, Switch } from "solid-js";
|
||||
import { Title } from "solid-start";
|
||||
|
||||
import nodevice from "~/assets/no-device.png";
|
||||
import {
|
||||
Button,
|
||||
DefaultMain,
|
||||
DeleteEverything,
|
||||
ExternalLink,
|
||||
@@ -83,6 +85,11 @@ export function SetupErrorDisplay(props: { initialError: Error }) {
|
||||
<LargeHeader>
|
||||
{i18n.t("error.on_boot.existing_tab.title")}
|
||||
</LargeHeader>
|
||||
<img
|
||||
src={nodevice}
|
||||
alt="no device"
|
||||
class="mx-auto w-1/4 max-w-[25vh] flex-shrink"
|
||||
/>
|
||||
<p class="rounded-xl bg-white/10 p-4 font-mono">
|
||||
<span class="font-bold">{error.name}</span>:{" "}
|
||||
{error.message}
|
||||
@@ -90,6 +97,39 @@ export function SetupErrorDisplay(props: { initialError: Error }) {
|
||||
<NiceP>
|
||||
{i18n.t("error.on_boot.existing_tab.description")}
|
||||
</NiceP>
|
||||
<Button onClick={() => window.location.reload()}>
|
||||
Reload
|
||||
</Button>
|
||||
<ErrorFooter />
|
||||
</DefaultMain>
|
||||
</Match>
|
||||
<Match
|
||||
when={error.message.startsWith("Mutiny is already running")}
|
||||
>
|
||||
<Title>
|
||||
{i18n.t("error.on_boot.already_running.title")}
|
||||
</Title>
|
||||
<DefaultMain>
|
||||
<LargeHeader>
|
||||
{i18n.t("error.on_boot.already_running.title")}
|
||||
</LargeHeader>
|
||||
<img
|
||||
src={nodevice}
|
||||
alt="no device"
|
||||
class="mx-auto w-1/4 max-w-[25vh] flex-shrink"
|
||||
/>
|
||||
<p class="rounded-xl bg-white/10 p-4 font-mono">
|
||||
<span class="font-bold">{error.name}</span>:{" "}
|
||||
{error.message}
|
||||
</p>
|
||||
<NiceP>
|
||||
{i18n.t(
|
||||
"error.on_boot.already_running.description"
|
||||
)}
|
||||
</NiceP>
|
||||
<Button onClick={() => window.location.reload()}>
|
||||
Reload
|
||||
</Button>
|
||||
<ErrorFooter />
|
||||
</DefaultMain>
|
||||
</Match>
|
||||
|
||||
Reference in New Issue
Block a user