91c85e196a
- reactions.ts pure fns: delta->hearts sampling, burstId dedupe (TTL/capacity), pending-visible cache (5s/50), 250ms emission throttle with merge - useEmbedReactions: read-only RealtimeClient subscription on album.publicToken (no viewer-page side effects, A15), rebind teardown, 10s grace disconnect, no fake bubbles on WS failure - ReactionLayer: demo-frozen heart effect (12/16/20 sizes, two colors, 110px rise, 1.6s ease-out, 300ms stagger, max 8, drop-shadow) in unscoped block (created elements lack scoped hash) - demo alignment: initial offset 32px, decode+500ms startup gate, 1:1 drag, arrows +-40, focus-tip, bidirectional manual scroll (manualScroll), loader handle 100x44 exact styles, <=599px offset default 12 - tests: +8 reactions unit (244 viewer), e2e E05: real cross-context like -> heart on correct photo (EMB-A09), zero likes/visits submission (EMB-A15), 16s hearts recording Co-Authored-By: Claude Code <noreply@anthropic.com>
122 lines
4.4 KiB
TypeScript
122 lines
4.4 KiB
TypeScript
export default {
|
|
app: { title: 'Live Gallery' },
|
|
home: { hint: 'Open an album link to start viewing' },
|
|
album: {
|
|
loading: 'Loading…',
|
|
loadingMore: 'Loading more…',
|
|
emptyNotice: 'Photos coming soon',
|
|
time: 'Time',
|
|
venue: 'Venue',
|
|
views: 'Views',
|
|
categories: 'Categories',
|
|
all: 'All',
|
|
sortLabel: 'Sort',
|
|
sortLatest: 'Latest',
|
|
sortHot: 'Popular',
|
|
end: 'You have reached the end',
|
|
newPhotos: 'New photos — tap to refresh',
|
|
retry: 'Retry',
|
|
},
|
|
lang: { switch: 'Switch language' },
|
|
prefs: { reduceMotion: 'Reduce motion' },
|
|
// Embed carousel iframe page (P4b Task 4): subset driven by the lang query.
|
|
embed: {
|
|
comingSoon: 'Photos coming soon',
|
|
openPhoto: 'Open photo',
|
|
close: 'Collapse widget',
|
|
widgetTitle: 'Event photos',
|
|
carouselLabel: 'Photo carousel',
|
|
slideOf: 'Photo {n} of {m}',
|
|
photoAlt: 'Event photo {n}',
|
|
viewAlbum: 'View album',
|
|
pause: 'Pause carousel',
|
|
play: 'Play carousel',
|
|
prev: 'Previous photo',
|
|
next: 'Next photo',
|
|
// UI-04 v2 vertical photo stream window
|
|
streamLabel: 'Event photo window',
|
|
collapseWindow: 'Collapse photo window',
|
|
streamPaused: 'Photo scrolling paused',
|
|
streamResumed: 'Photo scrolling resumed',
|
|
streamKeyHint: 'Space pause · ↑↓ scroll · Esc collapse',
|
|
},
|
|
download: {
|
|
action: 'Download photo',
|
|
original: 'Download original',
|
|
options: 'Download options',
|
|
busy: 'Preparing…',
|
|
failed: 'Download failed, please try again',
|
|
// WeChat in-app browser guidance (no programmatic download): long-press save + copy link.
|
|
wechatTitle: 'How to save this photo',
|
|
wechatHint: 'Pages opened inside WeChat cannot download directly. Long-press the photo above to save it, or copy the link and open it in a browser to download.',
|
|
copyLink: 'Copy link',
|
|
copied: 'Link copied',
|
|
copyFailed: 'Copy failed — long-press to select the link below',
|
|
dismiss: 'Got it',
|
|
},
|
|
viewer: {
|
|
title: 'Photo viewer',
|
|
close: 'Close',
|
|
previous: 'Previous photo',
|
|
next: 'Next photo',
|
|
counter: '{current} / {total}',
|
|
like: 'Like',
|
|
likeCount: '{count} likes',
|
|
bubbleOpen: 'Open the liked photo',
|
|
loadFailed: 'Failed to load image',
|
|
// PHOTO_NOT_PUBLIC 专用:not found / unpublished / hidden share one code (anti-enumeration).
|
|
photoUnavailable: 'Photo not found or unavailable',
|
|
// 轮播中被移除(ws photo.hidden)的轻提示。
|
|
photoRemoved: 'This photo has been removed',
|
|
backToAlbum: 'Back to album',
|
|
// —— UI-02 (V01/V02) additions ——
|
|
brand: 'PhotoLive',
|
|
settings: 'Settings',
|
|
share: 'Share',
|
|
shareCopied: 'Link copied',
|
|
shareCopyFailed: 'Copy failed — please copy the link manually:',
|
|
views: '{count} views',
|
|
viewsUnknown: '—',
|
|
readMore: 'More',
|
|
readLess: 'Less',
|
|
latest: 'Latest',
|
|
popular: 'Popular',
|
|
allCategories: 'All',
|
|
noPhotos: 'Photos coming soon',
|
|
newPhotos: 'New photos',
|
|
reduceMotion: 'Reduce motion',
|
|
// —— UI-02 (V04 dark immersive viewer) additions ——
|
|
photoViewer: 'Photo viewer',
|
|
photoPreview: 'Photo preview',
|
|
loadedCount: '{count} loaded',
|
|
tapMore: 'Tap to send more love',
|
|
download: 'Download',
|
|
downloadBrowse: 'Browse',
|
|
downloadOriginal: 'Original',
|
|
more: 'More options',
|
|
thumbnails: 'Thumbnail navigation',
|
|
thumbItem: 'Photo {n}',
|
|
// —— UI-02 (V05 interaction particles / share) additions ——
|
|
photoLiked: '+{delta}',
|
|
sharePhoto: 'Share photo',
|
|
shareAlbum: 'Share album',
|
|
},
|
|
route: { tokenLabel: 'Album token', photoLabel: 'Photo' },
|
|
errors: {
|
|
albumNotFound: 'Album not found',
|
|
// ALBUM_NOT_PUBLIC 专用:offline / disabled / ghost token 同码(防枚举)。
|
|
albumNotAvailable: 'Album not found or offline',
|
|
photoNotFound: 'Photo not found',
|
|
notFound: 'Page not found',
|
|
authExpired: 'Session expired',
|
|
forbidden: 'Access denied',
|
|
rateLimited: 'Too many requests, please try again later',
|
|
validationFailed: 'Invalid request',
|
|
internal: 'Service temporarily unavailable, please try again later',
|
|
unknown: 'Something went wrong, please try again later',
|
|
network: 'Network error, please check your connection',
|
|
// DOWNLOAD_DISABLED (P4a two-tier download switches): visible but not downloadable.
|
|
downloadDisabled: 'Downloads are not enabled for this album',
|
|
},
|
|
};
|