Commit Graph

18 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
744ea76a34 Updated RecipeView 2024-03-01 14:17:24 +01:00
VincentMeilinger
d3e0366ce6 New Recipe Edit View 2024-02-18 12:25:18 +01:00
Vicnet
bb68b29bdf Release Candidate Version 1.6 2023-12-15 13:43:56 +01:00
Vicnet
222685e05d fixed offline recipes duplicate encoding 2023-12-14 17:18:52 +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
04980b64c7 Added recipe description, nutrition information and keywords to recipe detail view 2023-10-24 19:09:21 +02:00
Vicnet
c0a63d7560 Keyword suggestions and language support. 2023-10-10 13:37:46 +02:00
Vicnet
c3a068a1c0 Updated recipe editing user interface 2023-10-05 22:59:53 +02:00
Vicnet
85a8e631d0 Recipe creation, editing and deletion are now supported 2023-10-04 11:23:05 +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
Vicnet
0f16b164d6 Nextcloud login flow v2 support (not in working state yet) 2023-09-19 12:04:59 +02:00
Vicnet
5fdfed9413 Image caching fixes 2023-09-17 20:45:35 +02:00
Vicnet
3504ce2a25 MainViewModel documentation and image caching improvements 2023-09-16 20:11:02 +02:00
Vicnet
2ebc420451 initial commit 2023-09-16 14:09:49 +02:00