Emphasize mentions on notifications

This commit is contained in:
Lim Chee Aun 2022-12-21 08:48:11 +08:00
parent 3589438556
commit becb8aa89d
2 changed files with 42 additions and 30 deletions

View file

@ -30,7 +30,7 @@
.notification .status-link { .notification .status-link {
border-radius: 8px 8px 0 0; border-radius: 8px 8px 0 0;
border: 1px solid var(--divider-color); border: 1px solid var(--outline-color);
max-height: 160px; max-height: 160px;
overflow: hidden; overflow: hidden;
/* fade out mask gradient bottom */ /* fade out mask gradient bottom */
@ -41,9 +41,16 @@
); );
filter: saturate(0.25); filter: saturate(0.25);
} }
.notification .status-link.status-type-mention {
max-height: 320px;
filter: none;
background-color: var(--bg-color);
margin-top: calc(-16px - 1px);
}
.notification .status-link:hover { .notification .status-link:hover {
background-color: var(--bg-blur-color); background-color: var(--bg-blur-color);
filter: saturate(1); filter: saturate(1);
border-color: var(--outline-hover-color);
} }
.notification .status-link > * { .notification .status-link > * {
pointer-events: none; pointer-events: none;

View file

@ -82,6 +82,7 @@ function Notification({ notification }) {
/> />
</div> </div>
<div class="notification-content"> <div class="notification-content">
{type !== 'mention' && (
<p> <p>
{!/poll|update/i.test(type) && ( {!/poll|update/i.test(type) && (
<> <>
@ -110,6 +111,7 @@ function Notification({ notification }) {
</span> </span>
)} )}
</p> </p>
)}
{_accounts?.length > 1 && ( {_accounts?.length > 1 && (
<p> <p>
{_accounts.map((account, i) => ( {_accounts.map((account, i) => (
@ -142,7 +144,10 @@ function Notification({ notification }) {
</p> </p>
)} )}
{status && ( {status && (
<Link class="status-link" href={`#/s/${actualStatusID}`}> <Link
class={`status-link status-type-${type}`}
href={`#/s/${actualStatusID}`}
>
<Status status={status} size="s" /> <Status status={status} size="s" />
</Link> </Link>
)} )}