Commit Graph

320 Commits

Author SHA1 Message Date
TerryM
ec98ff5a03 fix: align favorites page with post adapter
Some checks failed
Deploy Staging (terry-wallet-login) / deploy (push) Failing after 28s
2026-06-04 17:46:09 +08:00
TerryM
4f6cbbc314 fix: simplify favorites display
Some checks failed
Deploy Staging (terry-wallet-login) / deploy (push) Failing after 38s
2026-06-04 17:25:55 +08:00
TerryM
6471559b3b fix: stabilize favorites page loading 2026-06-04 17:15:14 +08:00
TerryM
efaf92c4e4 fix: limit visible toasts 2026-06-04 17:10:11 +08:00
TerryM
01eab88c0f feat: connect wallet favorites to backend 2026-06-04 17:06:29 +08:00
TerryM
fd19ed438e fix: hide imtoken on desktop wallet login
Some checks failed
Deploy Staging (terry-wallet-login) / deploy (push) Failing after 30s
2026-06-04 15:29:22 +08:00
TerryM
53dc35e7dc fix: restore mobile wallet login feedback
Some checks failed
Deploy Staging (terry-wallet-login) / deploy (push) Failing after 37s
2026-06-04 15:19:50 +08:00
TerryM
863a448ec9 Merge branch 'main' into terry-wallet-login
Some checks failed
Deploy Staging (terry-wallet-login) / deploy (push) Failing after 30s
# Conflicts:
#	src/App.tsx
2026-06-04 12:04:22 +08:00
TerryM
1b52a6d93d feat(routing): shorten language URL prefixes to ISO codes with legacy redirects
All checks were successful
Deploy to Frontend Servers / deploy (push) Successful in 31s
Rename the localized URL prefixes from full English names to short
ISO-style codes:
  /chinese    -> /cn
  /japanese   -> /ja
  /korean     -> /ko
  /vietnamese -> /vi
  /indonesian -> /id
  /malay      -> /ms

Add legacyLanguageRedirects mapping and a LegacyLangRedirect component
in App.tsx so links shared on WeChat (and elsewhere) that still use the
long-form paths keep landing on the right page. The redirect preserves
the sub-path, query string, and hash, e.g.
  /malay/browse?post=42#x -> /ms/browse?post=42#x

Also refresh doc-comment examples in i18n.tsx, FigmaBanner.tsx,
PublicLayout.tsx, and useLocalizedPath.ts so future readers see the new
prefixes.
2026-06-04 12:01:38 +08:00
TerryM
4059ec3f20 feat: confirm desktop wallet address
Some checks failed
Deploy Staging (terry-wallet-login) / deploy (push) Failing after 32s
2026-06-04 11:55:13 +08:00
TerryM
90f27b050c i18n: translate wallet desktop guidance
Some checks failed
Deploy Staging (terry-wallet-login) / deploy (push) Failing after 38s
2026-06-04 11:36:28 +08:00
TerryM
0a86619b6c feat: guide desktop wallet connection 2026-06-04 11:32:59 +08:00
TerryM
ae64f96bbe fix: translate wallet no account error
Some checks failed
Deploy Staging (terry-wallet-login) / deploy (push) Failing after 32s
2026-06-04 11:14:52 +08:00
TerryM
65dee3a37e feat: simplify wallet login options
Some checks failed
Deploy Staging (terry-wallet-login) / deploy (push) Failing after 29s
2026-06-04 10:52:41 +08:00
TerryM
fb904d3a55 fix: restore staging imtoken login behavior
Some checks failed
Deploy Staging (terry-wallet-login) / deploy (push) Failing after 37s
2026-06-04 10:27:31 +08:00
TerryM
355c920c80 chore: remove wallet code comments 2026-06-04 09:55:19 +08:00
TerryM
f8369b6361 fix: auto login inside imtoken browser 2026-06-04 09:46:24 +08:00
TerryM
53eab4a066 fix: restore imtoken direct login path 2026-06-04 09:39:14 +08:00
TerryM
93790cb885 fix: remove wallet verification popup 2026-06-04 09:36:20 +08:00
TerryM
a1b318016f fix: detect imtoken injected provider by browser 2026-06-04 09:31:07 +08:00
TerryM
469e53a860 fix: skip wallet verification gate when logged in 2026-06-04 07:39:17 +08:00
TerryM
8140828c11 style(layout): align mobile drawer spacing with Figma 4164-5336
Drawer top: drop nav pt-2 so the first menu item sits flush with the
drawer top edge per Figma frame 173 (first item y matches drawer y).

Drawer bottom: raise CTA bottom inset from 20px to 34px so the gap
between the 链接钱包 button and the drawer's bottom edge matches the
Figma measurement (Btn Primary bottom y=25041 vs drawer bottom y=25075).
The safe-area-inset env() still wins on devices with a larger inset.
2026-06-04 07:32:30 +08:00
TerryM
526facb261 fix: require signature for tokenpocket direct login 2026-06-04 07:23:05 +08:00
TerryM
57dc25e5eb style(layout): apply Figma drawer translucency with backdrop blur
Figma 4164-5336 frame 173 specifies the drawer body as #14131A at 90%
opacity with a 24px background blur. Switch bg-ark-bg to bg-ark-bg/90
backdrop-blur-xl so the underlying page bleeds through softly rather
than being fully masked.
2026-06-04 07:21:33 +08:00
TerryM
173c283fb8 feat(wallet): swap CTA glyph to Figma 4414-12829 filled wallet icon
Some checks failed
Deploy Staging (terry-wallet-login) / deploy (push) Failing after 33s
The 链接钱包 CTA was using the lucide outline Wallet icon. Replace it
with a local WalletIcon component built from the exact Figma path
(filled body, currentColor fill) so the icon paints in dark on the
yellow CTA, matching Figma's #08070C fill via the button's text-black
utility.
2026-06-03 21:59:38 +08:00
TerryM
39f9cba8c7 feat(layout): full-screen mobile menu drawer matching Figma 4164-5733
Rebuild the mobile hamburger menu as a full-screen drawer that matches
the Figma design 1:1 — five nav items (全部资料 / 资料分类 / 官方推荐 /
最新更新 / 热门资料), transparent item backgrounds over the ark-bg
drawer, hairline dividers at #2B2B37, gold text on the active route,
and the existing WalletButton compact pill as the bottom CTA. Drop the
chevron-right indicators per the rendered Figma frame and remove the
old 收藏 row since it's not in the design.

Also move the drawer JSX out of <header sticky top-0 z-40> and render
it as a sibling at the layout root. The sticky+z-index header was
creating a stacking context that trapped the drawer's z-50 fixed below
the bottom nav at z-40 global, so the drawer never reached the
foreground.

Add the same iOS-safe body scroll lock used for the search overlay so
the underlying page doesn't drift while the drawer is open.
2026-06-03 21:59:31 +08:00
TerryM
2ef26390be feat(stream): bubble footer with timestamp and inline favorite/download
Match the Figma 4206-6509 card layout for /browse: every bubble now
renders a bottom row with the publish timestamp on the left and the
action buttons on the right. Image, album, video, text and link cards
show only the FavoriteButton; file-document cards show the
FavoriteButton plus a new BubbleAttachmentDownloadButton sized to
match. Removes the absolute-positioned favorite from the default
variant, drops the right-aligned timestamp block, and strips the inline
per-row download button from FileDocBubble's default variant since the
download now lives in the footer. The 'latest' masonry variant is
untouched so the home page continues to use LatestFileCard's existing
internal footer.
2026-06-03 21:20:53 +08:00
TerryM
6800a8e9b6 feat(wallet): bypass WalletConnect for TP/imToken on mobile to fix China users
Some checks failed
Deploy Staging (terry-wallet-login) / deploy (push) Failing after 40s
The WalletConnect relay (wss://relay.walletconnect.org) is unreliable/blocked
in mainland China. Every wallet flow (desktop QR, mobile deeplink, mobile QR)
depends on it, so Chinese users see the login button hang forever and the
QR code never appears. When RainbowKit's render fails, the whole site goes
white because nothing catches the error.

Changes:
- Add WalletStackErrorBoundary around <RainbowWalletProvider> + modal so
  RainbowKit init failures no longer blank the entire app.
- Hoist <WalletProvider> above the boundary; it only depends on the injected
  provider, so useWallet keeps working for header / favorites / etc. even
  when the WC stack is dead.
- On mobile, the TP/imToken 'Open Wallet App' button now navigates directly
  to tpdapp://open / imtokenv2://navigate/DappView with an ?autoLogin=<kind>
  query, pulling the site into the wallet's in-app browser without ever
  touching the WC relay. MetaMask still uses the WC path (no equivalent
  deeplink).
- Add AutoInjectedLogin: when the page loads with ?autoLogin=<kind>, wait
  up to 8s for window.ethereum, then connectInjectedWallet + completeLogin.
  Strips the param via history.replaceState to avoid re-firing on reload.
- Guard against the in-app-browser disconnect/reconnect case: if
  getInjectedWallet(kind) is already truthy, skip the deeplink and let
  useWalletConnectLogin's deeplink mode take the injected fast path
  (avoids TP trying to open TP recursively).
2026-06-03 20:07:23 +08:00
TerryM
b4ef5ddb61 Merge branch 'main' into terry-wallet-login
Some checks failed
Deploy Staging (terry-wallet-login) / deploy (push) Failing after 31s
# Conflicts:
#	src/components/messageStream/MessageStream.tsx
2026-06-03 14:42:07 +08:00
TerryM
53614189ce refactor(stream): simplify FilterChips by dropping the 1.5s scroll watcher
All checks were successful
Deploy to Frontend Servers / deploy (push) Successful in 38s
The defensive rAF + scroll loop and its touching guard were added to
fight an iOS sticky-relayout quirk, but the module-level lastScrollLeft
plus the useLayoutEffect mount restore already cover the common case.
The watch loop also interfered with a fresh slide gesture immediately
after a filter tap. Strip it out together with the surrounding inline
comments so the component is the minimum needed: gold active state on
click and a remount-surviving scroll position.
2026-06-03 14:32:47 +08:00
TerryM
f2f2572cd2 feat(stream): surface source filename on official-assets cards
Image, album, and video bubbles in the official-assets category now
render the attachment filename as a bottom-left overlay so editors can
identify the source asset at a glance. Shared AttachmentFilenameLabel
component mirrors the AttachmentDownloadPill style, uses
filenameWithExtension so MIME-only attachments still get a sensible
label, and is pointer-events-none so it never blocks the bubble's tap
target.
2026-06-03 14:30:34 +08:00
TerryM
f7c0c0387e fix(stream): preserve FilterChips horizontal scroll across remount
PublicLayout wraps the routed page in <AnimatePresence> keyed by
pathname+search, so changing ?type=… fully unmounts the page and creates
a fresh FilterChips. A useRef-based save/restore therefore reset on
every filter switch. Persist the scrollLeft in a module-level value
that survives the unmount, restore synchronously on mount, and keep an
~1.5s post-mount watch window for the iOS Safari sticky relayout that
asynchronously snaps scrollLeft back to 0. Also gate the inactive-chip
hover color behind [@media(hover:hover)] so iOS sticky-hover no longer
leaves a faint gold tint on the last-tapped filter.
2026-06-03 14:30:27 +08:00
TerryM
fc19b92158 fix(layout): align /category main padding with /browse
Both routes render the same MessageStream; the layout wrapper used to inset
/category by px-4 / sm:px-6 on mobile while /browse stayed edge-to-edge,
shrinking bubble width and making the category waterfall feel narrower
than the all-resources page.
2026-06-03 14:30:20 +08:00
TerryM
724bfb8f24 fix(home): match Figma media pills for latest cards
Some checks failed
Deploy Staging (terry-wallet-login) / deploy (push) Failing after 37s
- Align latest-update media size pills to the Figma spec: 72x24 pill, black background, 24px gray icon cell, 10px label, and the exact small Figma cloud-download SVG.
- For non-document latest cards, remove the duplicate footer download action so media cards only show per-media size/download pills plus the bookmark action, matching the Figma non-document card design.
- Keep card heights flexible so content determines the final card height instead of locking to design mock heights.
2026-06-03 08:33:29 +08:00
TerryM
be638e32c9 feat(home): align desktop cards with Figma actions
- Update desktop header actions to match Figma: remove the standalone desktop favorites button and style the wallet connect pill with the wallet icon while allowing localized labels to expand.
- Replace favorite action with the Figma bookmark SVG and hover state; replace download cloud with the provided Figma SVG.
- Align official recommendation cards with the Figma card structure, colors, and bottom action row.
- Rework popular rows to the Figma desktop rhythm with 90px rows, wide thumbnails, rank area, and right-side action buttons.
- Add a dedicated desktop LatestUpdateCard for Figma-style latest-update masonry cards with flexible text-driven heights instead of fixed card heights.
2026-06-03 08:18:05 +08:00
TerryM
4f0d8925a4 style(popular): drop static border on rank row to match figma spec 2026-06-03 08:13:55 +08:00
TerryM
7e4be0a590 style(home): set recommended card background to #1D1E23 per figma spec 2026-06-03 08:11:48 +08:00
TerryM
a2f6c4fc35 style(home): align popular rank row and recommended card with figma
- PopularRankList: switch row to 90px Figma layout (246x90 cover, gap 24/12, pill px-3 py-1, meta color #9FA0A8, object-cover image)
- RecommendedCard: unify card and cover background to #272632
2026-06-03 08:08:28 +08:00
TerryM
49380dc5ed ci(staging): revert act cache wipe, keep other aggressive cleanup
Some checks failed
Deploy Staging (terry-wallet-login) / deploy (push) Failing after 46s
Previous attempt deleted the in-flight act workspace and broke
actions/checkout. Restore the safe >60min sweep for ~/.cache/act
while keeping npm/docker/tmp/log cleanup aggressive.
2026-06-03 02:18:29 +08:00
TerryM
42b25b9e09 ci(staging): aggressive disk cleanup to prevent ENOSPC during npm ci
Some checks failed
Deploy Staging (terry-wallet-login) / deploy (push) Failing after 2s
- wipe all stale act workspaces (keep only current run's dir)
- clear ~/.npm/_cacache and setup-node cache fully
- docker system prune -af --volumes
- apt/yum cache clean, journald vacuum to 100M
- /tmp older than 30min instead of 120min
2026-06-03 02:11:26 +08:00
TerryM
966663f3d7 ci: add staging deploy workflow for terry-wallet-login
Some checks failed
Deploy Staging (terry-wallet-login) / deploy (push) Failing after 24s
- trigger on push to terry-wallet-login
- deploys to staging server via STAGING_* secrets
- rsync to /var/www/ark-library-staging/, sha256 verify
2026-06-03 01:57:56 +08:00
TerryM
985463b7da fix(stream): resolve search deep-links without pagination stall
All checks were successful
Deploy to Frontend Servers / deploy (push) Successful in 37s
Search results can link to older posts that are not present in the first
/browse page. The previous deep-link flow kept paginating the all-assets
stream until the target id appeared, leaving users stuck on the waiting
indicator for very old posts.

Fetch /api/posts/:id directly for ?post= arrivals and inject the resolved
target post at the top of the stream when it is not already in loaded
items. The normal paginated feed still loads below for context. Keep the
explicit finding/not-found status messages as a fallback for slow or
missing direct fetches.

Verified with search result c5eeb17d-3bd0-4d32-9c92-5efa6e4a015c: target
post rendered within 100ms instead of waiting for pagination. Checks:
tsc, format:check, tests, build.
2026-06-03 01:40:21 +08:00
TerryM
a68dd8f616 fix(wallet): complete desktop qr login after approval 2026-06-03 00:25:46 +08:00
TerryM
6552b92c50 fix(wallet): restore metamask mobile login 2026-06-03 00:12:50 +08:00
TerryM
b19486e908 Merge branch 'main' of https://repo.skywalker-rs.com/terry/Arkie-Library-Frontend into terry-wallet-login 2026-06-03 00:05:58 +08:00
TerryM
0326cb2998 fix: limit latest updates preview to nine
All checks were successful
Deploy to Frontend Servers / deploy (push) Successful in 26s
2026-06-02 23:52:49 +08:00
TerryM
2955ba1039 fix: balance latest updates desktop columns
All checks were successful
Deploy to Frontend Servers / deploy (push) Successful in 37s
2026-06-02 23:51:14 +08:00
TerryM
cd85a4bcfa fix(wallet): improve imtoken mobile login fallback 2026-06-02 23:32:39 +08:00
TerryM
a8863c5478 Merge remote-tracking branch 'origin/main' into terry-wallet-login 2026-06-02 22:23:53 +08:00
TerryM
3c72917bf9 fix: preserve localized view all routes
All checks were successful
Deploy to Frontend Servers / deploy (push) Successful in 37s
2026-06-02 22:23:07 +08:00