feat: 新功能改进 #20
@@ -1285,9 +1285,11 @@ async function shareDiaryToPublic(diary) {
|
||||
ui.showToast('公共配方库中已有一模一样的配方「' + diary.name + '」')
|
||||
return
|
||||
}
|
||||
// Same name, different content
|
||||
// Same name, different content — show details
|
||||
const existIngs = pIngs.map(i => `${i.oil}${i.drops}滴`).join('、')
|
||||
const newIngs = dIngs.map(i => `${i.oil}${i.drops}滴`).join('、')
|
||||
const action = await showConfirm(
|
||||
`公共配方库中已有同名配方「${diary.name}」但内容不同,是否改名后共享?`,
|
||||
`公共配方库中已有同名配方「${diary.name}」,内容不同:\n\n已有:${existIngs}\n新的:${newIngs}\n\n是否改名后共享?`,
|
||||
{ okText: '改名', cancelText: '取消' }
|
||||
)
|
||||
if (!action) return
|
||||
|
||||
Reference in New Issue
Block a user