Skip to content

Commit

Permalink
feat: add error toast
Browse files Browse the repository at this point in the history
  • Loading branch information
zamitto committed Sep 13, 2024
1 parent e8515e1 commit a03ac26
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@
"no_pending_invites": "You have no pending invites",
"no_blocked_users": "You have no blocked users",
"friend_code_copied": "Friend code copied",
"undo_friendship_modal_text": "This will undo your friendship with {{displayName}}"
"undo_friendship_modal_text": "This will undo your friendship with {{displayName}}",
"image_process_failure": "Failure while processing the image"
}
}
3 changes: 2 additions & 1 deletion src/locales/pt-BR/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@
"no_pending_invites": "Você não possui convites de amizade pendentes",
"no_blocked_users": "Você não tem nenhum usuário bloqueado",
"friend_code_copied": "Código de amigo copiado",
"undo_friendship_modal_text": "Isso irá remover sua amizade com {{displayName}}"
"undo_friendship_modal_text": "Isso irá remover sua amizade com {{displayName}}",
"image_process_failure": "Falha ao processar a imagem"
}
}
3 changes: 2 additions & 1 deletion src/locales/pt-PT/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@
"pending": "Pendentes",
"no_pending_invites": "Não tens convites de amizade pendentes",
"no_blocked_users": "Não tens nenhum utilizador bloqueado",
"friend_code_copied": "Código de amigo copiado"
"friend_code_copied": "Código de amigo copiado",
"image_process_failure": "Falha ao processar a imagem"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export const UserEditProfile = ({
const { imagePath } = await window.electron
.processProfileImage(filePaths[0])
.catch(() => {
showErrorToast(t("image_process_failure"));
return { imagePath: null };
})
.finally(() => setIsLoadingImage(false));
Expand Down

0 comments on commit a03ac26

Please sign in to comment.