From 81c2abb276adc11a2b40d3adacc4270a22f73114 Mon Sep 17 00:00:00 2001 From: mkljczk Date: Thu, 5 Dec 2024 14:27:00 +0100 Subject: [PATCH] pl-fe: add alternative tombstone label Signed-off-by: mkljczk --- packages/pl-fe/src/components/status.tsx | 6 +----- packages/pl-fe/src/components/tombstone.tsx | 10 +++++----- .../src/features/status/components/thread-status.tsx | 7 +------ .../pl-fe/src/features/status/components/thread.tsx | 2 +- packages/pl-fe/src/locales/en.json | 1 + 5 files changed, 9 insertions(+), 17 deletions(-) diff --git a/packages/pl-fe/src/components/status.tsx b/packages/pl-fe/src/components/status.tsx index 234bf4517..645355415 100644 --- a/packages/pl-fe/src/components/status.tsx +++ b/packages/pl-fe/src/components/status.tsx @@ -299,11 +299,7 @@ const Status: React.FC = (props) => { if (!status) return null; if (status.deleted) return ( - + ); if (filtered && status.showFiltered !== false) { diff --git a/packages/pl-fe/src/components/tombstone.tsx b/packages/pl-fe/src/components/tombstone.tsx index d9078a476..a1b20c460 100644 --- a/packages/pl-fe/src/components/tombstone.tsx +++ b/packages/pl-fe/src/components/tombstone.tsx @@ -8,10 +8,11 @@ interface ITombstone { id: string; onMoveUp?: (statusId: string) => void; onMoveDown?: (statusId: string) => void; + deleted?: boolean; } /** Represents a deleted item. */ -const Tombstone: React.FC = ({ id, onMoveUp, onMoveDown }) => { +const Tombstone: React.FC = ({ id, onMoveUp, onMoveDown, deleted }) => { const handlers = { moveUp: () => onMoveUp?.(id), moveDown: () => onMoveDown?.(id), @@ -25,10 +26,9 @@ const Tombstone: React.FC = ({ id, onMoveUp, onMoveDown }) => { tabIndex={0} > - + {deleted + ? + : } diff --git a/packages/pl-fe/src/features/status/components/thread-status.tsx b/packages/pl-fe/src/features/status/components/thread-status.tsx index 0d9495d78..18cceb488 100644 --- a/packages/pl-fe/src/features/status/components/thread-status.tsx +++ b/packages/pl-fe/src/features/status/components/thread-status.tsx @@ -26,12 +26,7 @@ const ThreadStatus: React.FC = (props): JSX.Element => { if (isDeleted) { return (
- +
); } diff --git a/packages/pl-fe/src/features/status/components/thread.tsx b/packages/pl-fe/src/features/status/components/thread.tsx index 4f8bbda1b..1a2f4e77f 100644 --- a/packages/pl-fe/src/features/status/components/thread.tsx +++ b/packages/pl-fe/src/features/status/components/thread.tsx @@ -329,7 +329,7 @@ const Thread: React.FC = ({ const focusedStatus = (
{status.deleted ? ( - + ) : (