diff --git a/apps/web/app/(app)/page.tsx b/apps/web/app/(app)/page.tsx index 97bb92a0..81f7fc99 100644 --- a/apps/web/app/(app)/page.tsx +++ b/apps/web/app/(app)/page.tsx @@ -1,5 +1,6 @@ import { listUserProjects, onboardingChecklist } from "@peppa/core"; import { OnboardingChecklist } from "@/components/Onboarding"; +import { PugBanner } from "@/components/PugMascot"; import { LiveRefresh } from "@/components/LiveRefresh"; import { ActivityAside } from "@/components/ActivityAside"; import { ProjectList, QuestionCard, SessionCard } from "@/components/cards"; @@ -20,7 +21,8 @@ export default async function Home({ searchParams }: { searchParams: Promise<{ e {items.length ? "Агенты ждут твоего решения — ответь здесь, в Telegram или через MCP." : "Всё идёт само: агентам от тебя ничего не нужно."} {onboarding.visible && }
- {items.length === 0 ? Агентам от тебя ничего не нужно. : items.map((q) => )} + + {items.map((q) => )}
все раннеры}> {sessions.length === 0 ? Сейчас ничего не запущено. : sessions.map((s) => )} diff --git a/apps/web/app/app.css b/apps/web/app/app.css index f150bd47..462b4490 100644 --- a/apps/web/app/app.css +++ b/apps/web/app/app.css @@ -101,3 +101,15 @@ @apply bg-primary/30; } } + +/* PEP-70: pug mascot — breathing while asleep, a curious head tilt and a blinking cursor when agents ask. */ +@media (prefers-reduced-motion: no-preference) { + .pug-sleep .pug-body { animation: pug-breathe 3.2s ease-in-out infinite; } + .pug-sleep .pug-zzz { animation: pug-zzz 3.2s ease-in-out infinite; } + .pug-alert .pug-head { animation: pug-tilt 2.4s ease-in-out infinite; } + .pug-alert .pug-cursor { animation: pug-blink 1s steps(1) infinite; } +} +@keyframes pug-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.02, 0.985); } } +@keyframes pug-zzz { 0%, 100% { opacity: 0.25; transform: translateY(2px); } 50% { opacity: 0.6; transform: translateY(-2px); } } +@keyframes pug-tilt { 0%, 60%, 100% { transform: rotate(0deg); } 70% { transform: rotate(-7deg); } 85% { transform: rotate(4deg); } } +@keyframes pug-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } } diff --git a/apps/web/components/PugMascot.tsx b/apps/web/components/PugMascot.tsx new file mode 100644 index 00000000..f250d9e1 --- /dev/null +++ b/apps/web/components/PugMascot.tsx @@ -0,0 +1,147 @@ +// PEP-70: Peppa's mascot — a soft "clay" chibi pug with a terminal prompt (`> _`) glowing on its belly. +// Pure SVG (no external images), fixed colours that read on both themes; motion only without +// reduced-motion (see .pug-* in app.css). +import { useId } from "react"; +import { cn } from "@/lib/utils"; + +type Mood = "sleep" | "alert"; + +export function PugMascot({ mood, size = 96, className }: { mood: Mood; size?: number; className?: string }) { + const awake = mood === "alert"; + const id = useId().replace(/[^a-zA-Z0-9]/g, ""); + const fur = `pf${id}`, furDark = `pd${id}`, ear = `pe${id}`, screen = `ps${id}`, glow = `pg${id}`, soft = `po${id}`; + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {/* floor shadow */} + + + + {/* curly tail */} + + {/* legs */} + + + {/* body */} + + {/* arms */} + + + {/* belly screen with the glowing prompt */} + + + + + + + + + {/* head */} + + {/* folded button ears */} + + + {/* forehead wrinkles */} + + + {/* cheeks */} + + + {/* black mask */} + + {/* eyes */} + {awake ? ( + <> + + + + + + + + ) : ( + <> + + + + )} + {/* nose, mouth, tongue */} + + + + {awake && } + + + + {!awake && ( + + z + z + + )} + + ); +} + +/** Mascot with a speech bubble: sleeps when nothing waits, perks up when agents ask. */ +export function PugBanner({ count }: { count: number }) { + const awake = count > 0; + return ( +
+ +
+ {awake ? ( + <> + Гав! {count === 1 ? "Агент ждёт" : "Агенты ждут"} твоего ответа + — {plural(count)} ниже. + + ) : ( + Тихо… Агентам от тебя ничего не нужно, мопс спит. + )} +
+
+ ); +} + +function plural(n: number) { + const m10 = n % 10, m100 = n % 100; + const w = m10 === 1 && m100 !== 11 ? "вопрос" : m10 >= 2 && m10 <= 4 && (m100 < 12 || m100 > 14) ? "вопроса" : "вопросов"; + return `${n} ${w}`; +}