mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-28 12:19:10 +03:00
Respect filters for reply hints
This commit is contained in:
parent
3acfc00ec0
commit
52b60fa38b
2 changed files with 35 additions and 2 deletions
|
@ -404,6 +404,24 @@
|
||||||
font-size: 90%;
|
font-size: 90%;
|
||||||
line-height: var(--avatar-size);
|
line-height: var(--avatar-size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.status-filtered-badge.badge-meta {
|
||||||
|
margin-top: 6px;
|
||||||
|
flex-direction: row;
|
||||||
|
gap: 0.5em;
|
||||||
|
color: var(--text-color);
|
||||||
|
border-color: var(--text-color);
|
||||||
|
background-color: var(--bg-blur-color);
|
||||||
|
max-width: 100%;
|
||||||
|
|
||||||
|
> span + span {
|
||||||
|
position: static;
|
||||||
|
|
||||||
|
&:empty {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.status .container {
|
.status .container {
|
||||||
|
|
|
@ -2405,13 +2405,21 @@ function StatusCompact({ sKey }) {
|
||||||
visibility,
|
visibility,
|
||||||
content,
|
content,
|
||||||
language,
|
language,
|
||||||
|
filtered,
|
||||||
} = status;
|
} = status;
|
||||||
if (sensitive || spoilerText) return null;
|
if (sensitive || spoilerText) return null;
|
||||||
if (!content) return null;
|
if (!content) return null;
|
||||||
|
|
||||||
const srKey = statusKey(id, instance);
|
const srKey = statusKey(id, instance);
|
||||||
|
|
||||||
const statusPeekText = statusPeek(status);
|
const statusPeekText = statusPeek(status);
|
||||||
|
|
||||||
|
const filterContext = useContext(FilterContext);
|
||||||
|
const filterInfo = isFiltered(filtered, filterContext);
|
||||||
|
|
||||||
|
if (filterInfo?.action === 'hide') return null;
|
||||||
|
|
||||||
|
const filterTitleStr = filterInfo?.titlesStr || '';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<article
|
<article
|
||||||
class={`status compact-reply ${
|
class={`status compact-reply ${
|
||||||
|
@ -2427,7 +2435,14 @@ function StatusCompact({ sKey }) {
|
||||||
lang={language}
|
lang={language}
|
||||||
dir="auto"
|
dir="auto"
|
||||||
>
|
>
|
||||||
{statusPeekText}
|
{filterInfo ? (
|
||||||
|
<b class="status-filtered-badge badge-meta" title={filterTitleStr}>
|
||||||
|
<span>Filtered</span>
|
||||||
|
<span>{filterTitleStr}</span>
|
||||||
|
</b>
|
||||||
|
) : (
|
||||||
|
statusPeekText
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Reference in a new issue