A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
Improve frontend error handling
shamoondd575ccb88d0
diff --git a/src-ui/messages.xlf b/src-ui/messages.xlfindex dd49f8306..7bf6dd6b9 100644--- a/src-ui/messages.xlf+++ b/src-ui/messages.xlf@@ -1081,49 +1081,49 @@<source>Create new correspondent</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.ts</context>- <context context-type="linenumber">25</context>+ <context context-type="linenumber">27</context></context-group></trans-unit><trans-unit id="2059822531169388684" datatype="html"><source>Edit correspondent</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.ts</context>- <context context-type="linenumber">29</context>+ <context context-type="linenumber">31</context></context-group></trans-unit><trans-unit id="6672809941092516947" datatype="html"><source>Create new document type</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/document-type-edit-dialog/document-type-edit-dialog.component.ts</context>- <context context-type="linenumber">25</context>+ <context context-type="linenumber">27</context></context-group></trans-unit><trans-unit id="36335016091244220" datatype="html"><source>Edit document type</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/document-type-edit-dialog/document-type-edit-dialog.component.ts</context>- <context context-type="linenumber">29</context>+ <context context-type="linenumber">31</context></context-group></trans-unit><trans-unit id="4561076822163447092" datatype="html"><source>Create new item</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/edit-dialog.component.ts</context>- <context context-type="linenumber">71</context>+ <context context-type="linenumber">83</context></context-group></trans-unit><trans-unit id="5324147361912094446" datatype="html"><source>Edit item</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/edit-dialog.component.ts</context>- <context context-type="linenumber">75</context>+ <context context-type="linenumber">87</context></context-group></trans-unit><trans-unit id="1699589597032579396" datatype="html"><source>Could not save element: <x id="PH" equiv-text="error"/></source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/edit-dialog.component.ts</context>- <context context-type="linenumber">79</context>+ <context context-type="linenumber">91</context></context-group></trans-unit><trans-unit id="7314814725704332646" datatype="html">@@ -1157,14 +1157,14 @@<source>Create new user group</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/group-edit-dialog/group-edit-dialog.component.ts</context>- <context context-type="linenumber">24</context>+ <context context-type="linenumber">26</context></context-group></trans-unit><trans-unit id="200893957904793797" datatype="html"><source>Edit user group</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/group-edit-dialog/group-edit-dialog.component.ts</context>- <context context-type="linenumber">28</context>+ <context context-type="linenumber">30</context></context-group></trans-unit><trans-unit id="1505107477868159986" datatype="html">@@ -1289,49 +1289,49 @@<source>No encryption</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.ts</context>- <context context-type="linenumber">13</context>+ <context context-type="linenumber">14</context></context-group></trans-unit><trans-unit id="3719080555538542367" datatype="html"><source>SSL</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.ts</context>- <context context-type="linenumber">14</context>+ <context context-type="linenumber">15</context></context-group></trans-unit><trans-unit id="2620794666957669114" datatype="html"><source>STARTTLS</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.ts</context>- <context context-type="linenumber">15</context>+ <context context-type="linenumber">16</context></context-group></trans-unit><trans-unit id="8758081884575368561" datatype="html"><source>Create new mail account</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.ts</context>- <context context-type="linenumber">39</context>+ <context context-type="linenumber">41</context></context-group></trans-unit><trans-unit id="5559445021532852612" datatype="html"><source>Edit mail account</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.ts</context>- <context context-type="linenumber">43</context>+ <context context-type="linenumber">45</context></context-group></trans-unit><trans-unit id="7726734777863565313" datatype="html"><source>Successfully connected to the mail server</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.ts</context>- <context context-type="linenumber">88</context>+ <context context-type="linenumber">90</context></context-group></trans-unit><trans-unit id="6533084895896956145" datatype="html"><source>Unable to connect to the mail server</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.ts</context>- <context context-type="linenumber">89</context>+ <context context-type="linenumber">91</context></context-group></trans-unit><trans-unit id="4086606389696938932" datatype="html">@@ -1500,46 +1500,46 @@</context-group><context-group purpose="location"><context context-type="sourcefile">src/app/services/toast.service.ts</context>- <context context-type="linenumber">35</context>+ <context context-type="linenumber">37</context></context-group></trans-unit><trans-unit id="6886003843406464884" datatype="html"><source>Only process attachments</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>- <context context-type="linenumber">26</context>+ <context context-type="linenumber">27</context></context-group><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>- <context context-type="linenumber">37</context>+ <context context-type="linenumber">38</context></context-group></trans-unit><trans-unit id="936923743212522897" datatype="html"><source>Process all files, including 'inline' attachments</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>- <context context-type="linenumber">30</context>+ <context context-type="linenumber">31</context></context-group></trans-unit><trans-unit id="9025522236384167767" datatype="html"><source>Process message as .eml</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>- <context context-type="linenumber">41</context>+ <context context-type="linenumber">42</context></context-group></trans-unit><trans-unit id="7411485377918318115" datatype="html"><source>Process message as .eml and attachments separately</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>- <context context-type="linenumber">45</context>+ <context context-type="linenumber">46</context></context-group></trans-unit><trans-unit id="7022070615528435141" datatype="html"><source>Delete</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>- <context context-type="linenumber">52</context>+ <context context-type="linenumber">53</context></context-group><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/permissions-select/permissions-select.component.html</context>@@ -1587,7 +1587,7 @@</context-group><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/management-list/management-list.component.ts</context>- <context context-type="linenumber">214</context>+ <context context-type="linenumber">193</context></context-group><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/settings/settings.component.html</context>@@ -1614,84 +1614,84 @@<source>Move to specified folder</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>- <context context-type="linenumber">56</context>+ <context context-type="linenumber">57</context></context-group></trans-unit><trans-unit id="4593278936733161020" datatype="html"><source>Mark as read, don't process read mails</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>- <context context-type="linenumber">60</context>+ <context context-type="linenumber">61</context></context-group></trans-unit><trans-unit id="2378921144019636516" datatype="html"><source>Flag the mail, don't process flagged mails</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>- <context context-type="linenumber">64</context>+ <context context-type="linenumber">65</context></context-group></trans-unit><trans-unit id="6457024618858980302" datatype="html"><source>Tag the mail with specified tag, don't process tagged mails</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>- <context context-type="linenumber">68</context>+ <context context-type="linenumber">69</context></context-group></trans-unit><trans-unit id="4673329664686432878" datatype="html"><source>Use subject as title</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>- <context context-type="linenumber">75</context>+ <context context-type="linenumber">76</context></context-group></trans-unit><trans-unit id="8645471396972938185" datatype="html"><source>Use attachment filename as title</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>- <context context-type="linenumber">79</context>+ <context context-type="linenumber">80</context></context-group></trans-unit><trans-unit id="1568902914205618549" datatype="html"><source>Do not assign a correspondent</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>- <context context-type="linenumber">86</context>+ <context context-type="linenumber">87</context></context-group></trans-unit><trans-unit id="3567746385454588269" datatype="html"><source>Use mail address</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>- <context context-type="linenumber">90</context>+ <context context-type="linenumber">91</context></context-group></trans-unit><trans-unit id="445154175758965852" datatype="html"><source>Use name (or mail address if not available)</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>- <context context-type="linenumber">94</context>+ <context context-type="linenumber">95</context></context-group></trans-unit><trans-unit id="1258862217749148424" datatype="html"><source>Use correspondent selected below</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>- <context context-type="linenumber">98</context>+ <context context-type="linenumber">99</context></context-group></trans-unit><trans-unit id="3147349817770432927" datatype="html"><source>Create new mail rule</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>- <context context-type="linenumber">139</context>+ <context context-type="linenumber">141</context></context-group></trans-unit><trans-unit id="3374331029704382439" datatype="html"><source>Edit mail rule</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>- <context context-type="linenumber">143</context>+ <context context-type="linenumber">145</context></context-group></trans-unit><trans-unit id="8911059720204770105" datatype="html">@@ -1709,35 +1709,35 @@<source>e.g.</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.ts</context>- <context context-type="linenumber">26</context>+ <context context-type="linenumber">28</context></context-group></trans-unit><trans-unit id="1918584360573970155" datatype="html"><source>or use slashes to add directories e.g.</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.ts</context>- <context context-type="linenumber">28</context>+ <context context-type="linenumber">30</context></context-group></trans-unit><trans-unit id="7871464228487558644" datatype="html"><source>See <a target="_blank" href="https://docs.paperless-ngx.com/advanced_usage/#file-name-handling">documentation</a> for full list.</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.ts</context>- <context context-type="linenumber">30</context>+ <context context-type="linenumber">32</context></context-group></trans-unit><trans-unit id="6898961890896270754" datatype="html"><source>Create new storage path</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.ts</context>- <context context-type="linenumber">35</context>+ <context context-type="linenumber">37</context></context-group></trans-unit><trans-unit id="3754859110054016570" datatype="html"><source>Edit storage path</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.ts</context>- <context context-type="linenumber">39</context>+ <context context-type="linenumber">41</context></context-group></trans-unit><trans-unit id="9011959596901584887" datatype="html">@@ -1769,14 +1769,14 @@<source>Create new tag</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/tag-edit-dialog/tag-edit-dialog.component.ts</context>- <context context-type="linenumber">26</context>+ <context context-type="linenumber">28</context></context-group></trans-unit><trans-unit id="5872175735754226507" datatype="html"><source>Edit tag</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/tag-edit-dialog/tag-edit-dialog.component.ts</context>- <context context-type="linenumber">30</context>+ <context context-type="linenumber">32</context></context-group></trans-unit><trans-unit id="4768749765465246664" datatype="html">@@ -1840,14 +1840,14 @@<source>Create new user account</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/user-edit-dialog/user-edit-dialog.component.ts</context>- <context context-type="linenumber">42</context>+ <context context-type="linenumber">44</context></context-group></trans-unit><trans-unit id="2887331217965896363" datatype="html"><source>Edit user account</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/edit-dialog/user-edit-dialog/user-edit-dialog.component.ts</context>- <context context-type="linenumber">46</context>+ <context context-type="linenumber">48</context></context-group></trans-unit><trans-unit id="1616102757855967475" datatype="html">@@ -1912,7 +1912,7 @@<source>Not assigned</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/filterable-dropdown/filterable-dropdown.component.ts</context>- <context context-type="linenumber">336</context>+ <context context-type="linenumber">337</context></context-group><note priority="1" from="description">Filter drop down element to filter for documents with no correspondent/type/tag assigned</note></trans-unit>@@ -2185,7 +2185,7 @@<source>Inherited from group</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/common/permissions-select/permissions-select.component.ts</context>- <context context-type="linenumber">62</context>+ <context context-type="linenumber">61</context></context-group></trans-unit><trans-unit id="3797570084942068182" datatype="html">@@ -2757,89 +2757,91 @@<source>An error occurred loading content: <x id="PH" equiv-text="err.message ?? err.toString()"/></source><context-group purpose="location"><context context-type="sourcefile">src/app/components/document-detail/document-detail.component.ts</context>- <context context-type="linenumber">226,228</context>+ <context context-type="linenumber">234,236</context></context-group></trans-unit><trans-unit id="5758784066858623886" datatype="html"><source>Error retrieving metadata</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/document-detail/document-detail.component.ts</context>- <context context-type="linenumber">369</context>+ <context context-type="linenumber">377</context></context-group></trans-unit>- <trans-unit id="2374084708811774419" datatype="html">- <source>Error retrieving suggestions</source>+ <trans-unit id="2891233809840748209" datatype="html">+ <source>Error retrieving suggestions: <x id="PH" equiv-text="JSON.stringify(+ error+ ).slice(0, 500)"/></source><context-group purpose="location"><context context-type="sourcefile">src/app/components/document-detail/document-detail.component.ts</context>- <context context-type="linenumber">389</context>+ <context context-type="linenumber">397,399</context></context-group></trans-unit><trans-unit id="8348337312757497317" datatype="html"><source>Document saved successfully.</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/document-detail/document-detail.component.ts</context>- <context context-type="linenumber">499</context>+ <context context-type="linenumber">509</context></context-group><context-group purpose="location"><context context-type="sourcefile">src/app/components/document-detail/document-detail.component.ts</context>- <context context-type="linenumber">507</context>+ <context context-type="linenumber">517</context></context-group></trans-unit><trans-unit id="448882439049417053" datatype="html"><source>Error saving document</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/document-detail/document-detail.component.ts</context>- <context context-type="linenumber">512</context>+ <context context-type="linenumber">522</context></context-group><context-group purpose="location"><context context-type="sourcefile">src/app/components/document-detail/document-detail.component.ts</context>- <context context-type="linenumber">557</context>+ <context context-type="linenumber">567</context></context-group></trans-unit><trans-unit id="9021887951960049161" datatype="html"><source>Confirm delete</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/document-detail/document-detail.component.ts</context>- <context context-type="linenumber">586</context>+ <context context-type="linenumber">596</context></context-group><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/management-list/management-list.component.ts</context>- <context context-type="linenumber">210</context>+ <context context-type="linenumber">189</context></context-group></trans-unit><trans-unit id="5382975254277698192" datatype="html"><source>Do you really want to delete document "<x id="PH" equiv-text="this.document.title"/>"?</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/document-detail/document-detail.component.ts</context>- <context context-type="linenumber">587</context>+ <context context-type="linenumber">597</context></context-group></trans-unit><trans-unit id="6691075929777935948" datatype="html"><source>The files for this document will be deleted permanently. This operation cannot be undone.</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/document-detail/document-detail.component.ts</context>- <context context-type="linenumber">588</context>+ <context context-type="linenumber">598</context></context-group></trans-unit><trans-unit id="719892092227206532" datatype="html"><source>Delete document</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/document-detail/document-detail.component.ts</context>- <context context-type="linenumber">590</context>+ <context context-type="linenumber">600</context></context-group></trans-unit><trans-unit id="1844801255494293730" datatype="html"><source>Error deleting document: <x id="PH" equiv-text="error.error?.detail ?? error.message ?? JSON.stringify(error)"/></source><context-group purpose="location"><context context-type="sourcefile">src/app/components/document-detail/document-detail.component.ts</context>- <context context-type="linenumber">610,612</context>+ <context context-type="linenumber">620,622</context></context-group></trans-unit><trans-unit id="7362691899087997122" datatype="html"><source>Redo OCR confirm</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/document-detail/document-detail.component.ts</context>- <context context-type="linenumber">633</context>+ <context context-type="linenumber">643</context></context-group><context-group purpose="location"><context context-type="sourcefile">src/app/components/document-list/bulk-editor/bulk-editor.component.ts</context>@@ -2850,14 +2852,14 @@<source>This operation will permanently redo OCR for this document.</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/document-detail/document-detail.component.ts</context>- <context context-type="linenumber">634</context>+ <context context-type="linenumber">644</context></context-group></trans-unit><trans-unit id="5641451190833696892" datatype="html"><source>This operation cannot be undone.</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/document-detail/document-detail.component.ts</context>- <context context-type="linenumber">635</context>+ <context context-type="linenumber">645</context></context-group><context-group purpose="location"><context context-type="sourcefile">src/app/components/document-list/bulk-editor/bulk-editor.component.ts</context>@@ -2869,26 +2871,26 @@</context-group><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>- <context context-type="linenumber">688</context>+ <context context-type="linenumber">691</context></context-group><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>- <context context-type="linenumber">742</context>+ <context context-type="linenumber">749</context></context-group><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>- <context context-type="linenumber">803</context>+ <context context-type="linenumber">814</context></context-group><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>- <context context-type="linenumber">862</context>+ <context context-type="linenumber">875</context></context-group></trans-unit><trans-unit id="1181910457994920507" datatype="html"><source>Proceed</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/document-detail/document-detail.component.ts</context>- <context context-type="linenumber">637</context>+ <context context-type="linenumber">647</context></context-group><context-group purpose="location"><context context-type="sourcefile">src/app/components/document-list/bulk-editor/bulk-editor.component.ts</context>@@ -2896,26 +2898,26 @@</context-group><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>- <context context-type="linenumber">690</context>+ <context context-type="linenumber">693</context></context-group><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>- <context context-type="linenumber">744</context>+ <context context-type="linenumber">751</context></context-group><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>- <context context-type="linenumber">805</context>+ <context context-type="linenumber">816</context></context-group><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>- <context context-type="linenumber">864</context>+ <context context-type="linenumber">877</context></context-group></trans-unit><trans-unit id="5729001209753056399" datatype="html"><source>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.</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/document-detail/document-detail.component.ts</context>- <context context-type="linenumber">645</context>+ <context context-type="linenumber">655</context></context-group></trans-unit><trans-unit id="8008978164775353960" datatype="html">@@ -2924,7 +2926,7 @@)"/></source><context-group purpose="location"><context context-type="sourcefile">src/app/components/document-detail/document-detail.component.ts</context>- <context context-type="linenumber">656,658</context>+ <context context-type="linenumber">666,668</context></context-group></trans-unit><trans-unit id="6857598786757174736" datatype="html">@@ -4002,57 +4004,46 @@<context context-type="linenumber">45</context></context-group></trans-unit>- <trans-unit id="6328828522970676938" datatype="html">- <source>Error occurred while creating <x id="PH" equiv-text="this.typeName"/> : <x id="PH_1" equiv-text="activeModal.componentInstance.error"/>.</source>- <context-group purpose="location">- <context context-type="sourcefile">src/app/components/manage/management-list/management-list.component.ts</context>- <context context-type="linenumber">143</context>- </context-group>- <context-group purpose="location">- <context context-type="sourcefile">src/app/components/manage/management-list/management-list.component.ts</context>- <context context-type="linenumber">154,156</context>- </context-group>- </trans-unit><trans-unit id="211408744872436427" datatype="html"><source>Successfully created <x id="PH" equiv-text="this.typeName"/>.</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/management-list/management-list.component.ts</context>- <context context-type="linenumber">148</context>+ <context context-type="linenumber">142</context></context-group></trans-unit>- <trans-unit id="1370653329436185913" datatype="html">- <source>Error occurred while saving <x id="PH" equiv-text="this.typeName"/><x id="PH_1" equiv-text="errorDetail ? ': ' + errorDetail : ''"/>.</source>+ <trans-unit id="3928835053823658072" datatype="html">+ <source>Error occurred while creating <x id="PH" equiv-text="this.typeName"/>.</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/management-list/management-list.component.ts</context>- <context context-type="linenumber">175,177</context>+ <context context-type="linenumber">147</context></context-group></trans-unit><trans-unit id="2541368547549828690" datatype="html"><source>Successfully updated <x id="PH" equiv-text="this.typeName"/>.</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/management-list/management-list.component.ts</context>- <context context-type="linenumber">182</context>+ <context context-type="linenumber">163</context></context-group></trans-unit>- <trans-unit id="6151710751857751783" datatype="html">- <source>Error occurred while saving <x id="PH" equiv-text="this.typeName"/> : <x id="PH_1" equiv-text="e.toString()"/>.</source>+ <trans-unit id="6442673774206210733" datatype="html">+ <source>Error occurred while saving <x id="PH" equiv-text="this.typeName"/>.</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/management-list/management-list.component.ts</context>- <context context-type="linenumber">188,190</context>+ <context context-type="linenumber">168</context></context-group></trans-unit><trans-unit id="4012132330507560812" datatype="html"><source>Do you really want to delete the <x id="PH" equiv-text="this.typeName"/>?</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/management-list/management-list.component.ts</context>- <context context-type="linenumber">197</context>+ <context context-type="linenumber">176</context></context-group></trans-unit><trans-unit id="8371896857609524947" datatype="html"><source>Associated documents will not be deleted.</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/management-list/management-list.component.ts</context>- <context context-type="linenumber">212</context>+ <context context-type="linenumber">191</context></context-group></trans-unit><trans-unit id="5467489005440577210" datatype="html">@@ -4061,7 +4052,7 @@)"/></source><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/management-list/management-list.component.ts</context>- <context context-type="linenumber">225,227</context>+ <context context-type="linenumber">204,206</context></context-group></trans-unit><trans-unit id="1685061484835793745" datatype="html">@@ -4351,11 +4342,11 @@<context context-type="linenumber">195</context></context-group></trans-unit>- <trans-unit id="6925788033494878061" datatype="html">- <source>Appears on</source>+ <trans-unit id="9187755754633397589" datatype="html">+ <source> <x id="START_TAG_SPAN" ctype="x-span" equiv-text="<span class="visually-hidden">"/>Appears on<x id="CLOSE_TAG_SPAN" ctype="x-span" equiv-text="</span>"/></source><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/settings/settings.component.html</context>- <context context-type="linenumber">209</context>+ <context context-type="linenumber">209,210</context></context-group></trans-unit><trans-unit id="7877440816920439876" datatype="html">@@ -4481,23 +4472,21 @@<source>Use system language</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>- <context context-type="linenumber">601</context>+ <context context-type="linenumber">602</context></context-group></trans-unit><trans-unit id="7729897675462249787" datatype="html"><source>Use date format of display language</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>- <context context-type="linenumber">608</context>+ <context context-type="linenumber">609</context></context-group></trans-unit>- <trans-unit id="8488620293789898901" datatype="html">- <source>Error while storing settings on server: <x id="PH" equiv-text="JSON.stringify(- error.error- )"/></source>+ <trans-unit id="5260584511980773458" datatype="html">+ <source>Error while storing settings on server.</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>- <context context-type="linenumber">628,630</context>+ <context context-type="linenumber">629</context></context-group></trans-unit><trans-unit id="4510369340305901516" datatype="html">@@ -4514,165 +4503,165 @@<context context-type="linenumber">666</context></context-group></trans-unit>- <trans-unit id="1417528376639710155" datatype="html">- <source>Error saving user: <x id="PH" equiv-text="e.toString()"/>.</source>+ <trans-unit id="3471101514724661554" datatype="html">+ <source>Error saving user.</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>- <context context-type="linenumber">676</context>+ <context context-type="linenumber">678</context></context-group></trans-unit><trans-unit id="5565868288871970148" datatype="html"><source>Confirm delete user account</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>- <context context-type="linenumber">686</context>+ <context context-type="linenumber">689</context></context-group></trans-unit><trans-unit id="8133663925694885325" datatype="html"><source>This operation will permanently delete this user account.</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>- <context context-type="linenumber">687</context>+ <context context-type="linenumber">690</context></context-group></trans-unit><trans-unit id="857903183180440990" datatype="html"><source>Deleted user</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>- <context context-type="linenumber">696</context>+ <context context-type="linenumber">699</context></context-group></trans-unit>- <trans-unit id="48515337028145748" datatype="html">- <source>Error deleting user: <x id="PH" equiv-text="e.toString()"/>.</source>+ <trans-unit id="1942566571910298572" datatype="html">+ <source>Error deleting user.</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>- <context context-type="linenumber">704</context>+ <context context-type="linenumber">707</context></context-group></trans-unit><trans-unit id="5766640174051730159" datatype="html"><source>Saved group "<x id="PH" equiv-text="newGroup.name"/>".</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>- <context context-type="linenumber">722</context>+ <context context-type="linenumber">726</context></context-group></trans-unit>- <trans-unit id="6311554806836269999" datatype="html">- <source>Error saving group: <x id="PH" equiv-text="e.toString()"/>.</source>+ <trans-unit id="8382042988405122578" datatype="html">+ <source>Error saving group.</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>- <context context-type="linenumber">730</context>+ <context context-type="linenumber">736</context></context-group></trans-unit><trans-unit id="6538873300613683004" datatype="html"><source>Confirm delete user group</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>- <context context-type="linenumber">740</context>+ <context context-type="linenumber">747</context></context-group></trans-unit><trans-unit id="7710984639498518244" datatype="html"><source>This operation will permanently delete this user group.</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>- <context context-type="linenumber">741</context>+ <context context-type="linenumber">748</context></context-group></trans-unit><trans-unit id="6834066329827670963" datatype="html"><source>Deleted group</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>- <context context-type="linenumber">750</context>+ <context context-type="linenumber">757</context></context-group></trans-unit>- <trans-unit id="6654036276412987870" datatype="html">- <source>Error deleting group: <x id="PH" equiv-text="e.toString()"/>.</source>+ <trans-unit id="8850738980935204840" datatype="html">+ <source>Error deleting group.</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>- <context context-type="linenumber">758</context>+ <context context-type="linenumber">765</context></context-group></trans-unit><trans-unit id="6327501535846658797" datatype="html"><source>Saved account "<x id="PH" equiv-text="newMailAccount.name"/>".</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>- <context context-type="linenumber">781</context>+ <context context-type="linenumber">789</context></context-group></trans-unit>- <trans-unit id="6428427497555765743" datatype="html">- <source>Error saving account: <x id="PH" equiv-text="e.toString()"/>.</source>+ <trans-unit id="8067594003836508139" datatype="html">+ <source>Error saving account.</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>- <context context-type="linenumber">791</context>+ <context context-type="linenumber">801</context></context-group></trans-unit><trans-unit id="5641934153807844674" datatype="html"><source>Confirm delete mail account</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>- <context context-type="linenumber">801</context>+ <context context-type="linenumber">812</context></context-group></trans-unit><trans-unit id="7176985344323395435" datatype="html"><source>This operation will permanently delete this mail account.</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>- <context context-type="linenumber">802</context>+ <context context-type="linenumber">813</context></context-group></trans-unit><trans-unit id="4233826387148482123" datatype="html"><source>Deleted mail account</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>- <context context-type="linenumber">811</context>+ <context context-type="linenumber">822</context></context-group></trans-unit>- <trans-unit id="7443801450153832973" datatype="html">- <source>Error deleting mail account: <x id="PH" equiv-text="e.toString()"/>.</source>+ <trans-unit id="6202503362522392111" datatype="html">+ <source>Error deleting mail account.</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>- <context context-type="linenumber">820</context>+ <context context-type="linenumber">831</context></context-group></trans-unit><trans-unit id="123368655395433699" datatype="html"><source>Saved rule "<x id="PH" equiv-text="newMailRule.name"/>".</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>- <context context-type="linenumber">839</context>+ <context context-type="linenumber">850</context></context-group></trans-unit>- <trans-unit id="4741216051394823471" datatype="html">- <source>Error saving rule: <x id="PH" equiv-text="e.toString()"/>.</source>+ <trans-unit id="8951124554918814321" datatype="html">+ <source>Error saving rule.</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>- <context context-type="linenumber">850</context>+ <context context-type="linenumber">862</context></context-group></trans-unit><trans-unit id="3896080636020672118" datatype="html"><source>Confirm delete mail rule</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>- <context context-type="linenumber">860</context>+ <context context-type="linenumber">873</context></context-group></trans-unit><trans-unit id="2250372580580310337" datatype="html"><source>This operation will permanently delete this mail rule.</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>- <context context-type="linenumber">861</context>+ <context context-type="linenumber">874</context></context-group></trans-unit><trans-unit id="9077981247971516916" datatype="html"><source>Deleted mail rule</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>- <context context-type="linenumber">870</context>+ <context context-type="linenumber">883</context></context-group></trans-unit>- <trans-unit id="4740074357089345173" datatype="html">- <source>Error deleting mail rule: <x id="PH" equiv-text="e.toString()"/>.</source>+ <trans-unit id="2033194641751367552" datatype="html">+ <source>Error deleting mail rule.</source><context-group purpose="location"><context context-type="sourcefile">src/app/components/manage/settings/settings.component.ts</context>- <context context-type="linenumber">879</context>+ <context context-type="linenumber">892</context></context-group></trans-unit><trans-unit id="5101757640976222639" datatype="html">@@ -5373,7 +5362,7 @@<source>Information</source><context-group purpose="location"><context context-type="sourcefile">src/app/services/toast.service.ts</context>- <context context-type="linenumber">43</context>+ <context context-type="linenumber">46</context></context-group></trans-unit><trans-unit id="3852289441366561594" datatype="html">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.tsindex 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 = falsecloseEnabled = false@@ -141,7 +144,7 @@ export abstract class EditDialogComponent<error: (error) => {this.error = error.errorthis.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.htmlindex 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)"><p>{{toast.content}}</p>+ <details *ngIf="toast.error">+ <pre class="p-2 m-0 bg-light text-dark">+ {{toast.error}}+ </pre>+ </details><p class="mb-0" *ngIf="toast.action"><button class="btn btn-sm btn-outline-secondary" (click)="toastService.closeToast(toast); toast.action()">{{toast.actionName}}</button></p></ngb-toast>diff --git a/src-ui/src/app/components/common/toasts/toasts.component.scss b/src-ui/src/app/components/common/toasts/toasts.component.scssindex 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.tsindex 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<T extends ObjectWithId>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<T extends ObjectWithId>})activeModal.componentInstance.object = objectactiveModal.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.tsindex 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 SettingsComponentmodal.componentInstance.object = usermodal.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 SettingsComponentmodal.componentInstance.object = groupmodal.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 SettingsComponentmodal.componentInstance.object = accountmodal.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 SettingsComponentmodal.componentInstance.object = rulemodal.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.tsindex 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?: stringclassname?: 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,})}