From c9b443960db5eb59d61289c43af6a93b06acb1d3 Mon Sep 17 00:00:00 2001 From: Abhinav Raut Date: Thu, 30 Jan 2025 01:47:35 +0530 Subject: [PATCH] fix: standardize toast messags in user profile edit --- frontend/src/components/account/ProfileEdit.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/account/ProfileEdit.vue b/frontend/src/components/account/ProfileEdit.vue index d3fa3e46..ef47fc3c 100644 --- a/frontend/src/components/account/ProfileEdit.vue +++ b/frontend/src/components/account/ProfileEdit.vue @@ -117,11 +117,12 @@ const saveUser = async () => { isSaving.value = true await api.updateCurrentUser(formData) emitter.emit(EMITTER_EVENTS.SHOW_TOAST, { + title: 'Success', description: 'Profile updated successfully' }) } catch (error) { emitter.emit(EMITTER_EVENTS.SHOW_TOAST, { - title: 'Could not save profile', + title: 'Error', variant: 'destructive', description: handleHTTPError(error).message }) @@ -136,11 +137,12 @@ const removeAvatar = async () => { await api.deleteUserAvatar() userStore.clearAvatar() emitter.emit(EMITTER_EVENTS.SHOW_TOAST, { + title: 'Success', description: 'Avatar removed' }) } catch (error) { emitter.emit(EMITTER_EVENTS.SHOW_TOAST, { - title: 'Could not remove avatar', + title: 'Error', variant: 'destructive', description: handleHTTPError(error).message })