[Glitch] Change background color of notifications on private messages
Port 3ddeaca863
to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
shrike
parent
4f1da814a8
commit
ee2c38fcb8
|
@ -9,7 +9,7 @@ import { navigateToStatus } from 'flavours/glitch/actions/statuses';
|
||||||
import type { IconProp } from 'flavours/glitch/components/icon';
|
import type { IconProp } from 'flavours/glitch/components/icon';
|
||||||
import { Icon } from 'flavours/glitch/components/icon';
|
import { Icon } from 'flavours/glitch/components/icon';
|
||||||
import { RelativeTimestamp } from 'flavours/glitch/components/relative_timestamp';
|
import { RelativeTimestamp } from 'flavours/glitch/components/relative_timestamp';
|
||||||
import { useAppDispatch } from 'flavours/glitch/store';
|
import { useAppSelector, useAppDispatch } from 'flavours/glitch/store';
|
||||||
|
|
||||||
import { AvatarGroup } from './avatar_group';
|
import { AvatarGroup } from './avatar_group';
|
||||||
import { DisplayedName } from './displayed_name';
|
import { DisplayedName } from './displayed_name';
|
||||||
|
@ -60,6 +60,10 @@ export const NotificationGroupWithStatus: React.FC<{
|
||||||
[labelRenderer, accountIds, count, labelSeeMoreHref],
|
[labelRenderer, accountIds, count, labelSeeMoreHref],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const isPrivateMention = useAppSelector(
|
||||||
|
(state) => state.statuses.getIn([statusId, 'visibility']) === 'direct',
|
||||||
|
);
|
||||||
|
|
||||||
const handlers = useMemo(
|
const handlers = useMemo(
|
||||||
() => ({
|
() => ({
|
||||||
open: () => {
|
open: () => {
|
||||||
|
@ -79,7 +83,10 @@ export const NotificationGroupWithStatus: React.FC<{
|
||||||
role='button'
|
role='button'
|
||||||
className={classNames(
|
className={classNames(
|
||||||
`notification-group focusable notification-group--${type}`,
|
`notification-group focusable notification-group--${type}`,
|
||||||
{ 'notification-group--unread': unread },
|
{
|
||||||
|
'notification-group--unread': unread,
|
||||||
|
'notification-group--direct': isPrivateMention,
|
||||||
|
},
|
||||||
)}
|
)}
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
>
|
>
|
||||||
|
|
|
@ -1795,7 +1795,8 @@ body > [data-popper-placement] {
|
||||||
}
|
}
|
||||||
|
|
||||||
.status__wrapper-direct,
|
.status__wrapper-direct,
|
||||||
.notification-ungrouped--direct {
|
.notification-ungrouped--direct,
|
||||||
|
.notification-group--direct {
|
||||||
background: rgba($ui-highlight-color, 0.05);
|
background: rgba($ui-highlight-color, 0.05);
|
||||||
|
|
||||||
&:focus {
|
&:focus {
|
||||||
|
|
Loading…
Reference in New Issue