diff --git a/src-ui/messages.xlf b/src-ui/messages.xlf index dd49f8306..7bf6dd6b9 100644 --- a/src-ui/messages.xlf +++ b/src-ui/messages.xlf @@ -1081,49 +1081,49 @@ Create new correspondent src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.ts - 25 + 27 Edit correspondent src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.ts - 29 + 31 Create new document type src/app/components/common/edit-dialog/document-type-edit-dialog/document-type-edit-dialog.component.ts - 25 + 27 Edit document type src/app/components/common/edit-dialog/document-type-edit-dialog/document-type-edit-dialog.component.ts - 29 + 31 Create new item src/app/components/common/edit-dialog/edit-dialog.component.ts - 71 + 83 Edit item src/app/components/common/edit-dialog/edit-dialog.component.ts - 75 + 87 Could not save element: src/app/components/common/edit-dialog/edit-dialog.component.ts - 79 + 91 @@ -1157,14 +1157,14 @@ Create new user group src/app/components/common/edit-dialog/group-edit-dialog/group-edit-dialog.component.ts - 24 + 26 Edit user group src/app/components/common/edit-dialog/group-edit-dialog/group-edit-dialog.component.ts - 28 + 30 @@ -1289,49 +1289,49 @@ No encryption src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.ts - 13 + 14 SSL src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.ts - 14 + 15 STARTTLS src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.ts - 15 + 16 Create new mail account src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.ts - 39 + 41 Edit mail account src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.ts - 43 + 45 Successfully connected to the mail server src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.ts - 88 + 90 Unable to connect to the mail server src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.ts - 89 + 91 @@ -1500,46 +1500,46 @@ src/app/services/toast.service.ts - 35 + 37 Only process attachments src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts - 26 + 27 src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts - 37 + 38 Process all files, including 'inline' attachments src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts - 30 + 31 Process message as .eml src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts - 41 + 42 Process message as .eml and attachments separately src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts - 45 + 46 Delete src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts - 52 + 53 src/app/components/common/permissions-select/permissions-select.component.html @@ -1587,7 +1587,7 @@ src/app/components/manage/management-list/management-list.component.ts - 214 + 193 src/app/components/manage/settings/settings.component.html @@ -1614,84 +1614,84 @@ Move to specified folder src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts - 56 + 57 Mark as read, don't process read mails src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts - 60 + 61 Flag the mail, don't process flagged mails src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts - 64 + 65 Tag the mail with specified tag, don't process tagged mails src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts - 68 + 69 Use subject as title src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts - 75 + 76 Use attachment filename as title src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts - 79 + 80 Do not assign a correspondent src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts - 86 + 87 Use mail address src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts - 90 + 91 Use name (or mail address if not available) src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts - 94 + 95 Use correspondent selected below src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts - 98 + 99 Create new mail rule src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts - 139 + 141 Edit mail rule src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts - 143 + 145 @@ -1709,35 +1709,35 @@ e.g. src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.ts - 26 + 28 or use slashes to add directories e.g. src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.ts - 28 + 30 See <a target="_blank" href="https://docs.paperless-ngx.com/advanced_usage/#file-name-handling">documentation</a> for full list. src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.ts - 30 + 32 Create new storage path src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.ts - 35 + 37 Edit storage path src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.ts - 39 + 41 @@ -1769,14 +1769,14 @@ Create new tag src/app/components/common/edit-dialog/tag-edit-dialog/tag-edit-dialog.component.ts - 26 + 28 Edit tag src/app/components/common/edit-dialog/tag-edit-dialog/tag-edit-dialog.component.ts - 30 + 32 @@ -1840,14 +1840,14 @@ Create new user account src/app/components/common/edit-dialog/user-edit-dialog/user-edit-dialog.component.ts - 42 + 44 Edit user account src/app/components/common/edit-dialog/user-edit-dialog/user-edit-dialog.component.ts - 46 + 48 @@ -1912,7 +1912,7 @@ Not assigned src/app/components/common/filterable-dropdown/filterable-dropdown.component.ts - 336 + 337 Filter drop down element to filter for documents with no correspondent/type/tag assigned @@ -2185,7 +2185,7 @@ Inherited from group src/app/components/common/permissions-select/permissions-select.component.ts - 62 + 61 @@ -2757,89 +2757,91 @@ An error occurred loading content: src/app/components/document-detail/document-detail.component.ts - 226,228 + 234,236 Error retrieving metadata src/app/components/document-detail/document-detail.component.ts - 369 + 377 - - Error retrieving suggestions + + Error retrieving suggestions: src/app/components/document-detail/document-detail.component.ts - 389 + 397,399 Document saved successfully. src/app/components/document-detail/document-detail.component.ts - 499 + 509 src/app/components/document-detail/document-detail.component.ts - 507 + 517 Error saving document src/app/components/document-detail/document-detail.component.ts - 512 + 522 src/app/components/document-detail/document-detail.component.ts - 557 + 567 Confirm delete src/app/components/document-detail/document-detail.component.ts - 586 + 596 src/app/components/manage/management-list/management-list.component.ts - 210 + 189 Do you really want to delete document ""? src/app/components/document-detail/document-detail.component.ts - 587 + 597 The files for this document will be deleted permanently. This operation cannot be undone. src/app/components/document-detail/document-detail.component.ts - 588 + 598 Delete document src/app/components/document-detail/document-detail.component.ts - 590 + 600 Error deleting document: src/app/components/document-detail/document-detail.component.ts - 610,612 + 620,622 Redo OCR confirm src/app/components/document-detail/document-detail.component.ts - 633 + 643 src/app/components/document-list/bulk-editor/bulk-editor.component.ts @@ -2850,14 +2852,14 @@ This operation will permanently redo OCR for this document. src/app/components/document-detail/document-detail.component.ts - 634 + 644 This operation cannot be undone. src/app/components/document-detail/document-detail.component.ts - 635 + 645 src/app/components/document-list/bulk-editor/bulk-editor.component.ts @@ -2869,26 +2871,26 @@ src/app/components/manage/settings/settings.component.ts - 688 + 691 src/app/components/manage/settings/settings.component.ts - 742 + 749 src/app/components/manage/settings/settings.component.ts - 803 + 814 src/app/components/manage/settings/settings.component.ts - 862 + 875 Proceed src/app/components/document-detail/document-detail.component.ts - 637 + 647 src/app/components/document-list/bulk-editor/bulk-editor.component.ts @@ -2896,26 +2898,26 @@ src/app/components/manage/settings/settings.component.ts - 690 + 693 src/app/components/manage/settings/settings.component.ts - 744 + 751 src/app/components/manage/settings/settings.component.ts - 805 + 816 src/app/components/manage/settings/settings.component.ts - 864 + 877 Redo OCR operation will begin in the background. Close and re-open or reload this document after the operation has completed to see new content. src/app/components/document-detail/document-detail.component.ts - 645 + 655 @@ -2924,7 +2926,7 @@ )"/> src/app/components/document-detail/document-detail.component.ts - 656,658 + 666,668 @@ -4002,57 +4004,46 @@ 45 - - Error occurred while creating : . - - src/app/components/manage/management-list/management-list.component.ts - 143 - - - src/app/components/manage/management-list/management-list.component.ts - 154,156 - - Successfully created . src/app/components/manage/management-list/management-list.component.ts - 148 + 142 - - Error occurred while saving . + + Error occurred while creating . src/app/components/manage/management-list/management-list.component.ts - 175,177 + 147 Successfully updated . src/app/components/manage/management-list/management-list.component.ts - 182 + 163 - - Error occurred while saving : . + + Error occurred while saving . src/app/components/manage/management-list/management-list.component.ts - 188,190 + 168 Do you really want to delete the ? src/app/components/manage/management-list/management-list.component.ts - 197 + 176 Associated documents will not be deleted. src/app/components/manage/management-list/management-list.component.ts - 212 + 191 @@ -4061,7 +4052,7 @@ )"/> src/app/components/manage/management-list/management-list.component.ts - 225,227 + 204,206 @@ -4351,11 +4342,11 @@ 195 - - Appears on + +  Appears on src/app/components/manage/settings/settings.component.html - 209 + 209,210 @@ -4481,23 +4472,21 @@ Use system language src/app/components/manage/settings/settings.component.ts - 601 + 602 Use date format of display language src/app/components/manage/settings/settings.component.ts - 608 + 609 - - Error while storing settings on server: + + Error while storing settings on server. src/app/components/manage/settings/settings.component.ts - 628,630 + 629 @@ -4514,165 +4503,165 @@ 666 - - Error saving user: . + + Error saving user. src/app/components/manage/settings/settings.component.ts - 676 + 678 Confirm delete user account src/app/components/manage/settings/settings.component.ts - 686 + 689 This operation will permanently delete this user account. src/app/components/manage/settings/settings.component.ts - 687 + 690 Deleted user src/app/components/manage/settings/settings.component.ts - 696 + 699 - - Error deleting user: . + + Error deleting user. src/app/components/manage/settings/settings.component.ts - 704 + 707 Saved group "". src/app/components/manage/settings/settings.component.ts - 722 + 726 - - Error saving group: . + + Error saving group. src/app/components/manage/settings/settings.component.ts - 730 + 736 Confirm delete user group src/app/components/manage/settings/settings.component.ts - 740 + 747 This operation will permanently delete this user group. src/app/components/manage/settings/settings.component.ts - 741 + 748 Deleted group src/app/components/manage/settings/settings.component.ts - 750 + 757 - - Error deleting group: . + + Error deleting group. src/app/components/manage/settings/settings.component.ts - 758 + 765 Saved account "". src/app/components/manage/settings/settings.component.ts - 781 + 789 - - Error saving account: . + + Error saving account. src/app/components/manage/settings/settings.component.ts - 791 + 801 Confirm delete mail account src/app/components/manage/settings/settings.component.ts - 801 + 812 This operation will permanently delete this mail account. src/app/components/manage/settings/settings.component.ts - 802 + 813 Deleted mail account src/app/components/manage/settings/settings.component.ts - 811 + 822 - - Error deleting mail account: . + + Error deleting mail account. src/app/components/manage/settings/settings.component.ts - 820 + 831 Saved rule "". src/app/components/manage/settings/settings.component.ts - 839 + 850 - - Error saving rule: . + + Error saving rule. src/app/components/manage/settings/settings.component.ts - 850 + 862 Confirm delete mail rule src/app/components/manage/settings/settings.component.ts - 860 + 873 This operation will permanently delete this mail rule. src/app/components/manage/settings/settings.component.ts - 861 + 874 Deleted mail rule src/app/components/manage/settings/settings.component.ts - 870 + 883 - - Error deleting mail rule: . + + Error deleting mail rule. src/app/components/manage/settings/settings.component.ts - 879 + 892 @@ -5373,7 +5362,7 @@ Information src/app/services/toast.service.ts - 43 + 46 diff --git a/src-ui/src/app/components/common/edit-dialog/edit-dialog.component.ts b/src-ui/src/app/components/common/edit-dialog/edit-dialog.component.ts index 07ccb86bd..07693ce5a 100644 --- a/src-ui/src/app/components/common/edit-dialog/edit-dialog.component.ts +++ b/src-ui/src/app/components/common/edit-dialog/edit-dialog.component.ts @@ -38,6 +38,9 @@ export abstract class EditDialogComponent< @Output() succeeded = new EventEmitter() + @Output() + failed = new EventEmitter() + networkActive = false closeEnabled = false @@ -141,7 +144,7 @@ export abstract class EditDialogComponent< error: (error) => { this.error = error.error this.networkActive = false - this.succeeded.next(error) + this.failed.next(error) }, }) } diff --git a/src-ui/src/app/components/common/toasts/toasts.component.html b/src-ui/src/app/components/common/toasts/toasts.component.html index 03715a440..bfce90333 100644 --- a/src-ui/src/app/components/common/toasts/toasts.component.html +++ b/src-ui/src/app/components/common/toasts/toasts.component.html @@ -4,5 +4,10 @@ [class]="toast.classname" (hidden)="toastService.closeToast(toast)">

{{toast.content}}

+
+
+      {{toast.error}}
+    
+

diff --git a/src-ui/src/app/components/common/toasts/toasts.component.scss b/src-ui/src/app/components/common/toasts/toasts.component.scss index 52f8f8957..0cac00330 100644 --- a/src-ui/src/app/components/common/toasts/toasts.component.scss +++ b/src-ui/src/app/components/common/toasts/toasts.component.scss @@ -20,3 +20,8 @@ border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; } + +pre { + white-space: pre-line; + --bs-bg-opacity: .25; +} diff --git a/src-ui/src/app/components/manage/management-list/management-list.component.ts b/src-ui/src/app/components/manage/management-list/management-list.component.ts index 437acef90..8264f7071 100644 --- a/src-ui/src/app/components/manage/management-list/management-list.component.ts +++ b/src-ui/src/app/components/manage/management-list/management-list.component.ts @@ -136,26 +136,18 @@ export abstract class ManagementListComponent backdrop: 'static', }) activeModal.componentInstance.dialogMode = 'create' - activeModal.componentInstance.succeeded.subscribe({ - next: () => { - if (activeModal.componentInstance.error) { - this.toastService.showInfo( - $localize`Error occurred while creating ${this.typeName} : ${activeModal.componentInstance.error}.` - ) - } else { - this.reloadData() - this.toastService.showInfo( - $localize`Successfully created ${this.typeName}.` - ) - } - }, - error: (e) => { - this.toastService.showInfo( - $localize`Error occurred while creating ${this.typeName} : ${ - e.error ?? e.message ?? e.toString() - }.` - ) - }, + activeModal.componentInstance.succeeded.subscribe(() => { + this.reloadData() + this.toastService.showInfo( + $localize`Successfully created ${this.typeName}.` + ) + }) + activeModal.componentInstance.failed.subscribe((e) => { + this.toastService.showError( + $localize`Error occurred while creating ${this.typeName}.`, + 10000, + JSON.stringify(e) + ) }) } @@ -165,31 +157,18 @@ export abstract class ManagementListComponent }) activeModal.componentInstance.object = object activeModal.componentInstance.dialogMode = 'edit' - activeModal.componentInstance.succeeded.subscribe({ - next: () => { - if (activeModal.componentInstance.error) { - const errorDetail = activeModal.componentInstance.error.error - ? activeModal.componentInstance.error.error[0] - : null - this.toastService.showInfo( - $localize`Error occurred while saving ${this.typeName}${ - errorDetail ? ': ' + errorDetail : '' - }.` - ) - } else { - this.reloadData() - this.toastService.showInfo( - $localize`Successfully updated ${this.typeName}.` - ) - } - }, - error: (e) => { - this.toastService.showInfo( - $localize`Error occurred while saving ${ - this.typeName - } : ${e.toString()}.` - ) - }, + activeModal.componentInstance.succeeded.subscribe(() => { + this.reloadData() + this.toastService.showInfo( + $localize`Successfully updated ${this.typeName}.` + ) + }) + activeModal.componentInstance.failed.subscribe((e) => { + this.toastService.showError( + $localize`Error occurred while saving ${this.typeName}.`, + 10000, + JSON.stringify(e) + ) }) } diff --git a/src-ui/src/app/components/manage/settings/settings.component.ts b/src-ui/src/app/components/manage/settings/settings.component.ts index d795d7f0e..dc4f1746d 100644 --- a/src-ui/src/app/components/manage/settings/settings.component.ts +++ b/src-ui/src/app/components/manage/settings/settings.component.ts @@ -590,9 +590,10 @@ export class SettingsComponent }, error: (error) => { this.toastService.showError( - $localize`An error occurred while saving settings.` + $localize`An error occurred while saving settings.`, + 10000, + JSON.stringify(error) ) - console.log(error) }, }) } @@ -625,9 +626,9 @@ export class SettingsComponent }, (error) => { this.toastService.showError( - $localize`Error while storing settings on server: ${JSON.stringify( - error.error - )}` + $localize`Error while storing settings on server.`, + 10000, + JSON.stringify(error) ) } ) @@ -649,33 +650,35 @@ export class SettingsComponent modal.componentInstance.object = user modal.componentInstance.succeeded .pipe(takeUntil(this.unsubscribeNotifier)) - .subscribe({ - next: (newUser: PaperlessUser) => { - if ( - newUser.id === this.settings.currentUser.id && - (modal.componentInstance as UserEditDialogComponent).passwordIsSet - ) { - this.toastService.showInfo( - $localize`Password has been changed, you will be logged out momentarily.` - ) - setTimeout(() => { - window.location.href = `${window.location.origin}/accounts/logout/?next=/accounts/login/` - }, 2500) - } else { - this.toastService.showInfo( - $localize`Saved user "${newUser.username}".` - ) - this.usersService.listAll().subscribe((r) => { - this.users = r.results - this.initialize() - }) - } - }, - error: (e) => { - this.toastService.showError( - $localize`Error saving user: ${e.toString()}.` + .subscribe((newUser: PaperlessUser) => { + if ( + newUser.id === this.settings.currentUser.id && + (modal.componentInstance as UserEditDialogComponent).passwordIsSet + ) { + this.toastService.showInfo( + $localize`Password has been changed, you will be logged out momentarily.` ) - }, + setTimeout(() => { + window.location.href = `${window.location.origin}/accounts/logout/?next=/accounts/login/` + }, 2500) + } else { + this.toastService.showInfo( + $localize`Saved user "${newUser.username}".` + ) + this.usersService.listAll().subscribe((r) => { + this.users = r.results + this.initialize() + }) + } + }) + modal.componentInstance.failed + .pipe(takeUntil(this.unsubscribeNotifier)) + .subscribe((e) => { + this.toastService.showError( + $localize`Error saving user.`, + 10000, + JSON.stringify(e) + ) }) } @@ -701,7 +704,9 @@ export class SettingsComponent }, error: (e) => { this.toastService.showError( - $localize`Error deleting user: ${e.toString()}.` + $localize`Error deleting user.`, + 10000, + JSON.stringify(e) ) }, }) @@ -717,19 +722,21 @@ export class SettingsComponent modal.componentInstance.object = group modal.componentInstance.succeeded .pipe(takeUntil(this.unsubscribeNotifier)) - .subscribe({ - next: (newGroup) => { - this.toastService.showInfo($localize`Saved group "${newGroup.name}".`) - this.groupsService.listAll().subscribe((r) => { - this.groups = r.results - this.initialize() - }) - }, - error: (e) => { - this.toastService.showError( - $localize`Error saving group: ${e.toString()}.` - ) - }, + .subscribe((newGroup) => { + this.toastService.showInfo($localize`Saved group "${newGroup.name}".`) + this.groupsService.listAll().subscribe((r) => { + this.groups = r.results + this.initialize() + }) + }) + modal.componentInstance.failed + .pipe(takeUntil(this.unsubscribeNotifier)) + .subscribe((e) => { + this.toastService.showError( + $localize`Error saving group.`, + 10000, + JSON.stringify(e) + ) }) } @@ -755,7 +762,9 @@ export class SettingsComponent }, error: (e) => { this.toastService.showError( - $localize`Error deleting group: ${e.toString()}.` + $localize`Error deleting group.`, + 10000, + JSON.stringify(e) ) }, }) @@ -775,22 +784,24 @@ export class SettingsComponent modal.componentInstance.object = account modal.componentInstance.succeeded .pipe(takeUntil(this.unsubscribeNotifier)) - .subscribe({ - next: (newMailAccount) => { - this.toastService.showInfo( - $localize`Saved account "${newMailAccount.name}".` - ) - this.mailAccountService.clearCache() - this.mailAccountService.listAll().subscribe((r) => { - this.mailAccounts = r.results - this.initialize() - }) - }, - error: (e) => { - this.toastService.showError( - $localize`Error saving account: ${e.toString()}.` - ) - }, + .subscribe((newMailAccount) => { + this.toastService.showInfo( + $localize`Saved account "${newMailAccount.name}".` + ) + this.mailAccountService.clearCache() + this.mailAccountService.listAll().subscribe((r) => { + this.mailAccounts = r.results + this.initialize() + }) + }) + modal.componentInstance.failed + .pipe(takeUntil(this.unsubscribeNotifier)) + .subscribe((e) => { + this.toastService.showError( + $localize`Error saving account.`, + 10000, + JSON.stringify(e) + ) }) } @@ -817,7 +828,9 @@ export class SettingsComponent }, error: (e) => { this.toastService.showError( - $localize`Error deleting mail account: ${e.toString()}.` + $localize`Error deleting mail account.`, + 10000, + JSON.stringify(e) ) }, }) @@ -833,23 +846,23 @@ export class SettingsComponent modal.componentInstance.object = rule modal.componentInstance.succeeded .pipe(takeUntil(this.unsubscribeNotifier)) - .subscribe({ - next: (newMailRule) => { - this.toastService.showInfo( - $localize`Saved rule "${newMailRule.name}".` - ) - this.mailRuleService.clearCache() - this.mailRuleService.listAll().subscribe((r) => { - this.mailRules = r.results + .subscribe((newMailRule) => { + this.toastService.showInfo($localize`Saved rule "${newMailRule.name}".`) + this.mailRuleService.clearCache() + this.mailRuleService.listAll().subscribe((r) => { + this.mailRules = r.results - this.initialize(true) - }) - }, - error: (e) => { - this.toastService.showError( - $localize`Error saving rule: ${e.toString()}.` - ) - }, + this.initialize(true) + }) + }) + modal.componentInstance.failed + .pipe(takeUntil(this.unsubscribeNotifier)) + .subscribe((e) => { + this.toastService.showError( + $localize`Error saving rule.`, + 10000, + JSON.stringify(e) + ) }) } @@ -876,7 +889,9 @@ export class SettingsComponent }, error: (e) => { this.toastService.showError( - $localize`Error deleting mail rule: ${e.toString()}.` + $localize`Error deleting mail rule.`, + 10000, + JSON.stringify(e) ) }, }) diff --git a/src-ui/src/app/services/toast.service.ts b/src-ui/src/app/services/toast.service.ts index 6bd1158bc..2d11d663e 100644 --- a/src-ui/src/app/services/toast.service.ts +++ b/src-ui/src/app/services/toast.service.ts @@ -13,6 +13,8 @@ export interface Toast { actionName?: string classname?: string + + error?: any } @Injectable({ @@ -30,12 +32,13 @@ export class ToastService { this.toastsSubject.next(this.toasts) } - showError(content: string, delay: number = 10000) { + showError(content: string, delay: number = 10000, error: any = null) { this.show({ title: $localize`Error`, content: content, delay: delay, classname: 'error', + error, }) }