terry-wallet-login #15
@@ -3,6 +3,7 @@ import { ChevronLeft, ChevronRight, LoaderCircle, X } from "lucide-react";
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { useI18n } from "../i18n";
|
import { useI18n } from "../i18n";
|
||||||
|
|
||||||
|
import { openWalletDeepLink } from "./deepLinks";
|
||||||
import { getInjectedWallet, type WalletKind } from "./injected";
|
import { getInjectedWallet, type WalletKind } from "./injected";
|
||||||
import { useWallet } from "./WalletProvider";
|
import { useWallet } from "./WalletProvider";
|
||||||
import { useWalletConnectLogin } from "./useWalletConnectLogin";
|
import { useWalletConnectLogin } from "./useWalletConnectLogin";
|
||||||
@@ -197,9 +198,26 @@ export function WalletLoginModal() {
|
|||||||
</p>
|
</p>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
{/* Method: browser wallet (injected). */}
|
{mobileDevice ? (
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onClick={() => openWalletDeepLink(selected)}
|
||||||
|
className="flex flex-col items-start gap-1 rounded-2xl border border-white/10 bg-[#20202a] px-4 py-3 text-left transition hover:border-ark-gold/50 hover:bg-ark-gold/10"
|
||||||
|
>
|
||||||
|
<span className="text-base font-semibold text-neutral-100">
|
||||||
|
{t("walletOpenWalletApp")}
|
||||||
|
</span>
|
||||||
|
<span className="text-xs leading-5 text-neutral-400">
|
||||||
|
{t("walletOpenWalletAppDesc")}
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
) : null}
|
||||||
|
|
||||||
|
{/* Method: browser wallet (injected). Hidden on normal mobile browsers,
|
||||||
|
because only wallet in-app browsers expose an injected wallet. */}
|
||||||
{(() => {
|
{(() => {
|
||||||
const ok = injectedAvailable(selected);
|
const ok = injectedAvailable(selected);
|
||||||
|
if (mobileDevice) return null;
|
||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
@@ -241,9 +259,7 @@ export function WalletLoginModal() {
|
|||||||
? t("walletConnecting")
|
? t("walletConnecting")
|
||||||
: wc.state === "signing"
|
: wc.state === "signing"
|
||||||
? t("walletSigning")
|
? t("walletSigning")
|
||||||
: isTp && mobileDevice
|
: t("walletQrLogin");
|
||||||
? t("walletTpLoginBtn")
|
|
||||||
: t("walletQrLogin");
|
|
||||||
return (
|
return (
|
||||||
<div className="grid gap-2">
|
<div className="grid gap-2">
|
||||||
<button
|
<button
|
||||||
|
|||||||
Reference in New Issue
Block a user