Separate Study Decks and Homework in the library; drop the /create mode switch

Library ("Your icebox")
- Two tabs, never mixed: Study Decks (the folder + card library) and Homework
  (saved solutions and step-by-step guides). The active tab lives in the URL
  (/?tab=homework), so the sections are linkable and survive a reload.
- Decks tab keeps Import, the folder bar, stats and its own empty state — now
  a single decks-only CTA.
- Homework tab lists saved results as cards (mode icon, date, step count,
  preview) with Open and delete-with-confirm; its empty state has its own CTA
  ("Homework Solver") that opens the solver directly. Opening a card
  deep-links to /homework?open=<id>, which the screen opens on arrival.
- .segmented now also styles link segments (same control as settings).

/create
- The redundant "Study Deck | Homework Solver" toggle is gone: /create is the
  deck uploader only, and the bottom bar's + goes straight to it. Homework has
  its own screen, reached from the library tab, the drawer and CTAs.

Copy
- New keys (en + cs): tabDecks, tabHomework, homeworkHeroTitle, plus homework
  empty-state/open/step-count strings. The homework hero is now "Solve your
  homework" / "Vyřeš svůj úkol" — no study-deck text in the homework flow.
- Removed the now-unused ModeSwitch component and homework.title key.

Service worker: freezmo-v10.

Verified: library-tabs suite 37/37 (tab switching, context empty states,
deep-link opening, deletion, no switch on /create, heroes, redirects, desktop
grid, 360px + 44px targets, axe contrast en+cs light+dark), mobile 49/49,
i18n 27/27, desktop regression 74/74. Lint + build clean.
This commit is contained in:
Martin Dvořák 2026-10-08 21:26:08 +00:00
commit 8c44f47881
12 changed files with 295 additions and 162 deletions

View file

@ -169,7 +169,7 @@ const en: Record<string, string> = {
/* make my homework ------------------------------------------------- */
"homework.nav": "Make my homework",
"homework.title": "Make my homework",
"homeworkHeroTitle": "Solve your homework",
"homework.subtitle":
"Paste the assignment, snap a photo or add a document — then choose whether I should just do it, or guide you through it.",
"homework.source.title": "1. The assignment",
@ -222,6 +222,16 @@ const en: Record<string, string> = {
"homework.history.guide": "Guide",
"homework.history.openTitle": "Open “{title}”",
"homework.history.deleteConfirm": "Delete this result?",
"homework.emptyTitle": "No homework yet",
"homework.emptyBody": "Solved assignments and step-by-step guides you save show up here.",
"homework.open": "Open",
"homework.steps.one": "{n} step",
"homework.steps.few": "{n} steps",
"homework.steps.many": "{n} steps",
/* library tabs ----------------------------------------------------- */
"tabDecks": "Study Decks",
"tabHomework": "Homework",
/* quick actions (library empty state + /create switcher) ----------- */
"emptyStateCreateDeck": "Study Deck",
@ -753,7 +763,7 @@ const cs: Record<string, string> = {
/* make my homework ------------------------------------------------- */
"homework.nav": "Udělej mi úkol",
"homework.title": "Udělej mi úkol",
"homeworkHeroTitle": "Vyřeš svůj úkol",
"homework.subtitle":
"Vlož zadání, vyfoť ho nebo přidej dokument — a pak si vyber, jestli to mám rovnou udělat, nebo tě tím provést.",
"homework.source.title": "1. Zadání",
@ -806,6 +816,16 @@ const cs: Record<string, string> = {
"homework.history.guide": "Návod",
"homework.history.openTitle": "Otevřít „{title}“",
"homework.history.deleteConfirm": "Smazat tento výsledek?",
"homework.emptyTitle": "Zatím žádné úkoly",
"homework.emptyBody": "Uložená řešení úkolů a návody krok za krokem se objeví tady.",
"homework.open": "Otevřít",
"homework.steps.one": "{n} krok",
"homework.steps.few": "{n} kroky",
"homework.steps.many": "{n} kroků",
/* library tabs ----------------------------------------------------- */
"tabDecks": "Studijní balíčky",
"tabHomework": "Úkoly",
/* quick actions (library empty state + /create switcher) ----------- */
"emptyStateCreateDeck": "Studijní balíček",