feat(nav): Hamburger-Menü mit Register statt Settings-Icon
All checks were successful
Build & Publish Docker Image / build-and-push (push) Successful in 1m19s

Ersetzt das Settings-Zahnrad im Header durch ein Dreistriche-Menü. Das
Menü enthält zwei Punkte: „Register" führt zu einer neuen /recipes-Route
mit allen Rezepten alphabetisch gruppiert (A-Z-Buchstabenchips zum
Scrollen, Live-Filter oben, Umlaut-normalisiert). „Einstellungen" zeigt
wie bisher /admin.

Auf Mobile <520px wird das App-Icon komplett ausgeblendet, damit die
Suchleiste mehr Platz bekommt.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-17 21:54:04 +02:00
parent f72fe64d8e
commit b4a7355b24
5 changed files with 360 additions and 21 deletions

View File

@@ -1,7 +1,11 @@
import { describe, it, expect } from 'vitest';
import { openInMemoryForTest } from '../../src/lib/server/db';
import { insertRecipe } from '../../src/lib/server/recipes/repository';
import { searchLocal, listRecentRecipes } from '../../src/lib/server/recipes/search-local';
import {
searchLocal,
listRecentRecipes,
listAllRecipes
} from '../../src/lib/server/recipes/search-local';
import type { Recipe } from '../../src/lib/types';
function recipe(overrides: Partial<Recipe> = {}): Recipe {
@@ -89,3 +93,26 @@ describe('listRecentRecipes', () => {
expect(recent[0].title === 'New' || recent[0].title === 'Old').toBe(true);
});
});
describe('listAllRecipes', () => {
it('returns all recipes sorted alphabetically, case-insensitive', () => {
const db = openInMemoryForTest();
insertRecipe(db, recipe({ title: 'zuccini' }));
insertRecipe(db, recipe({ title: 'Apfelkuchen' }));
insertRecipe(db, recipe({ title: 'birnenkompott' }));
const all = listAllRecipes(db);
expect(all.map((r) => r.title)).toEqual([
'Apfelkuchen',
'birnenkompott',
'zuccini'
]);
});
it('includes hidden-from-recent recipes too', () => {
const db = openInMemoryForTest();
const id = insertRecipe(db, recipe({ title: 'Versteckt' }));
db.prepare('UPDATE recipe SET hidden_from_recent = 1 WHERE id = ?').run(id);
const all = listAllRecipes(db);
expect(all.length).toBe(1);
});
});