mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2026-05-05 04:54:53 +00:00
✨ **Nostr Login:** Enhanced error handling and removed unused auth-error event binding.
This commit is contained in:
@@ -106,7 +106,15 @@ export default () => ({
|
||||
},
|
||||
|
||||
showAuthError(error) {
|
||||
let message = error || 'Authentication failed. Please try again.';
|
||||
let message;
|
||||
if (typeof error === 'string') {
|
||||
message = error;
|
||||
} else if (error && typeof error === 'object' && typeof error.message === 'string') {
|
||||
message = error.message;
|
||||
} else {
|
||||
message = 'Authentication failed. Please try again.';
|
||||
}
|
||||
|
||||
let variant = 'danger';
|
||||
|
||||
if (message.includes('incompatible') || message.includes('format')) {
|
||||
@@ -125,8 +133,6 @@ export default () => ({
|
||||
duration: 8000,
|
||||
});
|
||||
}
|
||||
|
||||
this.$dispatch('auth-error', {message, variant});
|
||||
},
|
||||
|
||||
destroy() {
|
||||
|
||||
Reference in New Issue
Block a user