Commit Graph

13 Commits

Author SHA1 Message Date
7c824b492e Modernize networking layer and fix category navigation and recipe list bugs
Network layer:
- Replace static CookbookApi protocol with instance-based CookbookApiProtocol
  using async/throws instead of tuple returns
- Refactor ApiRequest to use URLComponents for proper URL encoding, replace
  print statements with OSLog, and return typed NetworkError cases
- Add structured NetworkError variants (httpError, connectionError, etc.)
- Remove global cookbookApi constant in favor of injected dependency on AppState
- Delete unused RecipeEditViewModel, RecipeScraper, and Scraper playground

Data & model fixes:
- Add custom Decodable for RecipeDetail with safe fallbacks for malformed JSON
- Make Category Hashable/Equatable use only `name` so NavigationSplitView
  selection survives category refreshes with updated recipe_count
- Return server-assigned ID from uploadRecipe so new recipes get their ID
  before the post-upload refresh block executes

View updates:
- Refresh both old and new category recipe lists after upload when category
  changes, mapping empty recipeCategory to "*" for uncategorized recipes
- Raise deployment target to iOS 18, adopt new SwiftUI API conventions
- Clean up alerts, onboarding views, and settings

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-15 00:47:28 +01:00
VincentMeilinger
7b59c79222 Number formatting settings, recipe ingredient amount calculation 2024-03-20 08:53:58 +01:00
VincentMeilinger
dbe626d595 Bug fixes and UI polish 2024-03-07 19:09:39 +01:00
VincentMeilinger
b5dbaad9aa Recipe edit UI polish 2024-03-05 08:39:06 +01:00
Vicnet
a3fc891d0a Better file caching and update management 2023-12-14 14:11:56 +01:00
Vicnet
3563c23e29 Networking rework: simplified API calls. 2023-11-16 13:13:06 +01:00
Vicnet
13b025771c Improved date handling (DurationComponents) 2023-11-11 11:11:08 +01:00
Vicnet
2ba0aaf636 Removed Date extension (no longer needed) 2023-11-10 16:10:09 +01:00
Vicnet
8f32946e27 Added category 'All' recipes 2023-10-22 20:28:51 +02:00
Vicnet
85a8e631d0 Recipe creation, editing and deletion are now supported 2023-10-04 11:23:05 +02:00
Vicnet
77c07bb0b1 Recipes are now searchable 2023-10-03 12:11:32 +02:00
Vicnet
ee1c0d9aed Basic Edit View and components 2023-09-30 10:07:27 +02:00
Vicnet
26dd5c34ff Nextcloud login flow v2, Network code rewrite 2023-09-20 13:25:25 +02:00