ui: add error feedback for avatar upload

This commit is contained in:
undefined committed 2026-03-04 02:31:34 +08:00
1 parent dbb3c5069f
commit eab9b9e8f2
1 file changed
+4
@@ -52,6 +52,7 @@ export default new NamedPage('home_account', () => {
}
});
$confirm.on('click', async () => {
try {
if ($type.val() === 'upload') {
const formData = new FormData();
formData.append('file', $file[0].files[0]);
@@ -65,5 +66,8 @@ export default new NamedPage('home_account', () => {
}
await delay(800);
window.location.reload();
} catch (e) {
Notification.error(e.message);
}
});
});