diff --git a/amnet-web/src/pages/card-in-screen.tsx b/amnet-web/src/pages/card-in-screen.tsx index 9040da4..bb30898 100644 --- a/amnet-web/src/pages/card-in-screen.tsx +++ b/amnet-web/src/pages/card-in-screen.tsx @@ -37,7 +37,7 @@ async function performCardInAction(card: AimeCard, server: AimeServer, setCardIn try { const abort = new AbortController(); setTimeout(() => abort.abort("timeout"), 10000); - + await performCardIn(server.serverAddress, {cardId: card.id}, abort.signal); await db.cards.update(card.id, {lastUsed: Date.now()}); @@ -153,8 +153,9 @@ function ServerCardInPage() { {!server && ()} - {(server && connectionError) - ? + {(server && !connectionError) && } + {(server && connectionError) && ( + Connection Issue @@ -164,7 +165,7 @@ function ServerCardInPage() { onClick={() => setServerReloadCounter(serverReloadCounter + 1)}>try again. - : } + )} {server && (
@@ -201,23 +202,25 @@ function ServerCardInPage() { className="flex flex-col-reverse sm:flex-row sm:flex-wrap justify-center sm:justify-between sm:gap-2 gap-4"> {server?.id && (
- {location.protocol === "https:" && navigator.share ? ( -

navigator.share({url: shareUrl})}> - Share -

- ) : ( -

navigator.clipboard.writeText(shareUrl).then(() => { - toast({ - description: "Server URL has been copied to clipboard.", - duration: 2500 - }) - })}> - Copy URL -

- )} - + {location.protocol === "https:" && (<> + {navigator.share ? ( +

navigator.share({url: shareUrl})}> + Share +

+ ) : ( +

navigator.clipboard.writeText(shareUrl).then(() => { + toast({ + description: "Server URL has been copied to clipboard.", + duration: 2500 + }) + })}> + Copy URL +

)} + + )} +

Delete {server.serverName}