fix: 修复 rebase 后重复 clearBrandImage 声明 + 测试加 dismissDialog

- 删除 MyDiary.vue 重复的 clearBrandImage 函数(rebase 遗留)
- 测试加 dismissDialog() 关闭 CI 中 API 错误弹出的 dialog

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-09 19:06:22 +00:00
committed by fam
parent b0d82d4ff7
commit cf5b974ae1
2 changed files with 24 additions and 29 deletions

View File

@@ -574,26 +574,6 @@ async function clearBrandImage(type) {
}
}
async function clearBrandImage(type) {
const fieldMap = { logo: 'brand_logo', bg: 'brand_bg', qr: 'qr_code' }
const field = fieldMap[type]
if (!field) return
try {
const res = await api('/api/brand', {
method: 'PUT',
body: JSON.stringify({ [field]: '' }),
})
if (res.ok) {
if (type === 'logo') brandLogo.value = ''
else if (type === 'bg') brandBg.value = ''
else if (type === 'qr') brandQrImage.value = ''
ui.showToast('已清除')
}
} catch {
ui.showToast('清除失败')
}
}
// Account
async function updateDisplayName() {
try {