Feat/share countdown#10
Merged
Merged
Conversation
Translations are fetched client-side and were cached with a StaleWhileRevalidate service-worker strategy, so the first visit after a deploy served the previous translation.json (missing newly added keys such as monthlyWorkingDays) until a second load or a cache clear. - Switch /locales/ SW caching from StaleWhileRevalidate to NetworkFirst (fresh when online, cached fallback when offline) - Inject a per-deploy NEXT_PUBLIC_BUILD_ID (Vercel commit SHA, else a build-time timestamp) and append it as ?v=<buildId> to locale fetches, busting HTTP/CDN caches once per deploy while staying cacheable and offline-capable within a deploy Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
After starting the countdown, users can share "how long until off work" as text or a polished image to promote the site. - Share dialog (image / text tabs) opened from the countdown view - Mood emoji picker (8 moods); each mood drives the share image's gradient - Canvas-generated image (square 1080² + story 1080×1920, 2x DPR) with the countdown, mood emoji, progress bar, site logo, QR code and URL - Text share with the site URL; all share links carry UTM params for attribution in analytics - One-click platform intents: X, Facebook, WhatsApp, Telegram, LINE, Reddit, Weibo. Native Web Share (with image file) on mobile, plus download / copy image / copy text on desktop - Share content never includes salary/earnings (component receives only timeLeft/progress); image regenerates on mood/format change, not per tick - Fixed-height preview keeps the old image during regeneration so switching mood/format never shifts the layout - Lazy-loaded dialog (qrcode + canvas) keeps initial bundle unchanged - New i18n keys across all 19 locales; unit tests for share/mood helpers Also fixes a pre-existing dark-mode bug: `body` used `color: var(--foreground)` without the `hsl()` wrapper, making the raw HSL triplet an invalid color that fell back to black. Inherited-color UI (the dialog) rendered black text in dark mode; now wrapped in hsl(). Dialog content also gets text-foreground and overscroll-contain (prevents overscroll bleed-through on iOS). Deps: qrcode, @radix-ui/react-dialog. Adds vitest.config.ts for the "@" alias. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.