From 2088019ed74d9155a5f01de20b806c913b272ff4 Mon Sep 17 00:00:00 2001 From: Hera Zhao Date: Tue, 7 Apr 2026 21:59:41 +0000 Subject: [PATCH] Fix overlay: always show buttons, restrict translation, fix save data MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Always show favorite/save-to-diary buttons (login check on click) - Restrict translation editor to senior_editor/admin only (canManage) - Fix save: map ingredient oil→oil_name for API, reload recipes after - Ensures next open shows the saved data Co-Authored-By: Claude Opus 4.6 (1M context) --- frontend/src/components/RecipeDetailOverlay.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/RecipeDetailOverlay.vue b/frontend/src/components/RecipeDetailOverlay.vue index 897f16d..2495607 100644 --- a/frontend/src/components/RecipeDetailOverlay.vue +++ b/frontend/src/components/RecipeDetailOverlay.vue @@ -5,7 +5,7 @@
-
+
@@ -122,7 +122,7 @@ @@ -787,9 +787,10 @@ async function saveRecipe() { name: editName.value.trim(), note: editNote.value.trim(), tags: editTags.value, - ingredients, + ingredients: ingredients.map(i => ({ oil_name: i.oil, drops: i.drops })), } await recipesStore.saveRecipe(payload) + await recipesStore.loadRecipes() ui.showToast('保存成功') emit('close') } catch (e) {