feat: redesign wallet login and favorites, fix desktop/mobile bugs

- Remove forced BNB chain switch on injected login (signature is chain-agnostic)
- Refine isMobileDevice so touch Macs stay on desktop flow
- Wire RainbowKit/WalletConnect as a real MetaMask/imToken QR fallback,
  gated on a valid VITE_WALLETCONNECT_PROJECT_ID
- Rebuild login modal: single desktop primary action, collapsible other
  methods, mobile open-app fallback feedback, brand icons
- Add My Favorites entry points (header, mobile menu, wallet dropdown)
- Favorites page: error retry, mobile filter drawer
- Auto sign-out and re-login prompt on favorites 401
- Full native translations for all wallet strings across 7 locales

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
TerryM
2026-06-02 03:43:13 +08:00
parent f935f122f9
commit 7abe4a868c
17 changed files with 715 additions and 155 deletions

View File

@@ -29,3 +29,13 @@ export function openWalletDeepLink(kind: WalletKind): void {
if (typeof window === "undefined") return;
window.location.href = walletDeepLink(kind);
}
const downloadUrls: Record<WalletKind, string> = {
tokenPocket: "https://www.tokenpocket.pro/en/download/app",
metaMask: "https://metamask.io/download/",
imToken: "https://token.im/download",
};
export function walletDownloadUrl(kind: WalletKind): string {
return downloadUrls[kind];
}