Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.
JavaScript aianthropiccross-platformgeminigroqlinuxmacosnvidiaopen-sourceopenaiparakeetspeech-to-texttranscribewhisperwindows
style(calendar): sunny touch-grass scene and a shorter empty day card (#2448)
voidb617f4e3698e
diff --git a/src/components/TouchGrass.tsx b/src/components/TouchGrass.tsxindex 870fdf1eb..c94c0f720 100644--- a/src/components/TouchGrass.tsx+++ b/src/components/TouchGrass.tsx@@ -5,15 +5,16 @@ import type { GrassRustle } from "../utils/grassRustle";import "../styles/touch-grass.css";// The lawn is one flat field from the bottom of the scene to the horizon, drawn as a-// grid of patches: rows by depth, a few columns across. Only the patches animate-// (growth, breeze), so the GPU moves about a hundred textures a frame; the tufts-// inside them are painted once, and repainted only while the hand parts them.+// grid of patches: rows by depth, a few columns across. Besides the opening fades and+// the gust sheen, only the patches animate (growth, breeze), so the GPU moves about a+// hundred textures a frame; the tufts inside them are painted once, and repainted only+// while the hand parts them.const HORIZON = 48; // % of the scene from the bottomconst ROWS = 16;const SEGMENTS = 6;// When the breeze starts, just after the lawn has grown; each column then joins a// little after the one to its left, so gusts roll across the lawn.-const WAVE_START_S = 3;+const WAVE_START_S = 3.75;const WAVE_CROSSING_S = 1.2;// Tufts part within this distance of the hand, fading to nothing at the edge.const PART_RADIUS_PX = 64;@@ -128,8 +129,8 @@ function makePatches(sceneHeight: number): Patch[] {height: Math.max(...tufts.map((tuft) => tuft.h)),// Negative skew pushes the tips right, with the gusts rolling left to right.amp: -(5 + rand() * 4),- growDelay: depth * 0.5 + rand() * 0.8,- growDur: 1.5 + rand() * 0.5,+ growDelay: depth * 0.6 + rand(),+ growDur: 1.9 + rand() * 0.6,// Close periods keep the wave coherent; the small spread lets it drift so the// patches never lock into step.swayDur: 3.4 + rand() * 0.8,@@ -347,7 +348,7 @@ export default function TouchGrass({ rustle, height, label, onExit }: TouchGrassaria-label={label}tabIndex={0}className={cn(- "touch-grass -mx-2 rounded-t-xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/40",+ "touch-grass -mx-2 rounded-t-xl focus-visible:outline-none",resting && "touch-grass--resting")}style={{ height: height || undefined }}diff --git a/src/components/UpcomingMeetings.tsx b/src/components/UpcomingMeetings.tsxindex 0b82d5b23..68001d610 100644--- a/src/components/UpcomingMeetings.tsx+++ b/src/components/UpcomingMeetings.tsx@@ -317,17 +317,20 @@ function DayCard({ group, isNowFn }: { group: DayGroup; isNowFn: (e: CalendarEveonExit={leaveGrass}/>) : group.items.length === 0 ? (- <div ref={emptyStateRef} className="flex flex-col items-center px-1 py-5 text-center">+ <div ref={emptyStateRef} className="flex flex-col items-center px-1 py-4 text-center">+ {/* The artwork is drawn in the middle third of its height; the negative margin+ trims most of the empty space above and below it, so the card stays short. */}<ThemedEmptyIllustrationlight={calendarEmptyLight}dark={calendarEmptyDark}width={316}height={120}+ className="-my-8"/>- <p className="mt-3 text-[15px] font-medium text-foreground">+ <p className="mt-2 text-[15px] font-medium text-foreground">{t("upcoming.noEventsToday")}</p>- <p className="mt-1.5 text-[13px] text-muted-foreground">+ <p className="mt-1 text-[13px] text-muted-foreground">{t("upcoming.emptyDayDescription")}</p><Button@@ -335,7 +338,7 @@ function DayCard({ group, isNowFn }: { group: DayGroup; isNowFn: (e: CalendarEvevariant="ghost"onClick={touchGrass}className={cn(- "mt-5",+ "mt-3",DAY_CARD_BUTTON_CLASS,"h-9 rounded-full px-5 text-primary hover:text-primary dark:text-primary")}diff --git a/src/styles/touch-grass.css b/src/styles/touch-grass.cssindex f32e71ee4..0c169bbb0 100644--- a/src/styles/touch-grass.css+++ b/src/styles/touch-grass.css@@ -1,18 +1,18 @@-/* "Touch grass" scene on the empty day card (TouchGrass.tsx). CSS only: a flat, dark- olive field from the bottom of the scene to the horizon, which grows in over bare- soil, covered by rows of curved blades in perspective. Every animation runs on- transform properties, so the compositor carries the breeze; JS only re-leans the- tufts near the hand. */+/* "Touch grass" scene on the empty day card (TouchGrass.tsx). CSS only: a flat, sunny+ green field from the bottom of the scene to the horizon, which grows in over bare+ soil, covered by rows of curved blades in perspective, under a blue sky. Every+ animation runs on transform or opacity, so the compositor carries the breeze; JS+ only re-leans the tufts near the hand. */.touch-grass {/* Grass grain: fractal noise stretched vertically so it reads as blades. Rendered oncefrom these inline SVGs, then only composited. */- --grain-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='90'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9 0.12' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.07 0 0 0 0 0.1 0 0 0 0 0.02 0 0 0 1.2 -0.4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");- --grain-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='90'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9 0.12' numOctaves='3' seed='13' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.78 0 0 0 0 0.84 0 0 0 0 0.52 0.9 0 0 0 -0.5'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");+ --grain-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='90'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9 0.12' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.12 0 0 0 0 0.3 0 0 0 0 0.06 0 0 0 1.2 -0.4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");+ --grain-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='90'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9 0.12' numOctaves='3' seed='13' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.9 0 0 0 0 0.96 0 0 0 0 0.6 0.9 0 0 0 -0.5'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");position: relative;overflow: hidden;- min-height: 12rem;+ min-height: 10rem;cursor: grab;touch-action: none;user-select: none;@@ -22,6 +22,27 @@cursor: grabbing;}+/* A clear blue sky fades in behind the lawn, palest in the haze at the horizon (52%+ down, HORIZON in TouchGrass.tsx). */+.touch-grass::before {+ content: "";+ position: absolute;+ inset: 0;+ background: linear-gradient(#4fa8ee, #8ccbf5 30%, #cdebfb 52%);+ animation: touch-grass-fade-in 1.6s ease-out backwards;+}++/* The keyboard focus ring, drawn over the sky and the lawn: a ring on the scene itself+ would paint under them. White, since the app's blue ring vanishes against both.+ Rounded at the bottom too, where the day card's corners clip the scene. */+.touch-grass:focus-visible::after {+ content: "";+ position: absolute;+ inset: 0;+ border-radius: var(--radius-xl);+ box-shadow: inset 0 0 0 2px rgb(255 255 255);+}+/* The field starts as bare soil; the turf fades in over it. */.touch-grass__ground {position: absolute;@@ -29,26 +50,26 @@right: 0;bottom: 0;pointer-events: none;- background: linear-gradient(#3e3325, #2a2219);+ background: linear-gradient(#6e5434, #54402a);}-/* Dark olive turf under the blades: hazier and lighter at the horizon, darkest in the- shadowed gaps at the front, with a fine grain and a few pale glints. */+/* Fresh green turf under the blades: hazier and lighter at the horizon, deepest in the+ shadowed gaps at the front, with a fine grain and a few sunlit glints. */.touch-grass__ground::after {content: "";position: absolute;inset: 0;background:- linear-gradient(to bottom, rgb(206 214 160 / 0.22), transparent 10%),+ linear-gradient(to bottom, rgb(236 248 180 / 0.3), transparent 10%),var(--grain-light) 0 0 / 120px 40px,var(--grain-dark) 0 0 / 150px 60px,- linear-gradient(to bottom, #56682a, #3a4a17 28%, #212b0b);- animation: touch-grass-cover 2.4s ease-out 0.1s backwards;+ linear-gradient(to bottom, #9bd552, #6db336 28%, #3f8a22);+ animation: touch-grass-fade-in 3s ease-out 0.1s backwards;}/* A patch is a row segment of the lawn, anchored on its row's baseline. Patches (and- the gust sheen) are the only animated layers here: a patch grows from the ground and- bends in the breeze with skewX, which moves the tips while the roots stay put. */+ the gust sheen) carry the motion: a patch grows from the ground and bends in the+ breeze with skewX, which moves the tips while the roots stay put. */.touch-grass__patch {position: absolute;transform-origin: 50% 100%;@@ -59,7 +80,8 @@}/* The light a gust throws across the lawn as it bends the blades, sweeping left to- right. One layer moved by transform, so it costs the compositor next to nothing. */+ right from when the breeze starts (WAVE_START_S in TouchGrass.tsx). One layer moved+ by transform, so it costs the compositor next to nothing. */.touch-grass__gust {position: absolute;left: 0;@@ -69,13 +91,13 @@background: linear-gradient(115deg,transparent 10%,- rgb(214 224 160 / 0.05) 38%,- rgb(214 224 160 / 0.08) 50%,- rgb(214 224 160 / 0.05) 62%,+ rgb(246 252 200 / 0.08) 38%,+ rgb(246 252 200 / 0.14) 50%,+ rgb(246 252 200 / 0.08) 62%,transparent 90%);transform: translateX(-100%);- animation: touch-grass-gust 7s ease-in-out 3s infinite;+ animation: touch-grass-gust 7s ease-in-out 3.75s infinite;}/* A tuft is several curved blades cut from one element by a clip-path, sized, placed@@ -87,46 +109,46 @@transform-origin: 50% 100%;}-/* Six olives, darker to lighter, from shadowed roots to pale tips. Written out in- full: no var() in a tuft's rules, so restyling one while it parts never re-parses its- colours. */+/* Six spring greens, darker to lighter, from shadowed roots to sunlit tips. Written+ out in full: no var() in a tuft's rules, so restyling one while it parts never+ re-parses its colours. */.touch-grass__tuft--0 {background:linear-gradient(90deg, rgb(255 255 255 / 0.05), transparent 50%, rgb(0 0 0 / 0.08)),- linear-gradient(to top, #26320d, #4d6119 45%, #758b2c);+ linear-gradient(to top, #2f6e1f, #52a02e 45%, #82c845);}.touch-grass__tuft--1 {background:linear-gradient(90deg, rgb(255 255 255 / 0.05), transparent 50%, rgb(0 0 0 / 0.08)),- linear-gradient(to top, #2b3810, #56691d 45%, #7f9432);+ linear-gradient(to top, #357723, #5aa933 45%, #8bcf4c);}.touch-grass__tuft--2 {background:linear-gradient(90deg, rgb(255 255 255 / 0.05), transparent 50%, rgb(0 0 0 / 0.08)),- linear-gradient(to top, #303e12, #5e7322 45%, #8a9d3a);+ linear-gradient(to top, #3b8027, #63b239 45%, #95d553);}.touch-grass__tuft--3 {background:linear-gradient(90deg, rgb(255 255 255 / 0.05), transparent 50%, rgb(0 0 0 / 0.08)),- linear-gradient(to top, #34430f, #677c25 45%, #96a843);+ linear-gradient(to top, #41892b, #6cbb3f 45%, #a0dc5b);}.touch-grass__tuft--4 {background:linear-gradient(90deg, rgb(255 255 255 / 0.05), transparent 50%, rgb(0 0 0 / 0.08)),- linear-gradient(to top, #394714, #70852b 45%, #a1b24c);+ linear-gradient(to top, #47922f, #76c446 45%, #abe264);}.touch-grass__tuft--5 {background:linear-gradient(90deg, rgb(255 255 255 / 0.05), transparent 50%, rgb(0 0 0 / 0.08)),- linear-gradient(to top, #3f4d18, #7a8e33 45%, #adbc5a);+ linear-gradient(to top, #4e9b34, #80cc4d 45%, #b7e86e);}-@keyframes touch-grass-cover {+@keyframes touch-grass-fade-in {from {opacity: 0;}@@ -165,6 +187,7 @@}/* The lawn holds still while the window is in the background (TouchGrass.tsx). */+.touch-grass--resting::before,.touch-grass--resting .touch-grass__ground::after,.touch-grass--resting .touch-grass__patch,.touch-grass--resting .touch-grass__gust {@@ -172,6 +195,7 @@}@media (prefers-reduced-motion: reduce) {+ .touch-grass::before,.touch-grass__ground::after,.touch-grass__patch {animation: none;