feat(ui): 封面形象余额不足时不弹 toast;声音复刻弹窗增加积分消耗提示

This commit is contained in:
小鱼开发
2026-05-23 11:08:47 +08:00
parent 53371aabcd
commit fae2a77734
2 changed files with 15 additions and 11 deletions
@@ -104,8 +104,7 @@ export default function CoverAvatarLibrary() {
} catch (err) {
const msg = err instanceof Error ? err.message : '上传失败';
if (msg.includes('积分不足')) {
progress.error('积分不足');
toast.error('积分不足,每次上传封面形象消耗 10 积分,请先充值');
progress.error('积分不足,请先充值');
} else {
progress.error(msg);
toast.error(msg);
@@ -392,15 +392,20 @@ export default function VoiceMaterialLibrary() {
</div>
</div>
<div style={{ display: 'flex', gap: 12, justifyContent: 'flex-end' }}>
<button className="btn btn-secondary" onClick={() => setUploadModalOpen(false)}></button>
<button
className="btn btn-primary"
onClick={handleUpload}
disabled={!uploadName.trim() || !selectedFile}
>
</button>
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
<span style={{ fontSize: 'var(--font-xs)', color: 'var(--text-tertiary)' }}>
<strong style={{ color: 'var(--primary)' }}>200</strong>
</span>
<div style={{ display: 'flex', gap: 12 }}>
<button className="btn btn-secondary" onClick={() => setUploadModalOpen(false)}></button>
<button
className="btn btn-primary"
onClick={handleUpload}
disabled={!uploadName.trim() || !selectedFile}
>
</button>
</div>
</div>
</div>
</Modal>