Merge commit 'b48f907b20e2c9909665a484041845697d26f17c' into glitch-soc/merge-upstream
Conflicts: - `app/helpers/settings_helper.rb`: Upstream added a new helper. Conflict caused by the fact there is a glitch-soc specific helper. Added upstream's new helper in addition to glitch-soc's.
This commit is contained in:
commit
e08c8b6933
268 files changed
+2079
-396
No files matched your search
@@ -54,7 +54,8 @@ const messages = defineMessages({
|
||||
},
|
||||
});
|
||||
|
||||
const MAX_LENGTH = 1500;
|
||||
// TODO: use `description_limit` from the `/api/v2/instance` response
|
||||
const MAX_LENGTH = 10000;
|
||||
|
||||
type FocalPoint = [number, number];
|
||||
|
||||
|
||||
@@ -88,6 +88,13 @@ export const PolicyControls: React.FC = () => {
|
||||
[dispatch],
|
||||
);
|
||||
|
||||
const handleFilterBots = useCallback(
|
||||
(value: string) => {
|
||||
changeFilter(dispatch, 'for_bots', value);
|
||||
},
|
||||
[dispatch],
|
||||
);
|
||||
|
||||
if (!notificationPolicy) return null;
|
||||
|
||||
const options = [
|
||||
@@ -209,6 +216,24 @@ export const PolicyControls: React.FC = () => {
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
<SelectWithLabel
|
||||
value={notificationPolicy.for_bots}
|
||||
onChange={handleFilterBots}
|
||||
options={options}
|
||||
label={
|
||||
<FormattedMessage
|
||||
id='notifications.policy.filter_bots_title'
|
||||
defaultMessage='Bots'
|
||||
/>
|
||||
}
|
||||
hint={
|
||||
<FormattedMessage
|
||||
id='notifications.policy.filter_bots_hint'
|
||||
defaultMessage='Accounts marked as automated'
|
||||
/>
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
|
||||
@@ -48,6 +48,9 @@ export const IgnoreNotificationsModal = ({ filterType }) => {
|
||||
case 'for_limited_accounts':
|
||||
title = <FormattedMessage id='ignore_notifications_modal.limited_accounts_title' defaultMessage='Ignore notifications from moderated accounts?' />;
|
||||
break;
|
||||
case 'for_bots':
|
||||
title = <FormattedMessage id='ignore_notifications_modal.bots_title' defaultMessage='Ignore notifications from bots?' />;
|
||||
break;
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in new issue
Block a user