From b63ac73677a2727ce7d3987841e77cdd408b7d52 Mon Sep 17 00:00:00 2001 From: Paul Rangger <48455539+PaRangger@users.noreply.github.com> Date: Sun, 3 Nov 2024 20:11:40 +0100 Subject: [PATCH] Communication: Add undo button when deleting posts (#9624) --- .../answer-post/answer-post.component.html | 25 +++--- .../answer-post/answer-post.component.scss | 2 + .../answer-post/answer-post.component.ts | 8 ++ .../app/shared/metis/metis.component.scss | 31 +++++++ .../app/shared/metis/post/post.component.html | 41 ++++++---- .../app/shared/metis/post/post.component.ts | 24 ++---- .../posting-content.component.html | 10 ++- .../posting-content.components.ts | 5 +- .../post-footer/post-footer.component.html | 2 +- .../post-footer/post-footer.component.ts | 4 + .../answer-post-header.component.html | 80 +++++++++---------- .../answer-post-header.component.ts | 2 +- .../post-header/post-header.component.html | 45 ++++++----- .../post-header/post-header.component.ts | 2 +- .../posting-header.directive.ts | 5 +- .../app/shared/metis/posting.directive.ts | 58 +++++++++++++- .../profile-picture.component.html | 6 +- .../profile-picture.component.scss | 6 +- .../profile-picture.component.ts | 1 + src/main/webapp/i18n/de/metis.json | 4 +- src/main/webapp/i18n/en/metis.json | 4 +- .../discussion-section.component.spec.ts | 3 +- .../answer-post/answer-post.component.spec.ts | 12 +-- .../shared/metis/post/post.component.spec.ts | 49 +++++++++++- .../posting-content.component.spec.ts | 18 ++++- .../answer-post-header.component.spec.ts | 21 ++--- .../post-header/post-header.component.spec.ts | 19 +++-- 27 files changed, 334 insertions(+), 153 deletions(-) diff --git a/src/main/webapp/app/shared/metis/answer-post/answer-post.component.html b/src/main/webapp/app/shared/metis/answer-post/answer-post.component.html index 52b4aebd1e29..33641bc8ad2b 100644 --- a/src/main/webapp/app/shared/metis/answer-post/answer-post.component.html +++ b/src/main/webapp/app/shared/metis/answer-post/answer-post.component.html @@ -6,6 +6,8 @@ [isCommunicationPage]="isCommunicationPage" [lastReadDate]="lastReadDate" [hasChannelModerationRights]="hasChannelModerationRights" + [isDeleted]="isDeleted" + (isDeleteEvent)="onDeleteEvent(true)" /> @if (!createAnswerPostModal.isInputOpen) {