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:
@@ -1,4 +1,10 @@
|
||||
import { ChevronDown, Menu, Search as SearchIcon, X } from "lucide-react";
|
||||
import {
|
||||
ChevronDown,
|
||||
Heart,
|
||||
Menu,
|
||||
Search as SearchIcon,
|
||||
X,
|
||||
} from "lucide-react";
|
||||
import { AnimatePresence, m } from "framer-motion";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { Link, useLocation, useNavigate, useOutlet } from "react-router-dom";
|
||||
@@ -637,6 +643,19 @@ export function PublicLayout() {
|
||||
</nav>
|
||||
|
||||
<div className="flex min-w-0 flex-1 items-center justify-end gap-2 min-[1000px]:flex-none">
|
||||
<Link
|
||||
to={lp("/favorites")}
|
||||
aria-label={t("favorites")}
|
||||
title={t("favorites")}
|
||||
aria-current={na("favorites") ? "page" : undefined}
|
||||
className={`hidden h-10 w-10 shrink-0 items-center justify-center rounded-full border bg-[#1a1b20] outline-none transition hover:border-ark-gold/50 hover:text-ark-gold focus-visible:ring-2 focus-visible:ring-ark-gold/80 focus-visible:ring-offset-2 focus-visible:ring-offset-ark-bg md:inline-flex ${
|
||||
na("favorites")
|
||||
? "border-ark-gold/70 text-ark-gold"
|
||||
: "border-ark-line text-neutral-200"
|
||||
}`}
|
||||
>
|
||||
<Heart size={18} strokeWidth={2} />
|
||||
</Link>
|
||||
<div ref={desktopSearchRef} className="hidden md:block">
|
||||
<button
|
||||
type="button"
|
||||
@@ -722,6 +741,15 @@ export function PublicLayout() {
|
||||
>
|
||||
{t("popular")}
|
||||
</Link>
|
||||
<Link
|
||||
to={lp("/favorites")}
|
||||
className={`${mobileMenuNavClassName(na("favorites"))} flex items-center gap-2`}
|
||||
aria-current={na("favorites") ? "page" : undefined}
|
||||
onClick={() => setOpen(false)}
|
||||
>
|
||||
<Heart size={16} strokeWidth={2} />
|
||||
{t("favorites")}
|
||||
</Link>
|
||||
<div className="mt-2 w-full max-w-xs">
|
||||
<WalletButton compact onOpenLogin={() => setOpen(false)} />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user