Commit Graph

358 Commits

Author SHA1 Message Date
TerryM
e752de67e1 fix(banner): preserve active language when navigating to post links
Banner linkUrls come back from the API as unprefixed paths
(e.g. /browse?post=123). Navigating to them directly dropped non-English
viewers into the English version of the post. Localize both the rendered
href and the SPA navigate target via stripLangPrefix + localizePath.
2026-06-02 11:12:26 +08:00
TerryM
8b0ee18cd8 fix: seed home categories from cache to stop icon flicker
All checks were successful
Deploy to Frontend Servers / deploy (push) Successful in 29s
Initialize the categories state from the cached response on first render so the
category icons stay visible when navigating back to the home page, instead of
flashing empty for a frame.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 11:05:59 +08:00
TerryM
d3e562663d fix: cap banner dot indicator at 10 to avoid mobile overflow
All checks were successful
Deploy to Frontend Servers / deploy (push) Successful in 40s
With many banners the pagination dots overflowed the phone width. Show at most
10 dots in a window that follows the active slide; each dot still maps to its
real slide index.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 11:01:15 +08:00
TerryM
92210cf0a2 fix(lightbox): extend save hint display to 2.5s 2026-06-02 10:52:08 +08:00
TerryM
6c0c3b89a9 fix(lightbox): anchor save hint below rendered image
Measure the image's rendered bottom edge with refs + ResizeObserver and
position the long-press save hint relative to it instead of pinning to
screen center or stage bottom. Enlarges the toast for mobile legibility
and clamps the offset so tall portrait images don't push it offscreen.
2026-06-02 10:51:17 +08:00
TerryM
8acb3a281b fix: opt out of browser auto-translation
The app ships its own 7-language i18n and serves localized content, but mobile
browsers (Google Translate) were auto-translating the Chinese UI into broken
English (brand, nav, language dropdown). Add translate="no" + the Google
notranslate meta, and keep the attribute set on language changes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 10:47:36 +08:00
TerryM
4e33c7deef docs: add wallet/favorites UI redesign requirements brief
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 10:42:57 +08:00
TerryM
e1b24aa0f9 fix: keep desktop browser-wallet on direct injected; add login diagnostics
Revert desktop primary back to the direct injected sign (no WalletConnect relay,
which could spin forever) — reliable for a BNB-chain extension. Add console
diagnostics ([wallet-login] ...) and provider enumeration so a stuck/no-popup
flow can be pinpointed. WalletConnect stays as the explicit mobile MetaMask/
imToken option.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 10:38:29 +08:00
TerryM
11599e54ea fix: use RainbowKit picker for desktop browser-wallet login
Raw window.ethereum is unreliable when several extensions contend for it, so
desktop now opens the RainbowKit connect modal (EIP-6963 wallet discovery +
WalletConnect QR) when a project id is configured, falling back to the injected
flow otherwise. In-wallet mobile browsers keep the direct injected sign.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 10:33:59 +08:00
TerryM
8821058c0a fix: reset TokenPocket request state on expired/failed poll
Clear tpRequest when a TokenPocket login expires or fails so the mobile UI
returns to the initial state instead of showing a stuck waiting spinner
alongside the error.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 04:30:27 +08:00
TerryM
ed04e1fb7e fix: TokenPocket mobile deep-link login, desktop empty-state, toast above modal
- Mobile TokenPocket now opens the tpoutside:// sign deep link and returns to
  the original browser to finish login (no wallet in-app browser); desktop
  keeps the QR. Fixes mobile login + logout being trapped in TP's browser.
- Desktop without an injected wallet shows a clear message instead of a dead
  button; TokenPocket login card is always available as a working path.
- Raise toast z-index above the login modal so feedback is visible.
- Add native TokenPocket-login strings across 7 locales.
- Document that the live backend lacks favorites + TokenPocket routes (404),
  the real blocker for those features in production.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 04:00:30 +08:00
TerryM
7abe4a868c 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>
2026-06-02 03:43:13 +08:00
TerryM
f935f122f9 docs: design wallet login + favorites redesign and backend checklist
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 03:20:06 +08:00
TerryM
0edcc80513 fix: simplify wallet choices and use bnb chain 2026-06-02 02:58:01 +08:00
TerryM
b9fe7ff168 fix: batch favorite status checks 2026-06-02 01:11:00 +08:00
TerryM
fb6cb5bc11 fix: encode metamask dapp deep link 2026-06-02 01:06:55 +08:00
TerryM
184193e655 docs: note wallet session tradeoffs 2026-06-02 01:00:13 +08:00
TerryM
fc2ca62957 fix: clean up wallet favorites state 2026-06-02 00:57:37 +08:00
TerryM
05c2252b49 fix: close mobile menu before wallet login 2026-06-02 00:45:58 +08:00
TerryM
4900256423 feat: add favorites to latest rows 2026-06-02 00:41:06 +08:00
TerryM
de93e883c9 feat: build favorites page 2026-06-02 00:39:36 +08:00
TerryM
337e8f7e67 feat: add favorites state and buttons 2026-06-02 00:36:11 +08:00
TerryM
43700d9fdc feat: add wallet login modal 2026-06-02 00:32:46 +08:00
TerryM
71dac8373e feat: add wallet provider foundation 2026-06-02 00:28:22 +08:00
TerryM
df20005357 docs: design user favorites 2026-06-02 00:14:10 +08:00
TerryM
b265a57541 docs: design china-friendly wallet login 2026-06-02 00:05:37 +08:00
TerryM
5a5acfcbc2 fix: show save guide on mobile only
All checks were successful
Deploy to Frontend Servers / deploy (push) Successful in 27s
2026-06-01 23:13:25 +08:00
TerryM
097c12bab5 copy: polish save album guide
All checks were successful
Deploy to Frontend Servers / deploy (push) Successful in 36s
2026-06-01 23:09:25 +08:00
TerryM
e096d59fa6 feat: add media save guide 2026-06-01 23:00:28 +08:00
TerryM
7b48f9780c fix: use backend video preview urls
All checks were successful
Deploy to Frontend Servers / deploy (push) Successful in 37s
2026-06-01 17:52:33 +08:00
TerryM
b4eb44f824 Merge terry-staging into main
All checks were successful
Deploy to Frontend Servers / deploy (push) Successful in 37s
2026-06-01 16:56:51 +08:00
TerryM
56d6bd033d fix: sync language prefixes 2026-06-01 16:36:55 +08:00
TerryM
da4c13f304 fix: preserve localized redirects 2026-06-01 16:36:36 +08:00
TerryM
a968f47640 feat: support mobile video previews 2026-06-01 16:35:40 +08:00
TerryM
c53032155b feat(i18n): add full ja/vi/id/ms translations and drop languageNames fallback
- Add complete dicts: src/locales/{ja,vi,id,ms}.ts (115 keys each)
- Remove languageNames override map; dict object now points directly to each locale
- i18n.tsx shrinks from ~414 lines to ~81 lines
2026-06-01 15:54:29 +08:00
TerryM
337d19e626 feat(i18n): split locale dicts into src/locales/ and add full Korean translation
- Extract zhDict/enDict from i18n.tsx into src/locales/{zh-CN,en}.ts
- Add full Korean dictionary (src/locales/ko.ts) covering all 115 UI keys
- Update formatBytes test/impl boundary for 1000-based units
2026-06-01 15:49:15 +08:00
TerryM
c490524575 fix: widen desktop header brand max-width to fit longer translations 2026-06-01 15:42:00 +08:00
TerryM
c32ae539f6 fix: use decimal (1000-based) units in formatBytes to match S3/curl display 2026-06-01 15:24:41 +08:00
TerryM
4dcf68bc71 Merge terry-staging into main
All checks were successful
Deploy to Frontend Servers / deploy (push) Successful in 36s
2026-06-01 15:11:53 +08:00
TerryM
fa78568c94 feat: add localized home routes 2026-06-01 15:09:58 +08:00
TerryM
6c4936fea3 Merge terry-staging into main
All checks were successful
Deploy to Frontend Servers / deploy (push) Successful in 26s
2026-05-31 19:24:26 +08:00
TerryM
9b08379d50 fix: 2-column masonry at md with side padding, 3 at lg
- md (768-1023px): 2 columns with px-4 so cards don't kiss the screen edge.
- lg+ (>=1024px): 3 columns, parent wrapper provides spacing.
- <768px stays on the original single-column mobile branch.
2026-05-31 19:24:18 +08:00
TerryM
04badc26d1 Merge terry-staging into main
All checks were successful
Deploy to Frontend Servers / deploy (push) Successful in 26s
2026-05-31 18:41:02 +08:00
TerryM
186ba362f3 fix: align banner width with 3-column latest section 2026-05-31 18:40:27 +08:00
d0302218b2 Merge pull request 'terry-staging' (#14) from terry-staging into main
All checks were successful
Deploy to Frontend Servers / deploy (push) Successful in 35s
Reviewed-on: #14
2026-05-31 10:36:12 +00:00
TerryM
06fe117ebc feat: render desktop latest section as 3-column masonry
- Matches Figma design (file uHDZkVHjAp7BXDKQKB0PM4, node 4367-11405).
- Mobile keeps the existing 5-post single column unchanged.
- Desktop (md+) renders all 12 latest posts in a CSS-columns masonry
  with break-inside-avoid so each card's height stays content-driven.
- Adds an optional 'fluid' prop to MessageBubble that drops the
  standalone-feed max-widths so bubbles fill the masonry column. The
  /browse stream keeps the default non-fluid widths.
2026-05-31 18:35:57 +08:00
TerryM
34ef6cba15 fix: ensure minimum horizontal padding on desktop header at all viewports 2026-05-31 18:35:20 +08:00
TerryM
c7e0562d9a feat: desktop banner peek with framer-motion blur
Match Figma node 4366-11092 desktop banner design:
- Slides shrink to 78%/72%/60% width on md/lg/xl with snap-center,
  first/last get matching left/right margin so the edges still center.
- Each slide is wrapped in a framer-motion m.div that animates filter,
  opacity, and scale between active and idle states.
- goTo and scroll/drag handlers use the slide's real offsetWidth so
  centering math holds at every breakpoint; mobile (full-width, snap-start
  visual) is unchanged.
2026-05-31 18:22:03 +08:00
TerryM
5faa18d343 fix: make desktop search a button and keep nav down to 1000px
All checks were successful
Deploy to Frontend Servers / deploy (push) Successful in 26s
- Replace the desktop header search field with a search icon button that
  opens the search panel on click (matching mobile), so there is one search
  input (in the panel) instead of a redundant header field, and the trigger
  no longer vanishes when the panel opens.
- Lower the nav collapse breakpoint from 1100px to 1000px so the full menu
  stays visible on smaller desktop widths before falling back to the
  hamburger menu.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-31 03:36:54 +08:00
TerryM
c71ebba807 fix: simplify desktop search panel
All checks were successful
Deploy to Frontend Servers / deploy (push) Successful in 25s
2026-05-31 03:21:23 +08:00