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

@@ -164,7 +164,7 @@ export const zhDict: Dict = {
walletConnectedAs: "已连接钱包",
walletDisconnect: "断开连接",
walletLoginTitle: "连接钱包",
walletLoginDesc: "签名验证 BNB Chain 钱包地址,不会发起交易,也不需要 Gas。",
walletLoginDesc: "签名验证钱包地址,不会发起交易,也不需要 Gas。",
walletInjected: "使用浏览器钱包登录",
walletInjectedDesc: "签名验证当前浏览器里的钱包。",
walletNoBrowserWallet: "未检测到浏览器钱包",
@@ -174,13 +174,16 @@ export const zhDict: Dict = {
walletTokenPocket: "TokenPocket",
walletMetaMask: "MetaMask",
walletImToken: "imToken",
walletChooseDesktop:
"选择你要使用的钱包。电脑端需要先安装对应浏览器插件,并切换到 BNB Chain。",
favoritesFilters: "筛选",
favoriteSessionExpired: "登录已过期,请重新登录。",
walletChooseDesktop: "选择你要使用的钱包。电脑端需要先安装对应浏览器插件。",
walletChooseMobile: "选择钱包 App 打开本站。",
walletDesktopHint:
"如果点击后没有弹出钱包,请确认已安装并启用对应的钱包浏览器插件。",
walletInstallSelected: "未检测到 {wallet} 浏览器插件,请先安装或启用后再试。",
walletOpen: "打开",
walletQrLogin: "扫码登录",
walletMobileQrDesc: "适合用另一台设备扫描二维码登录当前浏览器。",
walletTokenPocketQr: "TokenPocket 扫码登录",
walletTokenPocketQrDesc:
"推荐中国用户使用。用 TokenPocket 扫码签名后,会回到当前浏览器完成登录。",
@@ -202,6 +205,13 @@ export const zhDict: Dict = {
walletLoginSuccess: "钱包已连接",
walletLoginFailed: "钱包登录失败",
walletDisconnected: "钱包已断开",
walletOtherMethods: "其他登录方式",
walletUseCurrent: "使用当前钱包登录",
walletOpening: "正在打开 {wallet}…",
walletAppNotInstalled: "如果没有跳转,可能是未安装该 App。",
walletDownloadApp: "下载 {wallet}",
walletRetry: "重试",
walletConnecting: "连接中…",
featureUnavailable: "未开放",
featureUnavailableDesc: "该功能暂未开放。",
confirm: "知道了",