1 Commits

Author SHA1 Message Date
846058fa0f Raise LoginModal z-index above recipe overlay
Some checks failed
Test / unit-test (push) Successful in 4s
Test / build-check (push) Successful in 4s
Test / e2e-test (push) Failing after 1m5s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 22:19:48 +00:00
2 changed files with 6 additions and 7 deletions

View File

@@ -119,7 +119,7 @@ async function submit() {
position: fixed; position: fixed;
inset: 0; inset: 0;
background: rgba(0, 0, 0, 0.35); background: rgba(0, 0, 0, 0.35);
z-index: 5000; z-index: 6000;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;

View File

@@ -350,7 +350,6 @@ import { useUiStore } from '../stores/ui'
import { useDiaryStore } from '../stores/diary' import { useDiaryStore } from '../stores/diary'
import { api } from '../composables/useApi' import { api } from '../composables/useApi'
import { oilEn, recipeNameEn } from '../composables/useOilTranslation' import { oilEn, recipeNameEn } from '../composables/useOilTranslation'
import { showPrompt } from '../composables/useDialog'
// TagPicker replaced with inline tag editing // TagPicker replaced with inline tag editing
const props = defineProps({ const props = defineProps({
@@ -577,16 +576,16 @@ async function saveToDiary() {
ui.openLogin() ui.openLogin()
return return
} }
const name = await showPrompt('保存为我的配方,名称:', recipe.value.name) const name = prompt('保存为我的配方,名称:', recipe.value.name)
if (!name) return if (!name) return
try { try {
await recipesStore.saveRecipe({ await api.post('/api/diary', {
name, name,
source_recipe_id: recipe.value._id || null,
ingredients: recipe.value.ingredients.map(i => ({ oil: i.oil, drops: i.drops })),
note: recipe.value.note || '', note: recipe.value.note || '',
ingredients: recipe.value.ingredients.map(i => ({ oil_name: i.oil, drops: i.drops })),
tags: recipe.value.tags || [],
}) })
ui.showToast('已保存到「我的配方」') ui.showToast('已保存到「我的配方日记」')
} catch (e) { } catch (e) {
ui.showToast('保存失败: ' + (e?.message || '未知错误')) ui.showToast('保存失败: ' + (e?.message || '未知错误'))
} }