diff --git a/AGENTS.md b/AGENTS.md index c425b53..6e55fd5 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -39,16 +39,35 @@ It describes what the project is, what is already implemented, and what still ne - state management: `frontend/src/stores/ui.ts` - mounted globally in `frontend/src/App.vue` - card-level loading/error states are wired in `TodayView`, `MealsView`, `MealDetailView`, `IngredientsView` + - expired-session handling is global: + - token error detector in `frontend/src/utils/error.ts` emits `auth:session-expired` + - listener in `frontend/src/main.ts` clears session, shows info toast, and redirects to auth route - Frontend i18n is wired and used across new UI: - setup in `frontend/src/i18n/index.ts` - locale files in `frontend/src/locales/{sk,cs,en,es,de}.json` - language switcher updates locale dynamically. - app UI keys include (`nav`, `pageTitles`, `mealTypes`, `common`, `nutrition`, `today`, `meals`, `ingredients`, `stats`, `settings`, `ux`) + - `nutrition.short.fiber` exists in all locales and is used in macro badges + - `ux.toast.sessionExpired` exists in all locales for auto-logout flow - Frontend theme system is implemented: - centralized theme store: `frontend/src/stores/theme.ts` - shared toggle component: `frontend/src/components/common/ThemeToggle.vue` - toggle available in auth, app topbar, and settings - design tokens in `frontend/src/assets/css/style.css` (`:root` variables). +- Frontend macro-badge visual system is implemented: + - shared component: `frontend/src/components/common/MacroBadge.vue` + - shared colors/tokens/styles in `frontend/src/assets/css/style.css` + - used in `IngredientsView`, `MealsView`, `DayTotalsCard`, and `DayMealCard` + - `Today` day totals card layout: kcal block on the left, macros on the right in one row + - macro colors: + - protein `#3B82F6` + - carbs `#F59E0B` + - fat `#EF4444` + - fiber `#10B981` + - style uses subtle tinted background + full-color text, pill shape (no saturated full backgrounds) +- Frontend typography is local (no remote font CDN): + - `frontend/src/assets/css/style.css` uses local `@font-face` for `DM Sans` and `Space Grotesk` + - font files are stored in `frontend/src/assets/fonts/*.woff2` - App logo is served from `frontend/public/Nutrio.png` (copied from `doc/Nutrio.png`). - Font Awesome is installed and registered globally in `frontend/src/main.ts`. - Pinia is installed and configured in `frontend/src/main.ts` via `frontend/src/stores/index.ts`. @@ -58,7 +77,7 @@ It describes what the project is, what is already implemented, and what still ne - `frontend/src/utils/{nutrition,api,date,error}.ts` - Ingredients form UX detail: - create/edit form in `IngredientsView` is hidden by default - - shows only after `Nová surovina` or `Upraviť` + - shows only after `Nova surovina` or `Upravit` - hides again after successful save (form remount resets fields) - `frontend/src/BackendAPI.ts` is generated via `backend/scripts/buildTypeScript.php` and should not be edited manually. - `backend/data.json` contains sample meal data (not currently wired into DB/API flow). @@ -168,6 +187,8 @@ All actions are invoked through `backend/public/API.php` with `?action=