Feature-gate notification types
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
@ -2,8 +2,7 @@ import React from 'react';
|
||||
import { defineMessages, useIntl } from 'react-intl';
|
||||
|
||||
import { setFilter } from 'soapbox/actions/notifications';
|
||||
import Icon from 'soapbox/components/icon';
|
||||
import { Tabs } from 'soapbox/components/ui';
|
||||
import { Icon, Tabs } from 'soapbox/components/ui';
|
||||
import { useAppDispatch, useFeatures, useSettings } from 'soapbox/hooks';
|
||||
|
||||
import type { Item } from 'soapbox/components/ui/tabs/tabs';
|
||||
@ -46,43 +45,43 @@ const NotificationFilterBar = () => {
|
||||
});
|
||||
} else {
|
||||
items.push({
|
||||
text: <Icon src={require('@tabler/icons/outline/at.svg')} />,
|
||||
text: <Icon className='h-4 w-4' src={require('@tabler/icons/outline/at.svg')} />,
|
||||
title: intl.formatMessage(messages.mentions),
|
||||
action: onClick('mention'),
|
||||
name: 'mention',
|
||||
});
|
||||
items.push({
|
||||
text: <Icon src={require('@tabler/icons/outline/heart.svg')} />,
|
||||
text: <Icon className='h-4 w-4' src={require('@tabler/icons/outline/heart.svg')} />,
|
||||
title: intl.formatMessage(messages.favourites),
|
||||
action: onClick('favourite'),
|
||||
name: 'favourite',
|
||||
});
|
||||
if (features.emojiReacts) items.push({
|
||||
text: <Icon src={require('@tabler/icons/outline/mood-smile.svg')} />,
|
||||
text: <Icon className='h-4 w-4' src={require('@tabler/icons/outline/mood-smile.svg')} />,
|
||||
title: intl.formatMessage(messages.emoji_reacts),
|
||||
action: onClick('pleroma:emoji_reaction'),
|
||||
name: 'pleroma:emoji_reaction',
|
||||
});
|
||||
items.push({
|
||||
text: <Icon src={require('@tabler/icons/outline/repeat.svg')} />,
|
||||
text: <Icon className='h-4 w-4' src={require('@tabler/icons/outline/repeat.svg')} />,
|
||||
title: intl.formatMessage(messages.boosts),
|
||||
action: onClick('reblog'),
|
||||
name: 'reblog',
|
||||
});
|
||||
items.push({
|
||||
text: <Icon src={require('@tabler/icons/outline/chart-bar.svg')} />,
|
||||
if (features.polls) items.push({
|
||||
text: <Icon className='h-4 w-4' src={require('@tabler/icons/outline/chart-bar.svg')} />,
|
||||
title: intl.formatMessage(messages.polls),
|
||||
action: onClick('poll'),
|
||||
name: 'poll',
|
||||
});
|
||||
items.push({
|
||||
text: <Icon src={require('@tabler/icons/outline/bell-ringing.svg')} />,
|
||||
if (features.accountNotifies || features.accountSubscriptions) items.push({
|
||||
text: <Icon className='h-4 w-4' src={require('@tabler/icons/outline/bell-ringing.svg')} />,
|
||||
title: intl.formatMessage(messages.statuses),
|
||||
action: onClick('status'),
|
||||
name: 'status',
|
||||
});
|
||||
items.push({
|
||||
text: <Icon src={require('@tabler/icons/outline/user-plus.svg')} />,
|
||||
text: <Icon className='h-4 w-4' src={require('@tabler/icons/outline/user-plus.svg')} />,
|
||||
title: intl.formatMessage(messages.follows),
|
||||
action: onClick('follow'),
|
||||
name: 'follow',
|
||||
|
||||
Reference in New Issue
Block a user