2.0: beta feedback — edit dish from shopping list + dish photos in planner
- Shopping list: dishes under "No ingredients yet" now open the dish editor on tap (pencil affordance); list reconciles on dismiss. This was a dead end on devices without Apple Intelligence (no Generate button, e.g. iPhone 14). - Planner: dish photo as a scrimmed card background in the week calendar, behind a new Settings toggle (settings_show_dish_photos, default on). New optional AppSettings.showDishPhotosInPlanner (CloudKit/migration safe). - FilledSlotView: inlines the meal-card chrome to support the photo layer. - Toggle localized in all 6 languages. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BkanrydYtrme8wipTzWssG
This commit is contained in:
@@ -6,6 +6,7 @@ struct FilledSlotView: View {
|
||||
let tags: [(name: String, color: String)]
|
||||
let mealType: MealType
|
||||
var showsRuleWarning: Bool = false
|
||||
var photoData: Data? = nil
|
||||
var onRemove: (() -> Void)?
|
||||
|
||||
var body: some View {
|
||||
@@ -52,6 +53,27 @@ struct FilledSlotView: View {
|
||||
}
|
||||
.padding(10)
|
||||
.frame(maxWidth: .infinity, minHeight: 80, alignment: .topLeading)
|
||||
.mealCardStyle()
|
||||
.background(cardBackground)
|
||||
.cornerRadius(16)
|
||||
.shadow(color: Color.black.opacity(0.05), radius: 8, y: 4)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 16)
|
||||
.stroke(Color(hex: "#F0F0F0"), lineWidth: 1)
|
||||
)
|
||||
}
|
||||
|
||||
/// Dish photo as a subtle card background, scrimmed so text stays legible.
|
||||
@ViewBuilder
|
||||
private var cardBackground: some View {
|
||||
if let photoData, let image = UIImage(data: photoData) {
|
||||
ZStack {
|
||||
Image(uiImage: image)
|
||||
.resizable()
|
||||
.scaledToFill()
|
||||
Color.mealMoodSurface.opacity(0.75)
|
||||
}
|
||||
} else {
|
||||
Color.mealMoodSurface
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user