diff --git a/src-ui/messages.xlf b/src-ui/messages.xlf index cd59c7f79..999413c35 100644 --- a/src-ui/messages.xlf +++ b/src-ui/messages.xlf @@ -255,19 +255,19 @@ src/app/components/admin/trash/trash.component.ts - 118 + 127 src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html - 50 + 43 src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html - 53 + 46 src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html - 56 + 49 src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.html @@ -327,7 +327,7 @@ src/app/components/manage/custom-fields/custom-fields.component.html - 54 + 61 src/app/components/manage/management-list/management-list.component.html @@ -594,10 +594,6 @@ src/app/components/document-detail/document-detail.component.html 341 - - src/app/components/document-list/bulk-editor/custom-fields-bulk-edit-dialog/custom-fields-bulk-edit-dialog.component.html - 79 - src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.html 21 @@ -732,10 +728,6 @@ src/app/components/common/system-status-dialog/system-status-dialog.component.html 10 - - src/app/components/dashboard/dashboard.component.html - 21 - src/app/components/dashboard/widgets/widget-frame/widget-frame.component.html 14 @@ -748,9 +740,21 @@ src/app/components/document-list/document-list.component.html 110 + + src/app/components/manage/custom-fields/custom-fields.component.html + 26 + src/app/components/manage/mail/mail.component.html - 164 + 40 + + + src/app/components/manage/mail/mail.component.html + 114 + + + src/app/components/manage/mail/mail.component.html + 178 src/app/components/manage/management-list/management-list.component.html @@ -772,6 +776,10 @@ src/app/components/manage/saved-views/saved-views.component.html 68 + + src/app/components/manage/workflows/workflows.component.html + 28 + Options to customize appearance, notifications and more. Settings apply to the <strong>current user only</strong>. @@ -1153,7 +1161,7 @@ src/app/components/document-list/bulk-editor/bulk-editor.component.html - 104 + 101 src/app/components/document-list/filter-editor/filter-editor.component.html @@ -1161,19 +1169,19 @@ src/app/components/manage/mail/mail.component.html - 59 + 66 src/app/components/manage/mail/mail.component.html - 69 + 76 src/app/components/manage/mail/mail.component.html - 126 + 140 src/app/components/manage/mail/mail.component.html - 138 + 152 src/app/components/manage/management-list/management-list.component.html @@ -1442,10 +1450,6 @@ src/app/components/document-list/bulk-editor/bulk-editor.component.html 4 - - src/app/components/document-list/bulk-editor/custom-fields-bulk-edit-dialog/custom-fields-bulk-edit-dialog.component.html - 77 - src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.html 20 @@ -1644,7 +1648,7 @@ src/app/components/manage/mail/mail.component.html - 96 + 103 src/app/components/manage/management-list/management-list.component.html @@ -1752,7 +1756,7 @@ src/app/components/document-list/bulk-editor/bulk-editor.component.html - 110 + 107 src/app/components/manage/custom-fields/custom-fields.component.html @@ -1764,7 +1768,7 @@ src/app/components/manage/mail/mail.component.html - 100 + 107 src/app/components/manage/management-list/management-list.component.html @@ -2001,11 +2005,11 @@ src/app/components/admin/trash/trash.component.ts - 59 + 68 src/app/components/admin/trash/trash.component.ts - 88 + 97 src/app/components/admin/users-groups/users-groups.component.html @@ -2045,32 +2049,32 @@ src/app/components/document-list/bulk-editor/bulk-editor.component.html - 164 + 161 src/app/components/manage/custom-fields/custom-fields.component.html - 36 + 43 src/app/components/manage/custom-fields/custom-fields.component.html - 48 + 55 src/app/components/manage/mail/mail.component.html - 60 + 67 src/app/components/manage/mail/mail.component.html - 72 - - - src/app/components/manage/mail/mail.component.html - 127 + 79 src/app/components/manage/mail/mail.component.html 141 + + src/app/components/manage/mail/mail.component.html + 155 + src/app/components/manage/management-list/management-list.component.html 9 @@ -2121,7 +2125,7 @@ src/app/components/manage/management-list/management-list.component.ts - 210 + 225 src/app/components/manage/saved-views/saved-views.component.html @@ -2129,11 +2133,11 @@ src/app/components/manage/workflows/workflows.component.html - 48 + 55 src/app/components/manage/workflows/workflows.component.html - 59 + 66 @@ -2147,37 +2151,37 @@ Confirm delete src/app/components/admin/trash/trash.component.ts - 55 + 64 src/app/components/admin/trash/trash.component.ts - 82 + 91 src/app/components/manage/management-list/management-list.component.ts - 206 + 221 src/app/components/manage/management-list/management-list.component.ts - 323 + 338 This operation will permanently delete this document. src/app/components/admin/trash/trash.component.ts - 56 + 65 This operation cannot be undone. src/app/components/admin/trash/trash.component.ts - 57 + 66 src/app/components/admin/trash/trash.component.ts - 86 + 95 src/app/components/admin/users-groups/users-groups.component.ts @@ -2189,37 +2193,37 @@ src/app/components/manage/custom-fields/custom-fields.component.ts - 83 + 93 src/app/components/manage/mail/mail.component.ts - 158 + 179 src/app/components/manage/mail/mail.component.ts - 238 + 259 src/app/components/manage/management-list/management-list.component.ts - 325 + 340 src/app/components/manage/workflows/workflows.component.ts - 115 + 124 Document deleted src/app/components/admin/trash/trash.component.ts - 66 + 75 Error deleting document src/app/components/admin/trash/trash.component.ts - 71 + 80 src/app/components/document-detail/document-detail.component.ts @@ -2230,56 +2234,56 @@ This operation will permanently delete the selected documents. src/app/components/admin/trash/trash.component.ts - 84 + 93 This operation will permanently delete all documents in the trash. src/app/components/admin/trash/trash.component.ts - 85 + 94 Document(s) deleted src/app/components/admin/trash/trash.component.ts - 96 + 105 Error deleting document(s) src/app/components/admin/trash/trash.component.ts - 103 + 112 Document restored src/app/components/admin/trash/trash.component.ts - 116 + 125 Error restoring document src/app/components/admin/trash/trash.component.ts - 126 + 135 Document(s) restored src/app/components/admin/trash/trash.component.ts - 136 + 145 Error restoring document(s) src/app/components/admin/trash/trash.component.ts - 142 + 151 @@ -2372,27 +2376,27 @@ src/app/components/manage/custom-fields/custom-fields.component.html - 35 + 42 src/app/components/manage/custom-fields/custom-fields.component.html - 45 + 52 src/app/components/manage/mail/mail.component.html - 58 + 65 src/app/components/manage/mail/mail.component.html - 66 + 73 src/app/components/manage/mail/mail.component.html - 125 + 139 src/app/components/manage/mail/mail.component.html - 135 + 149 src/app/components/manage/management-list/management-list.component.html @@ -2428,11 +2432,11 @@ src/app/components/manage/workflows/workflows.component.html - 47 + 54 src/app/components/manage/workflows/workflows.component.html - 56 + 63 @@ -2516,35 +2520,35 @@ src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 759 + 758 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 792 + 791 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 811 + 810 src/app/components/manage/custom-fields/custom-fields.component.ts - 85 + 95 src/app/components/manage/mail/mail.component.ts - 160 + 181 src/app/components/manage/mail/mail.component.ts - 240 + 261 src/app/components/manage/management-list/management-list.component.ts - 327 + 342 src/app/components/manage/workflows/workflows.component.ts - 117 + 126 @@ -2923,7 +2927,7 @@ src/app/components/document-list/document-card-small/document-card-small.component.html - 142 + 143 @@ -2941,7 +2945,7 @@ src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html - 92 + 80 src/app/components/document-detail/document-detail.component.html @@ -2949,7 +2953,7 @@ src/app/components/document-list/bulk-editor/bulk-editor.component.html - 136 + 133 src/app/components/document-list/document-card-large/document-card-large.component.html @@ -2957,7 +2961,7 @@ src/app/components/document-list/document-card-small/document-card-small.component.html - 148 + 149 @@ -3110,27 +3114,27 @@ src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 402 + 401 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 442 + 441 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 480 + 479 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 518 + 517 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 580 + 579 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 713 + 712 @@ -3271,7 +3275,7 @@ src/app/components/manage/custom-fields/custom-fields.component.ts - 65 + 75 @@ -3282,7 +3286,7 @@ src/app/components/manage/custom-fields/custom-fields.component.ts - 73 + 83 @@ -3766,7 +3770,7 @@ src/app/components/manage/mail/mail.component.html - 98 + 105 @@ -3788,11 +3792,11 @@ src/app/components/manage/mail/mail.component.html - 114 + 128 src/app/components/manage/workflows/workflows.component.html - 34 + 41 @@ -4950,7 +4954,7 @@ Click again to exclude items. src/app/components/common/filterable-dropdown/filterable-dropdown.component.html - 77 + 71 @@ -4965,7 +4969,7 @@ Open filter src/app/components/common/filterable-dropdown/filterable-dropdown.component.ts - 492 + 486 @@ -5389,19 +5393,19 @@ src/app/components/manage/mail/mail.component.html - 128 + 142 src/app/components/manage/mail/mail.component.html - 146 + 160 src/app/components/manage/workflows/workflows.component.html - 49 + 56 src/app/components/manage/workflows/workflows.component.html - 64 + 71 @@ -5795,7 +5799,7 @@ src/app/components/manage/mail/mail.component.html - 99 + 106 src/app/components/manage/workflows/workflows.component.html @@ -5929,7 +5933,7 @@ Filter by correspondent src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html - 60 + 53 src/app/components/document-list/document-card-large/document-card-large.component.html @@ -5944,7 +5948,7 @@ Filter by document type src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html - 70 + 63 src/app/components/document-list/document-card-large/document-card-large.component.html @@ -5959,7 +5963,7 @@ Filter by storage path src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html - 75 + 68 src/app/components/document-list/document-card-large/document-card-large.component.html @@ -5970,18 +5974,11 @@ 336 - - View Preview - - src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html - 84 - - No documents src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html - 144 + 125 @@ -6106,7 +6103,7 @@ src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 347 + 346 this string is used to separate processing, failed and added on the file upload widget @@ -6181,7 +6178,7 @@ src/app/components/document-list/bulk-editor/bulk-editor.component.html - 114 + 111 @@ -6210,7 +6207,7 @@ src/app/components/document-list/bulk-editor/bulk-editor.component.html - 117 + 114 @@ -6636,7 +6633,7 @@ src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 715 + 714 @@ -6647,7 +6644,7 @@ src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 717 + 716 @@ -6658,7 +6655,7 @@ src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 755 + 754 @@ -6732,7 +6729,7 @@ src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 789 + 788 @@ -6882,75 +6879,64 @@ 83 - - Set values - - src/app/components/document-list/bulk-editor/bulk-editor.component.html - 93 - - Merge src/app/components/document-list/bulk-editor/bulk-editor.component.html - 120 + 117 Include: src/app/components/document-list/bulk-editor/bulk-editor.component.html - 142 + 139 Archived files src/app/components/document-list/bulk-editor/bulk-editor.component.html - 146 + 143 Original files src/app/components/document-list/bulk-editor/bulk-editor.component.html - 150 + 147 Use formatted filename src/app/components/document-list/bulk-editor/bulk-editor.component.html - 155 + 152 Error executing bulk operation src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 251 - - - src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 859 + 250 "" src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 339 + 338 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 345 + 344 "" and "" src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 341 + 340 This is for messages like 'modify "tag1" and "tag2"' @@ -6958,7 +6944,7 @@ and "" src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 349,351 + 348,350 this is for messages like 'modify "tag1", "tag2" and "tag3"' @@ -6966,14 +6952,14 @@ Confirm tags assignment src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 366 + 365 This operation will add the tag "" to selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 372 + 371 @@ -6982,14 +6968,14 @@ )"/> to selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 377,379 + 376,378 This operation will remove the tag "" from selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 385 + 384 @@ -6998,7 +6984,7 @@ )"/> from selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 390,392 + 389,391 @@ -7009,84 +6995,84 @@ )"/> on selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 394,398 + 393,397 Confirm correspondent assignment src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 435 + 434 This operation will assign the correspondent "" to selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 437 + 436 This operation will remove the correspondent from selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 439 + 438 Confirm document type assignment src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 473 + 472 This operation will assign the document type "" to selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 475 + 474 This operation will remove the document type from selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 477 + 476 Confirm storage path assignment src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 511 + 510 This operation will assign the storage path "" to selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 513 + 512 This operation will remove the storage path from selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 515 + 514 Confirm custom field assignment src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 544 + 543 This operation will assign the custom field "" to selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 550 + 549 @@ -7095,14 +7081,14 @@ )"/> to selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 555,557 + 554,556 This operation will remove the custom field "" from selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 563 + 562 @@ -7111,7 +7097,7 @@ )"/> from selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 568,570 + 567,569 @@ -7122,85 +7108,56 @@ )"/> on selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 572,576 + 571,575 Move selected document(s) to the trash? src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 714 + 713 This operation will permanently recreate the archive files for selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 756 + 755 The archive files will be re-generated with the current settings. src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 757 + 756 This operation will permanently rotate the original version of document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 790 + 789 Merge confirm src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 809 + 808 This operation will merge selected documents into a new document. src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 810 + 809 Merged document will be queued for consumption. src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 826 - - - - Bulk operation executed successfully - - src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 849 - - - - {VAR_PLURAL, plural, =1 {Set custom fields for 1 document} other {Set custom fields for documents}} - - src/app/components/document-list/bulk-editor/custom-fields-bulk-edit-dialog/custom-fields-bulk-edit-dialog.component.html - 3,7 - - - - Select custom fields - - src/app/components/document-list/bulk-editor/custom-fields-bulk-edit-dialog/custom-fields-bulk-edit-dialog.component.html - 13 - - - - {VAR_PLURAL, plural, =1 {This operation will also remove 1 custom field from the selected documents.} other {This operation will also - remove custom fields from the selected documents.}} - - src/app/components/document-list/bulk-editor/custom-fields-bulk-edit-dialog/custom-fields-bulk-edit-dialog.component.html - 69,74 + 825 @@ -7229,11 +7186,11 @@ src/app/components/document-list/document-card-small/document-card-small.component.html - 75,76 + 76,77 src/app/components/document-list/document-card-small/document-card-small.component.html - 90,91 + 91,92 @@ -7244,11 +7201,11 @@ src/app/components/document-list/document-card-small/document-card-small.component.html - 76,77 + 77,78 src/app/components/document-list/document-card-small/document-card-small.component.html - 91,92 + 92,93 @@ -7259,11 +7216,11 @@ src/app/components/document-list/document-card-small/document-card-small.component.html - 77,78 + 78,79 src/app/components/document-list/document-card-small/document-card-small.component.html - 92,93 + 93,94 @@ -7274,7 +7231,7 @@ src/app/components/document-list/document-card-small/document-card-small.component.html - 105 + 106 @@ -7285,7 +7242,7 @@ src/app/components/document-list/document-card-small/document-card-small.component.html - 124 + 125 src/app/data/document.ts @@ -7314,21 +7271,21 @@ Toggle correspondent filter src/app/components/document-list/document-card-small/document-card-small.component.html - 42 + 43 Toggle document type filter src/app/components/document-list/document-card-small/document-card-small.component.html - 58 + 59 Toggle storage path filter src/app/components/document-list/document-card-small/document-card-small.component.html - 65 + 66 @@ -7914,28 +7871,28 @@ correspondent src/app/components/manage/correspondent-list/correspondent-list.component.ts - 40 + 39 correspondents src/app/components/manage/correspondent-list/correspondent-list.component.ts - 41 + 40 Last used src/app/components/manage/correspondent-list/correspondent-list.component.ts - 46 + 45 Do you really want to delete the correspondent ""? src/app/components/manage/correspondent-list/correspondent-list.component.ts - 89 + 71 @@ -7963,7 +7920,7 @@ Filter Documents () src/app/components/manage/custom-fields/custom-fields.component.html - 38 + 45 src/app/components/manage/management-list/management-list.component.html @@ -7986,35 +7943,35 @@ No fields defined. src/app/components/manage/custom-fields/custom-fields.component.html - 63 + 70 Confirm delete field src/app/components/manage/custom-fields/custom-fields.component.ts - 81 + 91 This operation will permanently delete this field. src/app/components/manage/custom-fields/custom-fields.component.ts - 82 + 92 Deleted field src/app/components/manage/custom-fields/custom-fields.component.ts - 91 + 101 Error deleting field. src/app/components/manage/custom-fields/custom-fields.component.ts - 97 + 107 @@ -8084,197 +8041,197 @@ No mail accounts defined. src/app/components/manage/mail/mail.component.html - 80 + 87 Mail rules src/app/components/manage/mail/mail.component.html - 88 + 95 Add Rule src/app/components/manage/mail/mail.component.html - 90 + 97 Sort Order src/app/components/manage/mail/mail.component.html - 97 + 104 Disabled src/app/components/manage/mail/mail.component.html - 114 + 128 src/app/components/manage/workflows/workflows.component.html - 34 + 41 No mail rules defined. src/app/components/manage/mail/mail.component.html - 155 + 169 Error retrieving mail accounts src/app/components/manage/mail/mail.component.ts - 79 + 92 Error retrieving mail rules src/app/components/manage/mail/mail.component.ts - 93 + 114 OAuth2 authentication success src/app/components/manage/mail/mail.component.ts - 101 + 122 OAuth2 authentication failed, see logs for details src/app/components/manage/mail/mail.component.ts - 112 + 133 Saved account "". src/app/components/manage/mail/mail.component.ts - 136 + 157 Error saving account. src/app/components/manage/mail/mail.component.ts - 148 + 169 Confirm delete mail account src/app/components/manage/mail/mail.component.ts - 156 + 177 This operation will permanently delete this mail account. src/app/components/manage/mail/mail.component.ts - 157 + 178 Deleted mail account src/app/components/manage/mail/mail.component.ts - 166 + 187 Error deleting mail account. src/app/components/manage/mail/mail.component.ts - 176 + 197 Saved rule "". src/app/components/manage/mail/mail.component.ts - 195 + 216 Error saving rule. src/app/components/manage/mail/mail.component.ts - 206 + 227 Rule "" enabled. src/app/components/manage/mail/mail.component.ts - 222 + 243 Rule "" disabled. src/app/components/manage/mail/mail.component.ts - 223 + 244 Error toggling rule. src/app/components/manage/mail/mail.component.ts - 227 + 248 Confirm delete mail rule src/app/components/manage/mail/mail.component.ts - 236 + 257 This operation will permanently delete this mail rule. src/app/components/manage/mail/mail.component.ts - 237 + 258 Deleted mail rule src/app/components/manage/mail/mail.component.ts - 246 + 267 Error deleting mail rule. src/app/components/manage/mail/mail.component.ts - 255 + 276 Permissions updated src/app/components/manage/mail/mail.component.ts - 277 + 298 Error updating permissions src/app/components/manage/mail/mail.component.ts - 282 + 303 src/app/components/manage/management-list/management-list.component.ts - 310 + 325 @@ -8357,7 +8314,7 @@ Automatic src/app/components/manage/management-list/management-list.component.ts - 117 + 125 src/app/data/matching-model.ts @@ -8368,7 +8325,7 @@ None src/app/components/manage/management-list/management-list.component.ts - 119 + 127 src/app/data/matching-model.ts @@ -8379,70 +8336,70 @@ Successfully created . src/app/components/manage/management-list/management-list.component.ts - 163 + 178 Error occurred while creating . src/app/components/manage/management-list/management-list.component.ts - 168 + 183 Successfully updated . src/app/components/manage/management-list/management-list.component.ts - 183 + 198 Error occurred while saving . src/app/components/manage/management-list/management-list.component.ts - 188 + 203 Associated documents will not be deleted. src/app/components/manage/management-list/management-list.component.ts - 208 + 223 Error while deleting element src/app/components/manage/management-list/management-list.component.ts - 224 + 239 Permissions updated successfully src/app/components/manage/management-list/management-list.component.ts - 303 + 318 This operation will permanently delete all objects. src/app/components/manage/management-list/management-list.component.ts - 324 + 339 Objects deleted successfully src/app/components/manage/management-list/management-list.component.ts - 338 + 353 Error deleting objects src/app/components/manage/management-list/management-list.component.ts - 344 + 359 @@ -8575,70 +8532,70 @@ No workflows defined. src/app/components/manage/workflows/workflows.component.html - 73 + 80 Saved workflow "". src/app/components/manage/workflows/workflows.component.ts - 78 + 87 Error saving workflow. src/app/components/manage/workflows/workflows.component.ts - 86 + 95 Confirm delete workflow src/app/components/manage/workflows/workflows.component.ts - 113 + 122 This operation will permanently delete this workflow. src/app/components/manage/workflows/workflows.component.ts - 114 + 123 Deleted workflow src/app/components/manage/workflows/workflows.component.ts - 123 + 132 Error deleting workflow. src/app/components/manage/workflows/workflows.component.ts - 128 + 137 Enabled workflow src/app/components/manage/workflows/workflows.component.ts - 139 + 148 Disabled workflow src/app/components/manage/workflows/workflows.component.ts - 140 + 149 Error toggling workflow. src/app/components/manage/workflows/workflows.component.ts - 146 + 155 diff --git a/src-ui/src/app/components/admin/trash/trash.component.html b/src-ui/src/app/components/admin/trash/trash.component.html index 3dbf3db2b..a148f2033 100644 --- a/src-ui/src/app/components/admin/trash/trash.component.html +++ b/src-ui/src/app/components/admin/trash/trash.component.html @@ -47,7 +47,7 @@ } @for (document of documentsInTrash; track document.id) { - +
diff --git a/src-ui/src/app/components/admin/trash/trash.component.scss b/src-ui/src/app/components/admin/trash/trash.component.scss index e69de29bb..648aa7f4d 100644 --- a/src-ui/src/app/components/admin/trash/trash.component.scss +++ b/src-ui/src/app/components/admin/trash/trash.component.scss @@ -0,0 +1,8 @@ +.data-row { + opacity: 0; + transition: opacity .2s; +} + +.reveal { + opacity: 1; +} diff --git a/src-ui/src/app/components/admin/trash/trash.component.spec.ts b/src-ui/src/app/components/admin/trash/trash.component.spec.ts index 9ac89d9a5..066311726 100644 --- a/src-ui/src/app/components/admin/trash/trash.component.spec.ts +++ b/src-ui/src/app/components/admin/trash/trash.component.spec.ts @@ -69,6 +69,7 @@ describe('TrashComponent', () => { }) it('should call correct service method on reload', () => { + jest.useFakeTimers() const trashSpy = jest.spyOn(trashService, 'getTrash') trashSpy.mockReturnValue( of({ @@ -78,6 +79,7 @@ describe('TrashComponent', () => { }) ) component.reload() + jest.advanceTimersByTime(100) expect(trashSpy).toHaveBeenCalled() expect(component.documentsInTrash).toEqual(documentsInTrash) }) diff --git a/src-ui/src/app/components/admin/trash/trash.component.ts b/src-ui/src/app/components/admin/trash/trash.component.ts index 9364d4cce..055c5fa97 100644 --- a/src-ui/src/app/components/admin/trash/trash.component.ts +++ b/src-ui/src/app/components/admin/trash/trash.component.ts @@ -4,7 +4,7 @@ import { Document } from 'src/app/data/document' import { ToastService } from 'src/app/services/toast.service' import { TrashService } from 'src/app/services/trash.service' import { ConfirmDialogComponent } from '../../common/confirm-dialog/confirm-dialog.component' -import { Subject, takeUntil } from 'rxjs' +import { delay, Subject, takeUntil, tap } from 'rxjs' import { SettingsService } from 'src/app/services/settings.service' import { SETTINGS_KEYS } from 'src/app/data/ui-settings' import { Router } from '@angular/router' @@ -21,6 +21,7 @@ export class TrashComponent implements OnDestroy { public page: number = 1 public totalDocuments: number public isLoading: boolean = false + public reveal: boolean = false unsubscribeNotifier: Subject = new Subject() constructor( @@ -40,12 +41,20 @@ export class TrashComponent implements OnDestroy { reload() { this.isLoading = true - this.trashService.getTrash(this.page).subscribe((r) => { - this.documentsInTrash = r.results - this.totalDocuments = r.count - this.isLoading = false - this.selectedDocuments.clear() - }) + this.trashService + .getTrash(this.page) + .pipe( + tap((r) => { + this.documentsInTrash = r.results + this.totalDocuments = r.count + this.selectedDocuments.clear() + }), + delay(100) + ) + .subscribe(() => { + this.reveal = true + this.isLoading = false + }) } delete(document: Document) { diff --git a/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-dialog.component.scss b/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-dialog.component.scss new file mode 100644 index 000000000..e69de29bb diff --git a/src-ui/src/app/components/common/input/switch/switch.component.spec.ts b/src-ui/src/app/components/common/input/switch/switch.component.spec.ts index 372bfd8ab..790330955 100644 --- a/src-ui/src/app/components/common/input/switch/switch.component.spec.ts +++ b/src-ui/src/app/components/common/input/switch/switch.component.spec.ts @@ -38,8 +38,10 @@ describe('SwitchComponent', () => { expect(component.value).toBeFalsy() }) - it('should show note if unset', () => { + it('should correctly report unset', () => { component.value = null expect(component.isUnset).toBeTruthy() + component.value = undefined + expect(component.isUnset).toBeTruthy() }) }) diff --git a/src-ui/src/app/components/dashboard/dashboard.component.html b/src-ui/src/app/components/dashboard/dashboard.component.html index 4d6ae03b9..5e0db4b2f 100644 --- a/src-ui/src/app/components/dashboard/dashboard.component.html +++ b/src-ui/src/app/components/dashboard/dashboard.component.html @@ -18,7 +18,7 @@
-
Loading...
+
diff --git a/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html b/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html index 98dc94f16..2cce1a848 100644 --- a/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html +++ b/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html @@ -9,8 +9,9 @@ Show all } +
@if (displayMode === DisplayMode.TABLE) { - +
@for (field of displayFields; track field; let i = $index) { @@ -28,71 +29,59 @@ - @if (loading) { - @for (i of [].constructor(pageSize); track i) { - - @for (field of displayFields; track field; let j = $index) { - - } - - } - } - @for (doc of documents; track doc.id) { + @for (doc of documents; track doc.id; let i = $index) { - @for (field of displayFields; track field; let i = $index) { - } @@ -101,17 +90,13 @@
-
- -
-
- @switch (field) { - @case (DisplayField.ADDED) { - {{doc.added | customDate}} - } - @case (DisplayField.CREATED) { - {{doc.created_date | customDate}} - } - @case (DisplayField.TITLE) { - {{doc.title | documentTitle}} - } - @case (DisplayField.CORRESPONDENT) { - @if (doc.correspondent) { - {{(doc.correspondent$ | async)?.name}} - } - } - @case (DisplayField.TAGS) { - @for (t of doc.tags$ | async; track t) { - - } - } - @case (DisplayField.DOCUMENT_TYPE) { - @if (doc.document_type) { - {{(doc.document_type$ | async)?.name}} - } - } - @case (DisplayField.STORAGE_PATH) { - @if (doc.storage_path) { - {{(doc.storage_path$ | async)?.name}} - } - } - } - @if (field.startsWith(DisplayField.CUSTOM_FIELD)) { - - } - @if (i === displayFields.length - 1) { -
- - - - - - - - - + @for (field of displayFields; track field; let j = $index) { +
+ @if (loading && reveal) { +
+
+ } @else { + @switch (field) { + @case (DisplayField.ADDED) { + {{doc.added | customDate}} + } + @case (DisplayField.CREATED) { + {{doc.created_date | customDate}} + } + @case (DisplayField.TITLE) { + {{doc.title | documentTitle}} + } + @case (DisplayField.CORRESPONDENT) { + @if (doc.correspondent) { + {{(doc.correspondent$ | async)?.name}} + } + } + @case (DisplayField.TAGS) { + @for (t of doc.tags$ | async; track t) { + + } + } + @case (DisplayField.DOCUMENT_TYPE) { + @if (doc.document_type) { + {{(doc.document_type$ | async)?.name}} + } + } + @case (DisplayField.STORAGE_PATH) { + @if (doc.storage_path) { + {{(doc.storage_path$ | async)?.name}} + } + } + } + @if (field.startsWith(DisplayField.CUSTOM_FIELD)) { + + } + @if (j === displayFields.length - 1) { +
+ + + + + + +
+ } }
} @else if (displayMode === DisplayMode.SMALL_CARDS) { -
- @if (loading) { - @for (i of [].constructor(pageSize); track i) { - - } - } - @for (d of documents; track d.id) { +
+ @for (d of documents; track d.id; let i = $index) { } @else if (displayMode === DisplayMode.LARGE_CARDS) { -
- @if (loading) { - @for (i of [].constructor(pageSize); track i) { - - } - } - @for (d of documents; track d.id) { +
+ @for (d of documents; track d.id; let i = $index) { } @else { -

No documents

+

No documents

} - +
diff --git a/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.scss b/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.scss index 8c445f18e..54156b448 100644 --- a/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.scss +++ b/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.scss @@ -1,3 +1,17 @@ +.wrapper { + transition: all .3s ease-out; + overflow: hidden; + max-height: 0; + opacity: .1; + width: 100%; +} + +.reveal { + max-height: 1000px; + opacity: 1; + overflow: visible; +} + table { overflow-wrap: anywhere; table-layout: fixed; diff --git a/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.spec.ts b/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.spec.ts index ef36b0806..aa82cf765 100644 --- a/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.spec.ts +++ b/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.spec.ts @@ -187,7 +187,7 @@ describe('SavedViewWidgetComponent', () => { fixture.detectChanges() }) - it('should show a list of documents', () => { + it('should show a list of documents', fakeAsync(() => { jest.spyOn(documentService, 'listFiltered').mockReturnValue( of({ all: [2, 3], @@ -196,43 +196,17 @@ describe('SavedViewWidgetComponent', () => { }) ) component.ngOnInit() + tick(500) fixture.detectChanges() expect(fixture.debugElement.nativeElement.textContent).toContain('doc2') expect(fixture.debugElement.nativeElement.textContent).toContain('doc3') // preview + download buttons expect( fixture.debugElement.queryAll(By.css('td a.btn'))[0].attributes['href'] - ).toEqual(component.getPreviewUrl(documentResults[0])) + ).toEqual(documentService.getPreviewUrl(documentResults[0].id)) expect( fixture.debugElement.queryAll(By.css('td a.btn'))[1].attributes['href'] ).toEqual(component.getDownloadUrl(documentResults[0])) - }) - - it('should show preview on mouseover after delay to preload content', fakeAsync(() => { - jest.spyOn(documentService, 'listFiltered').mockReturnValue( - of({ - all: [2, 3], - count: 2, - results: documentResults, - }) - ) - component.ngOnInit() - fixture.detectChanges() - component.mouseEnterPreviewButton(documentResults[0]) - expect(component.popover.isOpen()).toBeTruthy() - expect(component.popoverHidden).toBeTruthy() - tick(600) - expect(component.popoverHidden).toBeFalsy() - component.maybeClosePopover() - - component.mouseEnterPreviewButton(documentResults[1]) - tick(100) - component.mouseLeavePreviewButton() - component.mouseEnterPreview() - expect(component.popover.isOpen()).toBeTruthy() - component.mouseLeavePreview() - tick(600) - expect(component.popover.isOpen()).toBeFalsy() })) it('should call api endpoint and load results', () => { diff --git a/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.ts b/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.ts index 7531a7615..fe12d879c 100644 --- a/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.ts +++ b/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.ts @@ -7,7 +7,7 @@ import { ViewChildren, } from '@angular/core' import { Router } from '@angular/router' -import { Subject, takeUntil } from 'rxjs' +import { delay, Subject, takeUntil, tap } from 'rxjs' import { DEFAULT_DASHBOARD_DISPLAY_FIELDS, DEFAULT_DASHBOARD_VIEW_PAGE_SIZE, @@ -52,7 +52,8 @@ export class SavedViewWidgetComponent public DisplayField = DisplayField public CustomFieldDataType = CustomFieldDataType - loading: boolean = true + public loading: boolean = true + public reveal: boolean = false private customFields: CustomField[] = [] @@ -137,16 +138,22 @@ export class SavedViewWidgetComponent this.documentService .listFiltered( 1, - this.pageSize, + this.savedView?.page_size ?? DEFAULT_DASHBOARD_VIEW_PAGE_SIZE, this.savedView.sort_field, this.savedView.sort_reverse, this.savedView.filter_rules, { truncate_content: true } ) - .pipe(takeUntil(this.unsubscribeNotifier)) + .pipe( + takeUntil(this.unsubscribeNotifier), + tap((result) => { + this.reveal = true + this.documents = result.results + }), + delay(500) + ) .subscribe((result) => { this.loading = false - this.documents = result.results }) } @@ -206,55 +213,10 @@ export class SavedViewWidgetComponent this.router.navigate(['documents', document.id]) } - getPreviewUrl(document: Document): string { - return this.documentService.getPreviewUrl(document.id) - } - getDownloadUrl(document: Document): string { return this.documentService.getDownloadUrl(document.id) } - mouseEnterPreviewButton(doc: Document) { - const newPopover = this.popovers.get(this.documents.indexOf(doc)) - if (this.popover !== newPopover && this.popover?.isOpen()) - this.popover.close() - this.popover = newPopover - this.mouseOnPreview = true - if (!this.popover.isOpen()) { - // we're going to open but hide to pre-load content during hover delay - this.popover.open() - this.popoverHidden = true - setTimeout(() => { - if (this.mouseOnPreview) { - // show popover - this.popoverHidden = false - } else { - this.popover.close() - } - }, 600) - } - } - - mouseEnterPreview() { - this.mouseOnPreview = true - } - - mouseLeavePreview() { - this.mouseOnPreview = false - this.maybeClosePopover() - } - - mouseLeavePreviewButton() { - this.mouseOnPreview = false - this.maybeClosePopover() - } - - maybeClosePopover() { - setTimeout(() => { - if (!this.mouseOnPreview) this.popover?.close() - }, 300) - } - public getColumnTitle(field: DisplayField): string { if (field.startsWith(DisplayField.CUSTOM_FIELD)) { const id = field.split('_')[2] diff --git a/src-ui/src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.html b/src-ui/src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.html index ba318b8e2..718edf4ea 100644 --- a/src-ui/src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.html +++ b/src-ui/src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.html @@ -1,6 +1,6 @@ -
+
@if (loading) {
@@ -18,7 +18,7 @@
 
-
+
diff --git a/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.html b/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.html index b64d5e567..5f0091dc5 100644 --- a/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.html +++ b/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.html @@ -1,4 +1,4 @@ -
+
diff --git a/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.scss b/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.scss index 4efdb0876..521a97c6b 100644 --- a/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.scss +++ b/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.scss @@ -1,3 +1,12 @@ i-bs { cursor: move; } + +.card { + opacity: 0; + transition: opacity .2s; +} + +.reveal { + opacity: 1; +} diff --git a/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.spec.ts b/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.spec.ts index c4e27ecc7..cfd7edb3d 100644 --- a/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.spec.ts +++ b/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.spec.ts @@ -35,6 +35,7 @@ describe('WidgetFrameComponent', () => { fixture = TestBed.createComponent(WidgetFrameComponent) component = fixture.componentInstance + jest.useFakeTimers() fixture.detectChanges() }) @@ -51,4 +52,10 @@ describe('WidgetFrameComponent', () => { fixture.detectChanges() expect(fixture.debugElement.query(By.css('.spinner-border'))).not.toBeNull() }) + + it('should reveal', () => { + expect(component.reveal).toBeFalsy() + jest.advanceTimersByTime(100) + expect(component.reveal).toBeTruthy() + }) }) diff --git a/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.ts b/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.ts index a710a6a9d..2a141be7c 100644 --- a/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.ts +++ b/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.ts @@ -1,11 +1,11 @@ -import { Component, Input } from '@angular/core' +import { AfterViewInit, Component, Input } from '@angular/core' @Component({ selector: 'pngx-widget-frame', templateUrl: './widget-frame.component.html', styleUrls: ['./widget-frame.component.scss'], }) -export class WidgetFrameComponent { +export class WidgetFrameComponent implements AfterViewInit { constructor() {} @Input() @@ -16,4 +16,12 @@ export class WidgetFrameComponent { @Input() draggable: any + + public reveal: boolean = false + + ngAfterViewInit(): void { + setTimeout(() => { + this.reveal = true + }, 100) + } } diff --git a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.html b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.html index 90606fc0d..810fea029 100644 --- a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.html +++ b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.html @@ -1,4 +1,4 @@ -
+
@if (document) { diff --git a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.spec.ts b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.spec.ts index 95b12d7ec..8905d3ff2 100644 --- a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.spec.ts +++ b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.spec.ts @@ -120,4 +120,12 @@ describe('DocumentCardLargeComponent', () => { expect(fixture.nativeElement.textContent).toContain('bananas') expect(component.searchNoteHighlights).toContain('bananas') }) + + it('should try to close the preview on mouse leave', () => { + component.popupPreview = { + close: jest.fn(), + } as any + component.mouseLeaveCard() + expect(component.popupPreview.close).toHaveBeenCalled() + }) }) diff --git a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.ts b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.ts index 99597ca5a..d33cef9f3 100644 --- a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.ts +++ b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.ts @@ -108,12 +108,8 @@ export class DocumentCardLargeComponent extends ComponentWithPermissions { return this.documentService.getDownloadUrl(this.document.id) } - get previewUrl() { - return this.documentService.getPreviewUrl(this.document.id) - } - mouseLeaveCard() { - this.popupPreview.close() + this.popupPreview?.close() } get contentTrimmed() { diff --git a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.html b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.html index 287b41463..cc44235ab 100644 --- a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.html +++ b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.html @@ -1,5 +1,5 @@ -
-
+
+
@if (document) { @@ -14,7 +14,7 @@
} - @if (displayFields?.includes(DisplayField.TAGS) && document) { + @if (document && displayFields?.includes(DisplayField.TAGS)) {
@for (t of getTagsLimited$() | async; track t) { @@ -38,12 +38,17 @@

- @if (document && displayFields.includes(DisplayField.CORRESPONDENT) && document.correspondent) { - {{(document.correspondent$ | async)?.name ?? privateName}} - @if (displayFields.includes(DisplayField.TITLE)) {:} - } - @if (document && displayFields.includes(DisplayField.TITLE)) { - {{document.title | documentTitle}} + @if (document) { + @if (displayFields.includes(DisplayField.CORRESPONDENT) && document.correspondent) { + {{(document.correspondent$ | async)?.name ?? privateName}} + @if (displayFields.includes(DisplayField.TITLE)) {:} + } + @if (displayFields.includes(DisplayField.TITLE)) { + {{document.title | documentTitle}} + } + } @else { +

+
} @if (!document) {
diff --git a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.spec.ts b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.spec.ts index 0c0c82103..7bdb0c3f8 100644 --- a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.spec.ts +++ b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.spec.ts @@ -111,4 +111,12 @@ describe('DocumentCardSmallComponent', () => { fixture.debugElement.queryAll(By.directive(TagComponent)) ).toHaveLength(6) }) + + it('should try to close the preview on mouse leave', () => { + component.popupPreview = { + close: jest.fn(), + } as any + component.mouseLeaveCard() + expect(component.popupPreview.close).toHaveBeenCalled() + }) }) diff --git a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.ts b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.ts index 7397159af..f8705fa8e 100644 --- a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.ts +++ b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.ts @@ -94,7 +94,7 @@ export class DocumentCardSmallComponent extends ComponentWithPermissions { } mouseLeaveCard() { - this.popupPreview.close() + this.popupPreview?.close() } get notesEnabled(): boolean { diff --git a/src-ui/src/app/components/manage/correspondent-list/correspondent-list.component.ts b/src-ui/src/app/components/manage/correspondent-list/correspondent-list.component.ts index 224b9c8a3..94e12cd48 100644 --- a/src-ui/src/app/components/manage/correspondent-list/correspondent-list.component.ts +++ b/src-ui/src/app/components/manage/correspondent-list/correspondent-list.component.ts @@ -12,7 +12,6 @@ import { CorrespondentService } from 'src/app/services/rest/correspondent.servic import { ToastService } from 'src/app/services/toast.service' import { CorrespondentEditDialogComponent } from '../../common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component' import { ManagementListComponent } from '../management-list/management-list.component' -import { takeUntil } from 'rxjs' @Component({ selector: 'pngx-correspondent-list', @@ -65,24 +64,7 @@ export class CorrespondentListComponent extends ManagementListComponent { - this.data = c.results - this.collectionSize = c.count - this.isLoading = false - }) + super.reloadData({ last_correspondence: true }) } getDeleteMessage(object: Correspondent) { diff --git a/src-ui/src/app/components/manage/custom-fields/custom-fields.component.html b/src-ui/src/app/components/manage/custom-fields/custom-fields.component.html index 8439cd1a7..291520b83 100644 --- a/src-ui/src/app/components/manage/custom-fields/custom-fields.component.html +++ b/src-ui/src/app/components/manage/custom-fields/custom-fields.component.html @@ -13,16 +13,23 @@
  • -
    +
    Name
    Data Type
    Actions
  • + @if (loading) { +
  • +
    + Loading... +
  • + } + @for (field of fields; track field) {
  • -
    +
    {{getDataType(field)}}
    @@ -59,7 +66,7 @@
  • } - @if (fields.length === 0) { + @if (!loading && fields.length === 0) {
  • No fields defined.
  • }
diff --git a/src-ui/src/app/components/manage/custom-fields/custom-fields.component.scss b/src-ui/src/app/components/manage/custom-fields/custom-fields.component.scss index dfdd20433..22a61847c 100644 --- a/src-ui/src/app/components/manage/custom-fields/custom-fields.component.scss +++ b/src-ui/src/app/components/manage/custom-fields/custom-fields.component.scss @@ -2,3 +2,12 @@ .d-block.d-sm-none .dropdown-toggle::after { display: none; } + +.list-group-item .row { + opacity: 0; + transition: opacity .2s; +} + +.list-group-item .reveal { + opacity: 1; +} diff --git a/src-ui/src/app/components/manage/custom-fields/custom-fields.component.spec.ts b/src-ui/src/app/components/manage/custom-fields/custom-fields.component.spec.ts index 5feb17055..1be5484c1 100644 --- a/src-ui/src/app/components/manage/custom-fields/custom-fields.component.spec.ts +++ b/src-ui/src/app/components/manage/custom-fields/custom-fields.component.spec.ts @@ -95,6 +95,8 @@ describe('CustomFieldsComponent', () => { fixture = TestBed.createComponent(CustomFieldsComponent) component = fixture.componentInstance fixture.detectChanges() + jest.useFakeTimers() + jest.advanceTimersByTime(100) }) it('should support create, show notification on error / success', () => { @@ -119,6 +121,7 @@ describe('CustomFieldsComponent', () => { editDialog.succeeded.emit(fields[0]) expect(toastInfoSpy).toHaveBeenCalled() expect(reloadSpy).toHaveBeenCalled() + jest.advanceTimersByTime(100) }) it('should support edit, show notification on error / success', () => { diff --git a/src-ui/src/app/components/manage/custom-fields/custom-fields.component.ts b/src-ui/src/app/components/manage/custom-fields/custom-fields.component.ts index 0933cd38f..9300a0c2c 100644 --- a/src-ui/src/app/components/manage/custom-fields/custom-fields.component.ts +++ b/src-ui/src/app/components/manage/custom-fields/custom-fields.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core' import { NgbModal } from '@ng-bootstrap/ng-bootstrap' -import { Subject, takeUntil } from 'rxjs' +import { delay, Subject, takeUntil, tap } from 'rxjs' import { DATA_TYPE_LABELS, CustomField } from 'src/app/data/custom-field' import { PermissionsService } from 'src/app/services/permissions.service' import { CustomFieldsService } from 'src/app/services/rest/custom-fields.service' @@ -28,6 +28,9 @@ export class CustomFieldsComponent { public fields: CustomField[] = [] + public loading: boolean = true + public reveal: boolean = false + private unsubscribeNotifier: Subject = new Subject() constructor( private customFieldsService: CustomFieldsService, @@ -47,9 +50,16 @@ export class CustomFieldsComponent reload() { this.customFieldsService .listAll() - .pipe(takeUntil(this.unsubscribeNotifier)) - .subscribe((r) => { - this.fields = r.results + .pipe( + takeUntil(this.unsubscribeNotifier), + tap((r) => { + this.fields = r.results + }), + delay(100) + ) + .subscribe(() => { + this.reveal = true + this.loading = false }) } diff --git a/src-ui/src/app/components/manage/mail/mail.component.html b/src-ui/src/app/components/manage/mail/mail.component.html index 9058e6884..090afe0cd 100644 --- a/src-ui/src/app/components/manage/mail/mail.component.html +++ b/src-ui/src/app/components/manage/mail/mail.component.html @@ -26,7 +26,7 @@
  • -
    +
    Name
    Server
    Username
    @@ -34,9 +34,16 @@
  • + @if (loadingAccounts) { +
  • +
    + Loading... +
  • + } + @for (account of mailAccounts; track account) {
  • -
    +
  • } - @if (mailAccounts.length === 0) { + @if (!loadingAccounts && mailAccounts.length === 0) {
  • No mail accounts defined.
  • }
@@ -92,7 +99,7 @@
  • -
    +
    Name
    Sort Order
    Account
    @@ -101,9 +108,16 @@
  • + @if (loadingRules) { +
  • +
    + Loading... +
  • + } + @for (rule of mailRules; track rule) {
  • -
    +
    {{rule.order}}
    {{(mailAccountService.getCached(rule.account) | async)?.name}}
    @@ -151,7 +165,7 @@
  • } - @if (mailRules.length === 0) { + @if (!loadingRules && mailRules.length === 0) {
  • No mail rules defined.
  • }
diff --git a/src-ui/src/app/components/manage/mail/mail.component.scss b/src-ui/src/app/components/manage/mail/mail.component.scss index 0c1f432aa..d18ed3d30 100644 --- a/src-ui/src/app/components/manage/mail/mail.component.scss +++ b/src-ui/src/app/components/manage/mail/mail.component.scss @@ -2,3 +2,12 @@ .d-block.d-sm-none .dropdown-toggle::after { display: none; } + +.list-group-item .row { + opacity: 0; + transition: opacity .2s; +} + +.list-group-item .reveal { + opacity: 1; +} diff --git a/src-ui/src/app/components/manage/mail/mail.component.spec.ts b/src-ui/src/app/components/manage/mail/mail.component.spec.ts index 34db62b7e..d3194459f 100644 --- a/src-ui/src/app/components/manage/mail/mail.component.spec.ts +++ b/src-ui/src/app/components/manage/mail/mail.component.spec.ts @@ -129,6 +129,8 @@ describe('MailComponent', () => { fixture = TestBed.createComponent(MailComponent) component = fixture.componentInstance fixture.detectChanges() + jest.useFakeTimers() + jest.advanceTimersByTime(100) }) function completeSetup(excludeService = null) { @@ -386,6 +388,7 @@ describe('MailComponent', () => { component.oAuthAccountId = 3 const editSpy = jest.spyOn(component, 'editMailAccount') component.ngOnInit() + jest.advanceTimersByTime(200) expect(editSpy).toHaveBeenCalled() }) }) diff --git a/src-ui/src/app/components/manage/mail/mail.component.ts b/src-ui/src/app/components/manage/mail/mail.component.ts index f1c30674b..d4bbf77c4 100644 --- a/src-ui/src/app/components/manage/mail/mail.component.ts +++ b/src-ui/src/app/components/manage/mail/mail.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit, OnDestroy } from '@angular/core' import { NgbModal } from '@ng-bootstrap/ng-bootstrap' -import { Subject, first, takeUntil } from 'rxjs' +import { Subject, delay, first, takeUntil, tap } from 'rxjs' import { ObjectWithPermissions } from 'src/app/data/object-with-permissions' import { MailAccount, MailAccountType } from 'src/app/data/mail-account' import { MailRule } from 'src/app/data/mail-rule' @@ -47,6 +47,11 @@ export class MailComponent return this.settingsService.get(SETTINGS_KEYS.OUTLOOK_OAUTH_URL) } + public loadingRules: boolean = true + public revealRules: boolean = false + public loadingAccounts: boolean = true + public revealAccounts: boolean = false + constructor( public mailAccountService: MailAccountService, public mailRuleService: MailRuleService, @@ -62,9 +67,10 @@ export class MailComponent ngOnInit(): void { this.mailAccountService .listAll(null, null, { full_perms: true }) - .pipe(first(), takeUntil(this.unsubscribeNotifier)) - .subscribe({ - next: (r) => { + .pipe( + first(), + takeUntil(this.unsubscribeNotifier), + tap((r) => { this.mailAccounts = r.results if (this.oAuthAccountId) { this.editMailAccount( @@ -73,6 +79,13 @@ export class MailComponent ) ) } + }), + delay(100) + ) + .subscribe({ + next: () => { + this.loadingAccounts = false + this.revealAccounts = true }, error: (e) => { this.toastService.showError( @@ -84,10 +97,18 @@ export class MailComponent this.mailRuleService .listAll(null, null, { full_perms: true }) - .pipe(first(), takeUntil(this.unsubscribeNotifier)) + .pipe( + first(), + takeUntil(this.unsubscribeNotifier), + tap((r) => { + this.mailRules = r.results + }), + delay(100) + ) .subscribe({ next: (r) => { - this.mailRules = r.results + this.loadingRules = false + this.revealRules = true }, error: (e) => { this.toastService.showError($localize`Error retrieving mail rules`, e) diff --git a/src-ui/src/app/components/manage/management-list/management-list.component.html b/src-ui/src/app/components/manage/management-list/management-list.component.html index da04208b4..6dbe590c7 100644 --- a/src-ui/src/app/components/manage/management-list/management-list.component.html +++ b/src-ui/src/app/components/manage/management-list/management-list.component.html @@ -53,7 +53,7 @@ } @for (object of data; track object) { - +
diff --git a/src-ui/src/app/components/manage/management-list/management-list.component.scss b/src-ui/src/app/components/manage/management-list/management-list.component.scss index aa2871d68..79db7e74f 100644 --- a/src-ui/src/app/components/manage/management-list/management-list.component.scss +++ b/src-ui/src/app/components/manage/management-list/management-list.component.scss @@ -10,3 +10,12 @@ tbody tr:last-child td { .form-check { min-height: 0; } + +.data-row { + opacity: 0; + transition: opacity .2s; +} + +.reveal { + opacity: 1; +} diff --git a/src-ui/src/app/components/manage/management-list/management-list.component.spec.ts b/src-ui/src/app/components/manage/management-list/management-list.component.spec.ts index 9aa876da2..02dec4b59 100644 --- a/src-ui/src/app/components/manage/management-list/management-list.component.spec.ts +++ b/src-ui/src/app/components/manage/management-list/management-list.component.spec.ts @@ -150,6 +150,7 @@ describe('ManagementListComponent', () => { fixture.detectChanges() expect(component.nameFilter).toBeNull() expect(component.data).toEqual(tags) + tick(100) // load })) it('should support create, show notification on error / success', () => { 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 27165a8fb..50ae1c86b 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 @@ -7,7 +7,13 @@ import { } from '@angular/core' import { NgbModal } from '@ng-bootstrap/ng-bootstrap' import { Subject } from 'rxjs' -import { debounceTime, distinctUntilChanged, takeUntil } from 'rxjs/operators' +import { + debounceTime, + delay, + distinctUntilChanged, + takeUntil, + tap, +} from 'rxjs/operators' import { MatchingModel, MATCHING_ALGORITHMS, @@ -89,6 +95,8 @@ export abstract class ManagementListComponent public selectedObjects: Set = new Set() public togggleAll: boolean = false + public reveal: boolean = false + ngOnInit(): void { this.reloadData() @@ -132,7 +140,7 @@ export abstract class ManagementListComponent this.reloadData() } - reloadData() { + reloadData(extraParams: { [key: string]: any } = null) { this.isLoading = true this.clearSelection() this.service @@ -142,12 +150,19 @@ export abstract class ManagementListComponent this.sortField, this.sortReverse, this._nameFilter, - true + true, + extraParams ) - .pipe(takeUntil(this.unsubscribeNotifier)) - .subscribe((c) => { - this.data = c.results - this.collectionSize = c.count + .pipe( + takeUntil(this.unsubscribeNotifier), + tap((c) => { + this.data = c.results + this.collectionSize = c.count + }), + delay(100) + ) + .subscribe(() => { + this.reveal = true this.isLoading = false }) } diff --git a/src-ui/src/app/components/manage/workflows/workflows.component.html b/src-ui/src/app/components/manage/workflows/workflows.component.html index ddb8a8654..10c0cc80d 100644 --- a/src-ui/src/app/components/manage/workflows/workflows.component.html +++ b/src-ui/src/app/components/manage/workflows/workflows.component.html @@ -13,7 +13,7 @@
  • -
    +
    Name
    Sort order
    Status
    @@ -22,9 +22,16 @@
  • + @if (loading) { +
  • +
    + Loading... +
  • + } + @for (workflow of workflows; track workflow.id) {
  • -
    +
    {{workflow.order}}
    @@ -69,7 +76,7 @@
  • } - @if (workflows.length === 0) { -
  • No workflows defined.
  • + @if (!loading && workflows.length === 0) { +
  • No workflows defined.
  • }
diff --git a/src-ui/src/app/components/manage/workflows/workflows.component.scss b/src-ui/src/app/components/manage/workflows/workflows.component.scss index 0c1f432aa..d18ed3d30 100644 --- a/src-ui/src/app/components/manage/workflows/workflows.component.scss +++ b/src-ui/src/app/components/manage/workflows/workflows.component.scss @@ -2,3 +2,12 @@ .d-block.d-sm-none .dropdown-toggle::after { display: none; } + +.list-group-item .row { + opacity: 0; + transition: opacity .2s; +} + +.list-group-item .reveal { + opacity: 1; +} diff --git a/src-ui/src/app/components/manage/workflows/workflows.component.spec.ts b/src-ui/src/app/components/manage/workflows/workflows.component.spec.ts index 9d92d9ba7..a268d964c 100644 --- a/src-ui/src/app/components/manage/workflows/workflows.component.spec.ts +++ b/src-ui/src/app/components/manage/workflows/workflows.component.spec.ts @@ -119,10 +119,11 @@ describe('WorkflowsComponent', () => { ) modalService = TestBed.inject(NgbModal) toastService = TestBed.inject(ToastService) - + jest.useFakeTimers() fixture = TestBed.createComponent(WorkflowsComponent) component = fixture.componentInstance fixture.detectChanges() + jest.advanceTimersByTime(100) }) it('should support create, show notification on error / success', () => { diff --git a/src-ui/src/app/components/manage/workflows/workflows.component.ts b/src-ui/src/app/components/manage/workflows/workflows.component.ts index 592dd3efe..106b99485 100644 --- a/src-ui/src/app/components/manage/workflows/workflows.component.ts +++ b/src-ui/src/app/components/manage/workflows/workflows.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit } from '@angular/core' import { WorkflowService } from 'src/app/services/rest/workflow.service' import { ComponentWithPermissions } from '../../with-permissions/with-permissions.component' -import { Subject, takeUntil } from 'rxjs' +import { delay, Subject, takeUntil, tap } from 'rxjs' import { Workflow } from 'src/app/data/workflow' import { NgbModal } from '@ng-bootstrap/ng-bootstrap' import { ToastService } from 'src/app/services/toast.service' @@ -26,6 +26,9 @@ export class WorkflowsComponent private unsubscribeNotifier: Subject = new Subject() + public loading: boolean = false + public reveal: boolean = false + constructor( private workflowService: WorkflowService, public permissionsService: PermissionsService, @@ -40,11 +43,17 @@ export class WorkflowsComponent } reload() { + this.loading = true this.workflowService .listAll() - .pipe(takeUntil(this.unsubscribeNotifier)) - .subscribe((r) => { - this.workflows = r.results + .pipe( + takeUntil(this.unsubscribeNotifier), + tap((r) => (this.workflows = r.results)), + delay(100) + ) + .subscribe(() => { + this.reveal = true + this.loading = false }) } diff --git a/src-ui/src/app/utils/color.spec.ts b/src-ui/src/app/utils/color.spec.ts index 4dddb59a1..d31ad1b26 100644 --- a/src-ui/src/app/utils/color.spec.ts +++ b/src-ui/src/app/utils/color.spec.ts @@ -1,8 +1,10 @@ import { BRIGHTNESS, + componentToHex, computeLuminance, estimateBrightnessForColor, hexToHsl, + hslToRgb, randomColor, rgbToHsl, } from './color' @@ -44,7 +46,21 @@ describe('Color Utils', () => { expect(hsl).toEqual([0, 0, 0.5019607843137255]) }) + it('should convert hsl to rgb', () => { + let rgb = hslToRgb(0, 0, 0.5) + expect(rgb).toEqual([127.5, 127.5, 127.5]) + expect(hslToRgb(0, 0, 0)).toEqual([0, 0, 0]) + expect(hslToRgb(0, 0, 1)).toEqual([255, 255, 255]) + }) + it('should return a random color', () => { expect(randomColor()).not.toBeNull() }) + + it('should convert component to hex', () => { + expect(componentToHex(0)).toEqual('00') + expect(componentToHex(255)).toEqual('ff') + expect(componentToHex(128)).toEqual('80') + expect(componentToHex(15)).toEqual('0f') + }) }) diff --git a/src-ui/src/app/utils/color.ts b/src-ui/src/app/utils/color.ts index e23a91c5f..b2899571e 100644 --- a/src-ui/src/app/utils/color.ts +++ b/src-ui/src/app/utils/color.ts @@ -5,7 +5,7 @@ export const BRIGHTNESS = { DARK: 'dark', } -function componentToHex(c) { +export function componentToHex(c) { var hex = Math.floor(c).toString(16) return hex.length == 1 ? '0' + hex : hex } @@ -23,21 +23,22 @@ function componentToHex(c) { * @param Number l The lightness * @return Array The RGB representation */ -function hslToRgb(h, s, l) { + +function hue2rgb(p, q, t) { + if (t < 0) t += 1 + if (t > 1) t -= 1 + if (t < 1 / 6) return p + (q - p) * 6 * t + if (t < 1 / 2) return q + if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6 + return p +} + +export function hslToRgb(h, s, l) { var r, g, b if (s == 0) { r = g = b = l // achromatic } else { - function hue2rgb(p, q, t) { - if (t < 0) t += 1 - if (t > 1) t -= 1 - if (t < 1 / 6) return p + (q - p) * 6 * t - if (t < 1 / 2) return q - if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6 - return p - } - var q = l < 0.5 ? l * (1 + s) : l + s - l * s var p = 2 * l - q r = hue2rgb(p, q, h + 1 / 3) diff --git a/src-ui/src/theme.scss b/src-ui/src/theme.scss index 228d78f04..91b045dbc 100644 --- a/src-ui/src/theme.scss +++ b/src-ui/src/theme.scss @@ -203,19 +203,23 @@ $form-check-radio-checked-bg-image-dark: url("data:image/svg+xml,