Compare commits

...

7 Commits

Author SHA1 Message Date
renovate[bot] f3e694824b
Merge f8222c6ca3 into 65093c619f 2024-04-26 18:09:08 +00:00
Renaud Chaput 65093c619f
Fix marker thunks to not ignore eslint directives for the whole file (#30089) 2024-04-26 17:11:27 +00:00
Claire de4a7bf531
Change moderation warning notification icon (#30081) 2024-04-26 15:33:15 +00:00
renovate[bot] 0cf6cf457d
Update dependency selenium-webdriver to v4.20.1 (#30060)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-26 15:32:48 +00:00
renovate[bot] 17e0a31fe3
Update dependency cssnano to v7 (#30061)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-26 15:32:38 +00:00
Michael Stanclift bb8c6346fb
Reword and rearrange Content Retention page (#27733) 2024-04-26 15:17:41 +00:00
renovate[bot] f8222c6ca3
Update workbox monorepo to v7.1.0 2024-04-23 22:31:44 +00:00
10 changed files with 382 additions and 339 deletions

View File

@ -693,7 +693,7 @@ GEM
scenic (1.8.0)
activerecord (>= 4.0.0)
railties (>= 4.0.0)
selenium-webdriver (4.19.0)
selenium-webdriver (4.20.1)
base64 (~> 0.2)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)

View File

@ -3,7 +3,7 @@ import { List as ImmutableList } from 'immutable';
import { debounce } from 'lodash';
import type { MarkerJSON } from 'mastodon/api_types/markers';
import type { RootState } from 'mastodon/store';
import type { AppDispatch, RootState } from 'mastodon/store';
import { createAppAsyncThunk } from 'mastodon/store/typed_functions';
import api, { authorizationTokenFromState } from '../api';
@ -72,18 +72,21 @@ interface MarkerParam {
}
function getLastHomeId(state: RootState): string | undefined {
/* eslint-disable @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access */
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
return (
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
state
// @ts-expect-error state.timelines is not yet typed
.getIn(['timelines', 'home', 'items'], ImmutableList())
// @ts-expect-error state.timelines is not yet typed
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
.find((item) => item !== null)
);
}
function getLastNotificationId(state: RootState): string | undefined {
// @ts-expect-error state.notifications is not yet typed
// eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call
return state.getIn(['notifications', 'lastReadId']);
}
@ -131,8 +134,8 @@ export const submitMarkersAction = createAppAsyncThunk<{
});
const debouncedSubmitMarkers = debounce(
(dispatch) => {
dispatch(submitMarkersAction());
(dispatch: AppDispatch) => {
void dispatch(submitMarkersAction());
},
300000,
{

View File

@ -1,6 +1,6 @@
import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
import WarningIcon from '@/material-icons/400-24px/warning-fill.svg?react';
import GavelIcon from '@/material-icons/400-24px/gavel.svg?react';
import { Icon } from 'mastodon/components/icon';
// This needs to be kept in sync with app/models/account_warning.rb
@ -62,7 +62,7 @@ export const ModerationWarning: React.FC<Props> = ({ action, id, hidden }) => {
rel='noopener noreferrer'
className='notification__moderation-warning'
>
<Icon id='warning' icon={WarningIcon} />
<Icon id='warning' icon={GavelIcon} />
<div className='notification__moderation-warning__content'>
<p>{intl.formatMessage(messages[action])}</p>

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path d="M160-120v-80h480v80H160Zm226-194L160-540l84-86 228 226-86 86Zm254-254L414-796l86-84 226 226-86 86Zm184 408L302-682l56-56 522 522-56 56Z"/></svg>

After

Width:  |  Height:  |  Size: 241 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path d="M160-120v-80h480v80H160Zm226-194L160-540l84-86 228 226-86 86Zm254-254L414-796l86-84 226 226-86 86Zm184 408L302-682l56-56 522 522-56 56Z"/></svg>

After

Width:  |  Height:  |  Size: 241 B

View File

@ -14,14 +14,18 @@
= f.input :media_cache_retention_period,
input_html: { pattern: '[0-9]+' },
wrapper: :with_block_label
= f.input :backups_retention_period,
input_html: { pattern: '[0-9]+' },
wrapper: :with_block_label
%h4= t('admin.settings.content_retention.danger_zone')
.fields-group
= f.input :content_cache_retention_period,
hint: false,
input_html: { pattern: '[0-9]+' },
warning_hint: t('simple_form.hints.form_admin_settings.content_cache_retention_period'),
wrapper: :with_block_label
= f.input :backups_retention_period,
input_html: { pattern: '[0-9]+' },
wrapper: :with_block_label
.actions
= f.button :button, t('generic.save_changes'), type: :submit

View File

@ -751,6 +751,7 @@ en:
desc_html: This relies on external scripts from hCaptcha, which may be a security and privacy concern. In addition, <strong>this can make the registration process significantly less accessible to some (especially disabled) people</strong>. For these reasons, please consider alternative measures such as approval-based or invite-based registration.
title: Require new users to solve a CAPTCHA to confirm their account
content_retention:
danger_zone: Danger zone
preamble: Control how user-generated content is stored in Mastodon.
title: Content retention
default_noindex:

View File

@ -77,13 +77,13 @@ en:
warn: Hide the filtered content behind a warning mentioning the filter's title
form_admin_settings:
activity_api_enabled: Counts of locally published posts, active users, and new registrations in weekly buckets
backups_retention_period: Keep generated user archives for the specified number of days.
backups_retention_period: Users have the ability to generate archives of their posts to download later. When set to a positive value, these archives will be automatically deleted from your storage after the specified number of days.
bootstrap_timeline_accounts: These accounts will be pinned to the top of new users' follow recommendations.
closed_registrations_message: Displayed when sign-ups are closed
content_cache_retention_period: All posts and boosts from other servers will be deleted after the specified number of days. Some posts may not be recoverable. All related bookmarks, favourites and boosts will also be lost and impossible to undo.
content_cache_retention_period: All posts from other servers (including boosts and replies) will be deleted after the specified number of days, without regard to any local user interaction with those posts. This includes posts where a local user has marked it as bookmarks or favorites. Private mentions between users from different instances will also be lost and impossible to restore. Use of this setting is intended for special purpose instances and breaks many user expectations when implemented for general purpose use.
custom_css: You can apply custom styles on the web version of Mastodon.
mascot: Overrides the illustration in the advanced web interface.
media_cache_retention_period: Downloaded media files will be deleted after the specified number of days when set to a positive value, and re-downloaded on demand.
media_cache_retention_period: Media files from posts made by remote users are cached on your server. When set to a positive value, media will be deleted after the specified number of days. If the media data is requested after it is deleted, it will be re-downloaded, if the source content is still available. Due to restrictions on how often link preview cards poll third-party sites, it is recommended to set this value to at least 14 days, or link preview cards will not be updated on demand before that time.
peers_api_enabled: A list of domain names this server has encountered in the fediverse. No data is included here about whether you federate with a given server, just that your server knows about it. This is used by services that collect statistics on federation in a general sense.
profile_directory: The profile directory lists all users who have opted-in to be discoverable.
require_invite_text: When sign-ups require manual approval, make the “Why do you want to join?” text input mandatory rather than optional
@ -243,7 +243,7 @@ en:
backups_retention_period: User archive retention period
bootstrap_timeline_accounts: Always recommend these accounts to new users
closed_registrations_message: Custom message when sign-ups are not available
content_cache_retention_period: Content cache retention period
content_cache_retention_period: Remote content retention period
custom_css: Custom CSS
mascot: Custom mascot (legacy)
media_cache_retention_period: Media cache retention period

View File

@ -66,7 +66,7 @@
"core-js": "^3.30.2",
"cross-env": "^7.0.3",
"css-loader": "^5.2.7",
"cssnano": "^6.0.1",
"cssnano": "^7.0.0",
"detect-passive-events": "^2.0.3",
"emoji-mart": "npm:emoji-mart-lazyload@latest",
"escape-html": "^1.0.3",

681
yarn.lock

File diff suppressed because it is too large Load Diff