fix: 存为我的改用自定义 showPrompt,与主分支保持一致
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 3s
PR Preview / test (pull_request) Successful in 4s
PR Preview / deploy-preview (pull_request) Successful in 15s
Test / e2e-test (push) Failing after 1m18s
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 3s
PR Preview / test (pull_request) Successful in 4s
PR Preview / deploy-preview (pull_request) Successful in 15s
Test / e2e-test (push) Failing after 1m18s
将 saveToDiary 中的原生 prompt() 替换为项目内置的 showPrompt(),使对话框样式与主分支及全站风格保持一致。 Co-Authored-By: YoYo <yoyo@euphon.net>
This commit is contained in:
@@ -355,7 +355,7 @@ import { useAuthStore } from '../stores/auth'
|
||||
import { useUiStore } from '../stores/ui'
|
||||
import { useDiaryStore } from '../stores/diary'
|
||||
import { api } from '../composables/useApi'
|
||||
import { showConfirm } from '../composables/useDialog'
|
||||
import { showConfirm, showPrompt } from '../composables/useDialog'
|
||||
import { oilEn, recipeNameEn } from '../composables/useOilTranslation'
|
||||
// TagPicker replaced with inline tag editing
|
||||
|
||||
@@ -631,7 +631,7 @@ async function saveToDiary() {
|
||||
ui.openLogin(() => saveToDiary())
|
||||
return
|
||||
}
|
||||
const name = prompt('保存为我的配方,名称:', recipe.value.name)
|
||||
const name = await showPrompt('保存为我的配方,名称:', recipe.value.name)
|
||||
if (!name) return
|
||||
try {
|
||||
await api.post('/api/diary', {
|
||||
|
||||
Reference in New Issue
Block a user