From 3e1b9ff53ddb6bfa9347c91bd670bd0c4b3c0ddc Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Thu, 2 May 2024 23:29:01 +0800 Subject: [PATCH] Apply filter context in compact status too --- src/components/status.css | 17 ++++++++++++++--- src/components/timeline.jsx | 32 ++++++++++++++++++++++++-------- 2 files changed, 38 insertions(+), 11 deletions(-) diff --git a/src/components/status.css b/src/components/status.css index 96ed575..b81f77d 100644 --- a/src/components/status.css +++ b/src/components/status.css @@ -569,8 +569,15 @@ font-weight: bold; vertical-align: middle; display: inline-block; + + &.horizontal { + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + max-width: 100%; + } } -.status-filtered-badge.badge-meta { +.status-filtered-badge:not(.horizontal).badge-meta { display: inline-flex; flex-direction: column; position: relative; @@ -584,10 +591,10 @@ border-color: var(--text-color); background: var(--bg-color); } -.status-filtered-badge.badge-meta > span:first-child { +.status-filtered-badge:not(.horizontal).badge-meta > span:first-child { white-space: nowrap; } -.status-filtered-badge.badge-meta > span + span { +.status-filtered-badge:not(.horizontal).badge-meta > span + span { display: block; font-size: 9px; font-weight: normal; @@ -601,6 +608,10 @@ left: 0; text-align: center; } +.status-filtered-badge.horizontal.badge-meta > span + span { + font-weight: normal; + text-transform: none; +} .status.large > .container > .content-container { margin-left: calc(-50px - 16px); diff --git a/src/components/timeline.jsx b/src/components/timeline.jsx index 13f8a59..f8cdda4 100644 --- a/src/components/timeline.jsx +++ b/src/components/timeline.jsx @@ -646,7 +646,11 @@ const TimelineItem = memo( > {showCompact ? ( - + ) : useItemID ? ( - {statusPeekText} - {status.sensitive && status.spoilerText && ( + {!!filterInfo ? ( + + Filtered: {filterInfo?.titlesStr || ''} + + ) : ( <> - {' '} - - - + {statusPeekText} + {status.sensitive && status.spoilerText && ( + <> + {' '} + + + + + )} )}