Merge commit '137d5801544ca5b8078ce2242ff3b5505e648166' into glitch-soc/merge-upstream
Conflicts: - `app/models/account.rb`: Upstream changed the display name length limit for local users, but glitch-soc has a configurable limit. Updated the default limit to be upstream's new limit.
This commit is contained in:
commit
6de300141c
28 files changed
+130
-217
No files matched your search
@@ -2,20 +2,11 @@
|
||||
|
||||
exports[`<Avatar /> > Autoplay > renders a animated avatar 1`] = `
|
||||
<span
|
||||
className="account__avatar account__avatar--loading"
|
||||
onMouseEnter={[Function]}
|
||||
onMouseLeave={[Function]}
|
||||
style={
|
||||
{
|
||||
"height": "100px",
|
||||
"width": "100px",
|
||||
}
|
||||
}
|
||||
class="account__avatar account__avatar--loading"
|
||||
style="width: 100px; height: 100px;"
|
||||
>
|
||||
<img
|
||||
alt=""
|
||||
onError={[Function]}
|
||||
onLoad={[Function]}
|
||||
src="/animated/alice.gif"
|
||||
/>
|
||||
</span>
|
||||
@@ -23,20 +14,11 @@ exports[`<Avatar /> > Autoplay > renders a animated avatar 1`] = `
|
||||
|
||||
exports[`<Avatar /> > Still > renders a still avatar 1`] = `
|
||||
<span
|
||||
className="account__avatar account__avatar--loading"
|
||||
onMouseEnter={[Function]}
|
||||
onMouseLeave={[Function]}
|
||||
style={
|
||||
{
|
||||
"height": "100px",
|
||||
"width": "100px",
|
||||
}
|
||||
}
|
||||
class="account__avatar account__avatar--loading"
|
||||
style="width: 100px; height: 100px;"
|
||||
>
|
||||
<img
|
||||
alt=""
|
||||
onError={[Function]}
|
||||
onLoad={[Function]}
|
||||
src="/static/alice.jpg"
|
||||
/>
|
||||
</span>
|
||||
|
||||
+8
-27
@@ -2,50 +2,31 @@
|
||||
|
||||
exports[`<AvatarOverlay > renders a overlay avatar 1`] = `
|
||||
<div
|
||||
className="account__avatar-overlay"
|
||||
onMouseEnter={[Function]}
|
||||
onMouseLeave={[Function]}
|
||||
style={
|
||||
{
|
||||
"height": 46,
|
||||
"width": 46,
|
||||
}
|
||||
}
|
||||
class="account__avatar-overlay"
|
||||
style="width: 46px; height: 46px;"
|
||||
>
|
||||
<div
|
||||
className="account__avatar-overlay-base"
|
||||
class="account__avatar-overlay-base"
|
||||
>
|
||||
<div
|
||||
className="account__avatar"
|
||||
style={
|
||||
{
|
||||
"height": "36px",
|
||||
"width": "36px",
|
||||
}
|
||||
}
|
||||
class="account__avatar"
|
||||
style="width: 36px; height: 36px;"
|
||||
>
|
||||
<img
|
||||
alt="alice"
|
||||
onError={[Function]}
|
||||
src="/static/alice.jpg"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="account__avatar-overlay-overlay"
|
||||
class="account__avatar-overlay-overlay"
|
||||
>
|
||||
<div
|
||||
className="account__avatar"
|
||||
style={
|
||||
{
|
||||
"height": "24px",
|
||||
"width": "24px",
|
||||
}
|
||||
}
|
||||
class="account__avatar"
|
||||
style="width: 24px; height: 24px;"
|
||||
>
|
||||
<img
|
||||
alt="eve@blackhat.lair"
|
||||
onError={[Function]}
|
||||
src="/static/eve.jpg"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -2,41 +2,36 @@
|
||||
|
||||
exports[`<Button /> > adds class "button-secondary" if props.secondary given 1`] = `
|
||||
<button
|
||||
className="button button-secondary"
|
||||
onClick={[Function]}
|
||||
class="button button-secondary"
|
||||
type="button"
|
||||
/>
|
||||
`;
|
||||
|
||||
exports[`<Button /> > renders a button element 1`] = `
|
||||
<button
|
||||
className="button"
|
||||
onClick={[Function]}
|
||||
class="button"
|
||||
type="button"
|
||||
/>
|
||||
`;
|
||||
|
||||
exports[`<Button /> > renders a disabled attribute if props.disabled given 1`] = `
|
||||
<button
|
||||
className="button"
|
||||
disabled={true}
|
||||
onClick={[Function]}
|
||||
class="button"
|
||||
disabled=""
|
||||
type="button"
|
||||
/>
|
||||
`;
|
||||
|
||||
exports[`<Button /> > renders class="button--block" if props.block given 1`] = `
|
||||
<button
|
||||
className="button button--block"
|
||||
onClick={[Function]}
|
||||
class="button button--block"
|
||||
type="button"
|
||||
/>
|
||||
`;
|
||||
|
||||
exports[`<Button /> > renders the children 1`] = `
|
||||
<button
|
||||
className="button"
|
||||
onClick={[Function]}
|
||||
class="button"
|
||||
type="button"
|
||||
>
|
||||
<p>
|
||||
@@ -47,8 +42,7 @@ exports[`<Button /> > renders the children 1`] = `
|
||||
|
||||
exports[`<Button /> > renders the given text 1`] = `
|
||||
<button
|
||||
className="button"
|
||||
onClick={[Function]}
|
||||
class="button"
|
||||
type="button"
|
||||
>
|
||||
foo
|
||||
@@ -57,8 +51,7 @@ exports[`<Button /> > renders the given text 1`] = `
|
||||
|
||||
exports[`<Button /> > renders the props.text instead of children 1`] = `
|
||||
<button
|
||||
className="button"
|
||||
onClick={[Function]}
|
||||
class="button"
|
||||
type="button"
|
||||
>
|
||||
foo
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
import renderer from 'react-test-renderer';
|
||||
import { render } from '@/testing/rendering';
|
||||
|
||||
import { accountDefaultValues, createAccountFromServerJSON } from '@/mastodon/models/account';
|
||||
|
||||
@@ -19,19 +19,17 @@ describe('<Avatar />', () => {
|
||||
|
||||
describe('Autoplay', () => {
|
||||
it('renders a animated avatar', () => {
|
||||
const component = renderer.create(<Avatar account={account} animate size={size} />);
|
||||
const tree = component.toJSON();
|
||||
const { container } = render(<Avatar account={account} animate size={size} />);
|
||||
|
||||
expect(tree).toMatchSnapshot();
|
||||
expect(container.firstChild).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
||||
describe('Still', () => {
|
||||
it('renders a still avatar', () => {
|
||||
const component = renderer.create(<Avatar account={account} size={size} />);
|
||||
const tree = component.toJSON();
|
||||
const { container } = render(<Avatar account={account} size={size} />);
|
||||
|
||||
expect(tree).toMatchSnapshot();
|
||||
expect(container.firstChild).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { fromJS } from 'immutable';
|
||||
|
||||
import renderer from 'react-test-renderer';
|
||||
import { render } from '@/testing/rendering';
|
||||
|
||||
import { AvatarOverlay } from '../avatar_overlay';
|
||||
|
||||
@@ -22,9 +22,8 @@ describe('<AvatarOverlay', () => {
|
||||
});
|
||||
|
||||
it('renders a overlay avatar', () => {
|
||||
const component = renderer.create(<AvatarOverlay account={account} friend={friend} />);
|
||||
const tree = component.toJSON();
|
||||
const { container } = render(<AvatarOverlay account={account} friend={friend} />);
|
||||
|
||||
expect(tree).toMatchSnapshot();
|
||||
expect(container.firstChild).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
@@ -1,23 +1,19 @@
|
||||
import renderer from 'react-test-renderer';
|
||||
|
||||
import { render, fireEvent, screen } from '@/testing/rendering';
|
||||
|
||||
import { Button } from '../button';
|
||||
|
||||
describe('<Button />', () => {
|
||||
it('renders a button element', () => {
|
||||
const component = renderer.create(<Button />);
|
||||
const tree = component.toJSON();
|
||||
const { container } = render(<Button />);
|
||||
|
||||
expect(tree).toMatchSnapshot();
|
||||
expect(container.firstChild).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('renders the given text', () => {
|
||||
const text = 'foo';
|
||||
const component = renderer.create(<Button text={text} />);
|
||||
const tree = component.toJSON();
|
||||
const { container } = render(<Button text={text} />);
|
||||
|
||||
expect(tree).toMatchSnapshot();
|
||||
expect(container.firstChild).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('handles click events using the given handler', () => {
|
||||
@@ -37,40 +33,35 @@ describe('<Button />', () => {
|
||||
});
|
||||
|
||||
it('renders a disabled attribute if props.disabled given', () => {
|
||||
const component = renderer.create(<Button disabled />);
|
||||
const tree = component.toJSON();
|
||||
const { container } = render(<Button disabled />);
|
||||
|
||||
expect(tree).toMatchSnapshot();
|
||||
expect(container.firstChild).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('renders the children', () => {
|
||||
const children = <p>children</p>;
|
||||
const component = renderer.create(<Button>{children}</Button>);
|
||||
const tree = component.toJSON();
|
||||
const { container } = render(<Button>{children}</Button>);
|
||||
|
||||
expect(tree).toMatchSnapshot();
|
||||
expect(container.firstChild).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('renders the props.text instead of children', () => {
|
||||
const text = 'foo';
|
||||
const children = <p>children</p>;
|
||||
const component = renderer.create(<Button text={text}>{children}</Button>);
|
||||
const tree = component.toJSON();
|
||||
const { container } = render(<Button text={text}>{children}</Button>);
|
||||
|
||||
expect(tree).toMatchSnapshot();
|
||||
expect(container.firstChild).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('renders class="button--block" if props.block given', () => {
|
||||
const component = renderer.create(<Button block />);
|
||||
const tree = component.toJSON();
|
||||
const { container } = render(<Button block />);
|
||||
|
||||
expect(tree).toMatchSnapshot();
|
||||
expect(container.firstChild).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('adds class "button-secondary" if props.secondary given', () => {
|
||||
const component = renderer.create(<Button secondary />);
|
||||
const tree = component.toJSON();
|
||||
const { container } = render(<Button secondary />);
|
||||
|
||||
expect(tree).toMatchSnapshot();
|
||||
expect(container.firstChild).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
@@ -1,4 +1,5 @@
|
||||
.counter {
|
||||
display: block;
|
||||
margin-top: 4px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import type { ComponentType, ReactNode } from 'react';
|
||||
|
||||
import { defineMessage, FormattedMessage, useIntl } from 'react-intl';
|
||||
|
||||
@@ -142,6 +143,21 @@ const FilteredQuote: React.FC<{
|
||||
);
|
||||
};
|
||||
|
||||
// Adds a wrapper around StatusContainer as the types aren't inheriting correctly with Redux + React 19.
|
||||
// TODO: Remove this after the Status component is in TS.
|
||||
interface StatusContainerForQuotesProps {
|
||||
id?: string | null;
|
||||
contextType?: string;
|
||||
isQuotedPost?: boolean;
|
||||
avatarSize?: number;
|
||||
headerRenderFn?: StatusHeaderRenderFn;
|
||||
children?: ReactNode;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
const StatusContainerWithChildren =
|
||||
StatusContainer as unknown as ComponentType<StatusContainerForQuotesProps>;
|
||||
|
||||
interface QuotedStatusProps {
|
||||
quote: QuoteMap;
|
||||
contextType?: string;
|
||||
@@ -338,7 +354,7 @@ export const QuotedStatus: React.FC<QuotedStatusProps> = ({
|
||||
|
||||
return (
|
||||
<div className='status__quote'>
|
||||
<StatusContainer
|
||||
<StatusContainerWithChildren
|
||||
isQuotedPost
|
||||
id={quotedStatusId}
|
||||
contextType={contextType}
|
||||
@@ -356,7 +372,7 @@ export const QuotedStatus: React.FC<QuotedStatusProps> = ({
|
||||
nestingLevel={nestingLevel + 1}
|
||||
/>
|
||||
)}
|
||||
</StatusContainer>
|
||||
</StatusContainerWithChildren>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
@@ -383,15 +399,15 @@ export const StatusQuoteManager = (props: StatusQuoteManagerProps) => {
|
||||
|
||||
if (quote) {
|
||||
return (
|
||||
<StatusContainer {...props}>
|
||||
<StatusContainerWithChildren {...props}>
|
||||
<QuotedStatus
|
||||
quote={quote}
|
||||
parentQuotePostId={status?.get('id') as string}
|
||||
contextType={props.contextType}
|
||||
/>
|
||||
</StatusContainer>
|
||||
</StatusContainerWithChildren>
|
||||
);
|
||||
}
|
||||
|
||||
return <StatusContainer {...props} />;
|
||||
return <StatusContainerWithChildren {...props} />;
|
||||
};
|
||||
@@ -22,8 +22,9 @@ const messages = defineMessages({
|
||||
violation_description: { id: 'report.reasons.violation_description', defaultMessage: 'You are aware that it breaks specific rules' },
|
||||
other: { id: 'report.reasons.other', defaultMessage: 'It\'s something else' },
|
||||
other_description: { id: 'report.reasons.other_description', defaultMessage: 'The issue does not fit into other categories' },
|
||||
status: { id: 'report.category.title_status', defaultMessage: 'post' },
|
||||
account: { id: 'report.category.title_account', defaultMessage: 'profile' },
|
||||
status: { id: 'report.category.title_status', defaultMessage: "Tell us what's going on with this post" },
|
||||
account: { id: 'report.category.title_account', defaultMessage: "Tell us what's going on with this profile" },
|
||||
collection: { id: 'report.category.title_collection', defaultMessage: "Tell us what's going on with this collection"}
|
||||
});
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
@@ -88,14 +89,7 @@ class Category extends PureComponent {
|
||||
return (
|
||||
<>
|
||||
<NavigationFocusTarget as='h1' className='report-dialog-modal__title'>
|
||||
{startedFrom === 'collection' ? (
|
||||
<FormattedMessage
|
||||
id='report.collection_comment'
|
||||
defaultMessage='Why do you want to report this collection?'
|
||||
/>
|
||||
) : (
|
||||
<FormattedMessage id='report.category.title' defaultMessage="Tell us what's going on with this {type}" values={{ type: intl.formatMessage(messages[startedFrom]) }} />
|
||||
)}
|
||||
{intl.formatMessage(messages[startedFrom])}
|
||||
</NavigationFocusTarget>
|
||||
<p className='report-dialog-modal__lead'><FormattedMessage id='report.category.subtitle' defaultMessage='Choose the best match' /></p>
|
||||
|
||||
|
||||
@@ -561,6 +561,7 @@
|
||||
"confirmations.remove_from_followers.message": "{name} will stop following you. Are you sure you want to proceed?",
|
||||
"confirmations.remove_from_followers.title": "Remove follower?",
|
||||
"confirmations.revoke_collection_inclusion.confirm": "Remove me",
|
||||
"confirmations.revoke_collection_inclusion.message": "The curator won't be able to re-add you to this collection for 24 hours. To prevent them from adding you to collections permanently, you can block them.",
|
||||
"confirmations.revoke_collection_inclusion.title": "Remove yourself from this collection?",
|
||||
"confirmations.revoke_quote.confirm": "Remove post",
|
||||
"confirmations.revoke_quote.message": "This action cannot be undone.",
|
||||
@@ -648,6 +649,7 @@
|
||||
"empty_column.collections": "{acct} has not created any collections yet.",
|
||||
"empty_column.collections.featured_in": "You have not been added to any collections yet.",
|
||||
"empty_column.collections.featured_in_undiscoverable": "In order for people to add you to collections, you need to allow featuring in discovery experiences from <link>Preferences > Privacy and reach</link>",
|
||||
"empty_column.collections_self": "You have not created any collections yet.",
|
||||
"empty_column.community": "The local timeline is empty. Write something publicly to get the ball rolling!",
|
||||
"empty_column.direct": "You don't have any private mentions yet. When you send or receive one, it will show up here.",
|
||||
"empty_column.disabled_feed": "This feed has been disabled by your server administrators.",
|
||||
@@ -779,6 +781,7 @@
|
||||
"home.pending_critical_update.link": "See updates",
|
||||
"home.pending_critical_update.title": "Critical security update available!",
|
||||
"home.show_announcements": "Show announcements",
|
||||
"ignore_notifications_modal.bots_title": "Ignore notifications from bots?",
|
||||
"ignore_notifications_modal.disclaimer": "Mastodon cannot inform users that you've ignored their notifications. Ignoring notifications will not stop the messages themselves from being sent.",
|
||||
"ignore_notifications_modal.filter_instead": "Filter instead",
|
||||
"ignore_notifications_modal.filter_to_act_users": "You'll still be able to accept, reject, or report users",
|
||||
@@ -845,6 +848,7 @@
|
||||
"keyboard_shortcuts.toggle_sensitivity": "Show/hide media",
|
||||
"keyboard_shortcuts.toot": "to start a brand new post",
|
||||
"keyboard_shortcuts.top": "Move to top of list",
|
||||
"keyboard_shortcuts.translate": "Translate a post",
|
||||
"keyboard_shortcuts.unfocus": "to un-focus compose textarea/search",
|
||||
"keyboard_shortcuts.up": "Move up in the list",
|
||||
"learn_more_link.got_it": "Got it",
|
||||
@@ -1040,6 +1044,8 @@
|
||||
"notifications.policy.drop": "Ignore",
|
||||
"notifications.policy.drop_hint": "Send to the void, never to be seen again",
|
||||
"notifications.policy.filter": "Filter",
|
||||
"notifications.policy.filter_bots_hint": "Accounts marked as automated",
|
||||
"notifications.policy.filter_bots_title": "Bots",
|
||||
"notifications.policy.filter_hint": "Send to filtered notifications inbox",
|
||||
"notifications.policy.filter_limited_accounts_hint": "Limited by server moderators",
|
||||
"notifications.policy.filter_limited_accounts_title": "Moderated accounts",
|
||||
|
||||
@@ -1138,11 +1138,10 @@
|
||||
"report.categories.spam": "Spam",
|
||||
"report.categories.violation": "Content violates one or more server rules",
|
||||
"report.category.subtitle": "Choose the best match",
|
||||
"report.category.title": "Tell us what's going on with this {type}",
|
||||
"report.category.title_account": "profile",
|
||||
"report.category.title_status": "post",
|
||||
"report.category.title_account": "Tell us what's going on with this profile",
|
||||
"report.category.title_collection": "Tell us what's going on with this collection",
|
||||
"report.category.title_status": "Tell us what's going on with this post",
|
||||
"report.close": "Done",
|
||||
"report.collection_comment": "Why do you want to report this collection?",
|
||||
"report.comment.title": "Is there anything else you think we should know?",
|
||||
"report.forward": "Forward to {target}",
|
||||
"report.forward_hint": "The account is from another server. Send an anonymized copy of the report there as well?",
|
||||
|
||||
@@ -649,7 +649,7 @@
|
||||
"empty_column.collections": "{acct} todavía no creó ninguna colección.",
|
||||
"empty_column.collections.featured_in": "Todavía no te agregaron a ninguna colección.",
|
||||
"empty_column.collections.featured_in_undiscoverable": "Para que la gente pueda agregarte a colecciones, tenés que permitir que te destacen en las experiencias de descubrimiento en <link>Configuración > Privacidad y alcance</link>",
|
||||
"empty_column.collections_self": "Aún no has creado ninguna colección.",
|
||||
"empty_column.collections_self": "Todavía no creaste ninguna colección.",
|
||||
"empty_column.community": "La línea temporal local está vacía. ¡Escribí algo en modo público para que se empiece a correr la bola!",
|
||||
"empty_column.direct": "Todavía no tenés ninguna mención privada. Cuando enviés o recibás una, se mostrará acá.",
|
||||
"empty_column.disabled_feed": "Esta línea temporal fue deshabilitada por los administradores de tu servidor.",
|
||||
@@ -1090,18 +1090,18 @@
|
||||
"poll_button.add_poll": "Agregar encuesta",
|
||||
"poll_button.remove_poll": "Quitar encuesta",
|
||||
"privacy.change": "Configurar privacidad del mensaje",
|
||||
"privacy.direct.long": "Todas las cuentas mencionadas en el mensaje",
|
||||
"privacy.direct.short": "Mención privada",
|
||||
"privacy.private.long": "Solo tus seguidores",
|
||||
"privacy.private.short": "Seguidores",
|
||||
"privacy.public.long": "Cualquier persona dentro y fuera de Mastodon",
|
||||
"privacy.public.short": "Público",
|
||||
"privacy.direct.long": "Visible solo para todas las cuentas mencionadas en el mensaje",
|
||||
"privacy.direct.short": "Visibilidad de mención privada",
|
||||
"privacy.private.long": "Visible solo para tus seguidores",
|
||||
"privacy.private.short": "Visibilidad solo para seguidores",
|
||||
"privacy.public.long": "Visible en Mastodon en los resultados de búsqueda, tendencias y líneas temporales públicas",
|
||||
"privacy.public.short": "Visibilidad pública",
|
||||
"privacy.quote.anyone": "{visibility}, citas permitidas",
|
||||
"privacy.quote.disabled": "{visibility}, citas deshabilitadas",
|
||||
"privacy.quote.limited": "{visibility}, citas limitadas",
|
||||
"privacy.unlisted.additional": "Esto se comporta exactamente igual que con la configuración de privacidad de mensaje «Público», excepto que el mensaje no aparecerá en las líneas temporales en vivo, ni en las etiquetas, ni en la línea temporal «Explorá», ni en la búsqueda de Mastodon; incluso si optaste por hacer tu cuenta visible.",
|
||||
"privacy.unlisted.long": "Oculto de los resultados de búsqueda, tendencias y líneas temporales públicas de Mastodon",
|
||||
"privacy.unlisted.short": "Público pero silencioso",
|
||||
"privacy.unlisted.long": "Oculto en Mastodon de los resultados de búsqueda, tendencias y líneas temporales públicas",
|
||||
"privacy.unlisted.short": "Visibilidad pública pero silenciosa",
|
||||
"privacy_policy.last_updated": "Última actualización: {date}",
|
||||
"privacy_policy.title": "Política de privacidad",
|
||||
"quote_error.edit": "Las citas no se pueden agregar al editar un mensaje.",
|
||||
|
||||
@@ -408,7 +408,7 @@
|
||||
"collections.list.collections_with_count": "{count, plural, one {# Verzameling} other {# Verzamelingen}}",
|
||||
"collections.list.created_by_author": "Aangemaakt door {name}",
|
||||
"collections.list.created_by_you": "Aangemaakt door jou",
|
||||
"collections.list.featuring_you": "Uitgelicht door jou",
|
||||
"collections.list.featuring_you": "Met jou",
|
||||
"collections.manage_accounts": "Accounts beheren",
|
||||
"collections.mark_as_sensitive": "Als gevoelig markeren",
|
||||
"collections.mark_as_sensitive_hint": "Verbergt de omschrijving en de accounts van de verzameling achter een waarschuwing. De naam van de verzameling blijft zichtbaar.",
|
||||
|
||||
@@ -18,7 +18,7 @@ export const WithOptionalRouterPropTypes = {
|
||||
|
||||
export interface OptionalRouterProps {
|
||||
ref: unknown;
|
||||
wrappedComponentRef: unknown;
|
||||
wrappedComponentRef?: string | ((...args: unknown[]) => unknown) | object;
|
||||
}
|
||||
|
||||
// This is copied from https://github.com/remix-run/react-router/blob/v5.3.4/packages/react-router/modules/withRouter.js
|
||||
@@ -54,14 +54,6 @@ export function withOptionalRouter<
|
||||
|
||||
C.displayName = displayName;
|
||||
C.WrappedComponent = Component;
|
||||
C.propTypes = {
|
||||
...Component.propTypes,
|
||||
wrappedComponentRef: PropTypes.oneOfType([
|
||||
PropTypes.string,
|
||||
PropTypes.func,
|
||||
PropTypes.object,
|
||||
]),
|
||||
};
|
||||
|
||||
return hoistStatics(C, Component);
|
||||
}
|
||||
@@ -76,7 +76,7 @@ class Account < ApplicationRecord
|
||||
URL_PREFIX_RE = %r{\Ahttp(s?)://[^/]+}
|
||||
USERNAME_ONLY_RE = /\A#{USERNAME_RE}\z/i
|
||||
USERNAME_LENGTH_LIMIT = 30
|
||||
DISPLAY_NAME_LENGTH_LIMIT = (ENV['MAX_DISPLAY_NAME_CHARS'] || 30).to_i
|
||||
DISPLAY_NAME_LENGTH_LIMIT = (ENV['MAX_DISPLAY_NAME_CHARS'] || 40).to_i
|
||||
NOTE_LENGTH_LIMIT = (ENV['MAX_BIO_CHARS'] || 500).to_i
|
||||
|
||||
# Hard limits for federated content
|
||||
|
||||
@@ -4,6 +4,7 @@ be:
|
||||
about_mastodon_html: 'Сацыяльная сетка будучыні: без рэкламы, без карпаратыўнага назірання, этычны дызайн і дэцэнтралізацыя! Валодайце сваімі данымі з Mastodon!'
|
||||
contact_missing: Не зададзены
|
||||
contact_unavailable: Недаступна
|
||||
default_thumbnail_description: Два намаляваныя мастадонты з усмешкамі (якія выглядаюць як слонікі) перакідваюцца паміж сабой папяровым самалёцікам. Іх акружае блакітнае неба і планеты з дрэвамі і іншымі мастадонтамі на іх.
|
||||
hosted_on: Mastodon месціцца на %{domain}
|
||||
title: Пра нас
|
||||
accounts:
|
||||
|
||||
@@ -4,6 +4,7 @@ fi:
|
||||
about_mastodon_html: 'Tulevaisuuden sosiaalinen verkosto: ei mainoksia, ei valvontaa, toteutettu avoimilla protokollilla ja hajautettu rakenne! Pidä tietosi ominasi Mastodonin avulla!'
|
||||
contact_missing: Ei asetettu
|
||||
contact_unavailable: Ei saatavilla
|
||||
default_thumbnail_description: Kaksi hymyilevää sarjakuvamastodonttia (jotka näyttävät norsuilta) heittelee paperilennokkia toisilleen. Taustalla on kirkkaansininen taivas ja kelluvia planeettoja, joilla on puita ja lisää mastodontteja.
|
||||
hosted_on: Mastodon palvelimella %{domain}
|
||||
title: Tietoja
|
||||
accounts:
|
||||
|
||||
@@ -4,6 +4,7 @@ fr-CA:
|
||||
about_mastodon_html: 'Le réseau social de l''avenir : pas de publicité, pas de surveillance institutionnelle, conception éthique et décentralisation ! Gardez le contrôle de vos données avec Mastodon !'
|
||||
contact_missing: Non défini
|
||||
contact_unavailable: Non disponible
|
||||
default_thumbnail_description: Un dessin représentant deux mastodontes (qui ressemblent à des éléphants) souriants qui se lancent un avion en papier. Derrière eux flottent des planètes avec des arbres et d'autres mastodontes, et en fond un ciel bleu vif.
|
||||
hosted_on: Serveur Mastodon hébergé sur %{domain}
|
||||
title: À propos
|
||||
accounts:
|
||||
|
||||
@@ -4,6 +4,7 @@ fr:
|
||||
about_mastodon_html: 'Le réseau social de l''avenir : pas de publicité, pas de surveillance institutionnelle, conception éthique et décentralisation ! Gardez le contrôle de vos données avec Mastodon !'
|
||||
contact_missing: Non défini
|
||||
contact_unavailable: Non disponible
|
||||
default_thumbnail_description: Un dessin représentant deux mastodontes (qui ressemblent à des éléphants) souriants qui se lancent un avion en papier. Derrière eux flottent des planètes avec des arbres et d'autres mastodontes, et en fond un ciel bleu vif.
|
||||
hosted_on: Serveur Mastodon hébergé sur %{domain}
|
||||
title: À propos
|
||||
accounts:
|
||||
|
||||
@@ -4,6 +4,7 @@ ga:
|
||||
about_mastodon_html: 'Líonra sóisialta a sheasfaidh an aimsir: Gan fógraíocht, gan faire chorparáideach, le leagan amach eiticiúil agus dílárú. Bíodh do chuid sonraí agatsa féin le Mastodon!'
|
||||
contact_missing: Gan socrú
|
||||
contact_unavailable: N/A
|
||||
default_thumbnail_description: Beirt mhastodón cartúin (atá cosúil le heilifintí) ag aoibh gháire agus ag caitheamh eitleáin páipéir eatarthu. Tá spéir ghorm gheal agus pláinéid ar snámh timpeall orthu, crainn agus níos mó mhastodón orthu.
|
||||
hosted_on: Mastodon arna óstáil ar %{domain}
|
||||
title: Maidir le
|
||||
accounts:
|
||||
|
||||
@@ -4,6 +4,7 @@ gl:
|
||||
about_mastodon_html: 'A rede social do futuro: Sen publicidade, sen seguimento por empresas, deseño ético e descentralización! En Mastodon ti posúes os teus datos!'
|
||||
contact_missing: Non establecido
|
||||
contact_unavailable: Non dispoñíbel
|
||||
default_thumbnail_description: Dous mastodóns sorrintes debuxados (que semellan elefantes) tiran un avión de papel polo aire entre eles. De fondo vese o ceo azul con planetas flotando entre árbores e máis mastodóns neles.
|
||||
hosted_on: Mastodon aloxado en %{domain}
|
||||
title: Sobre
|
||||
accounts:
|
||||
|
||||
@@ -4,6 +4,7 @@ he:
|
||||
about_mastodon_html: מסטודון היא רשת חברתית <em>חופשית, מבוססת תוכנה חופשית ("קוד פתוח")</em>. כאלטרנטיבה <em>בלתי ריכוזית</em> לפלטפרומות המסחריות, מסטודון מאפשרת להמנע מהסיכונים הנלווים להפקדת התקשורת שלך בידי חברה יחידה. שמת את מבטחך בשרת אחד — לא משנה במי בחרת, תמיד אפשר לדבר עם כל שאר המשתמשים. לכל מי שרוצה יש את האפשרות להקים שרת מסטודון עצמאי, ולהשתתף ב<em>רשת החברתית</em> באופן חלק.
|
||||
contact_missing: ללא הגדרה
|
||||
contact_unavailable: לא רלוונטי/חסר
|
||||
default_thumbnail_description: שני מסטודונים מצויירים (הדומים לפילים) משחקים במטוס נייר. הם מוקפים בשמיים כחולים בהירים ופלנטות מרחפות עם עצים ומסטודונים נוספים עליהם.
|
||||
hosted_on: מסטודון שיושב בכתובת %{domain}
|
||||
title: אודות
|
||||
accounts:
|
||||
|
||||
@@ -1983,7 +1983,7 @@ ko:
|
||||
windows: 윈도우
|
||||
windows_mobile: 윈도우 모바일
|
||||
windows_phone: 윈도우 폰
|
||||
revoke: 취소
|
||||
revoke: 삭제
|
||||
revoke_success: 세션을 성공적으로 취소하였습니다
|
||||
title: 세션
|
||||
view_authentication_history: 내 계정에 대한 인증 이력 보기
|
||||
|
||||
@@ -4,6 +4,7 @@ tr:
|
||||
about_mastodon_html: 'Geleceğin sosyal ağı: Reklam yok, kurumsal gözetim yok, etik tasarım ve merkeziyetsizlik! Mastodon ile verilerinizin sahibi olun!'
|
||||
contact_missing: Ayarlanmadı
|
||||
contact_unavailable: Bulunamadı
|
||||
default_thumbnail_description: İki gülümseyen (fil gibi görünen) çizgi film mastodonu aralarında bir kağıt uçak atıp tutuyorlar. Etraflarını parlak mavi bir gökyüzü ve üzerinde ağaçlar ile başka mastodonlar bulunan süzülen gezegenler çevreliyor.
|
||||
hosted_on: Mastodon %{domain} üzerinde barındırılıyor
|
||||
title: Hakkında
|
||||
accounts:
|
||||
|
||||
@@ -5,8 +5,9 @@ require 'action_dispatch/middleware/static'
|
||||
module Mastodon
|
||||
module Middleware
|
||||
class PublicFileServer
|
||||
CACHE_TTL = 28.days.to_i
|
||||
SERVICE_WORKER_PATH = '/sw.js'
|
||||
SERVICE_WORKER_TTL = 7.days.to_i
|
||||
CACHE_TTL = 28.days.to_i
|
||||
|
||||
def initialize(app)
|
||||
@app = app
|
||||
@@ -24,7 +25,7 @@ module Mastodon
|
||||
# Set cache headers on static files. Some paths require different cache headers
|
||||
request = Rack::Request.new env
|
||||
headers['cache-control'] = begin
|
||||
if request.path.start_with?('/sw.js')
|
||||
if request.path.start_with?(SERVICE_WORKER_PATH)
|
||||
"public, max-age=#{SERVICE_WORKER_TTL}, must-revalidate"
|
||||
elsif request.path.start_with?(paperclip_root_url)
|
||||
"public, max-age=#{CACHE_TTL}, immutable"
|
||||
|
||||
+4
-6
@@ -93,8 +93,8 @@
|
||||
"postcss-preset-env": "^11.0.0",
|
||||
"prop-types": "^15.8.1",
|
||||
"punycode": "^2.3.0",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react": "^19.2.0",
|
||||
"react-dom": "^19.2.0",
|
||||
"react-easy-crop": "^6.0.0",
|
||||
"react-immutable-proptypes": "^2.2.0",
|
||||
"react-immutable-pure-component": "^2.2.2",
|
||||
@@ -147,13 +147,12 @@
|
||||
"@types/object-assign": "^4.0.30",
|
||||
"@types/prop-types": "^15.7.5",
|
||||
"@types/punycode": "^2.1.0",
|
||||
"@types/react": "^18.2.7",
|
||||
"@types/react-dom": "^18.2.4",
|
||||
"@types/react": "^19.2.0",
|
||||
"@types/react-dom": "^19.2.0",
|
||||
"@types/react-immutable-proptypes": "^2.1.0",
|
||||
"@types/react-router": "^5.1.20",
|
||||
"@types/react-router-dom": "^5.3.3",
|
||||
"@types/react-sparklines": "^1.7.2",
|
||||
"@types/react-test-renderer": "^18.0.0",
|
||||
"@types/redux-immutable": "^4.0.3",
|
||||
"@types/requestidlecallback": "^0.3.5",
|
||||
"@vitest/browser": "^4.1.0",
|
||||
@@ -179,7 +178,6 @@
|
||||
"msw-storybook-addon": "^2.0.6",
|
||||
"oxfmt": "^0.47.0",
|
||||
"playwright": "^1.60.0",
|
||||
"react-test-renderer": "^18.2.0",
|
||||
"storybook": "^10.3.0",
|
||||
"stylelint": "^17.0.0",
|
||||
"stylelint-config-standard-scss": "^17.0.0",
|
||||
|
||||
@@ -6,8 +6,10 @@ RSpec.describe 'Public files' do
|
||||
include RoutingHelper
|
||||
|
||||
context 'when requesting service worker file' do
|
||||
before { stub_const 'Mastodon::Middleware::PublicFileServer::SERVICE_WORKER_PATH', '/robots.txt' }
|
||||
|
||||
it 'returns the file with the expected headers' do
|
||||
get '/sw.js'
|
||||
get Mastodon::Middleware::PublicFileServer::SERVICE_WORKER_PATH
|
||||
|
||||
expect(response)
|
||||
.to have_http_status(200)
|
||||
|
||||
@@ -2925,13 +2925,12 @@ __metadata:
|
||||
"@types/object-assign": "npm:^4.0.30"
|
||||
"@types/prop-types": "npm:^15.7.5"
|
||||
"@types/punycode": "npm:^2.1.0"
|
||||
"@types/react": "npm:^18.2.7"
|
||||
"@types/react-dom": "npm:^18.2.4"
|
||||
"@types/react": "npm:^19.2.0"
|
||||
"@types/react-dom": "npm:^19.2.0"
|
||||
"@types/react-immutable-proptypes": "npm:^2.1.0"
|
||||
"@types/react-router": "npm:^5.1.20"
|
||||
"@types/react-router-dom": "npm:^5.3.3"
|
||||
"@types/react-sparklines": "npm:^1.7.2"
|
||||
"@types/react-test-renderer": "npm:^18.0.0"
|
||||
"@types/redux-immutable": "npm:^4.0.3"
|
||||
"@types/requestidlecallback": "npm:^0.3.5"
|
||||
"@unhead/react": "npm:^3.1.0"
|
||||
@@ -2997,8 +2996,8 @@ __metadata:
|
||||
postcss-preset-env: "npm:^11.0.0"
|
||||
prop-types: "npm:^15.8.1"
|
||||
punycode: "npm:^2.3.0"
|
||||
react: "npm:^18.2.0"
|
||||
react-dom: "npm:^18.2.0"
|
||||
react: "npm:^19.2.0"
|
||||
react-dom: "npm:^19.2.0"
|
||||
react-easy-crop: "npm:^6.0.0"
|
||||
react-immutable-proptypes: "npm:^2.2.0"
|
||||
react-immutable-pure-component: "npm:^2.2.2"
|
||||
@@ -3010,7 +3009,6 @@ __metadata:
|
||||
react-router-dom: "npm:^5.3.4"
|
||||
react-select: "npm:^5.7.3"
|
||||
react-sparklines: "npm:^1.7.0"
|
||||
react-test-renderer: "npm:^18.2.0"
|
||||
react-textarea-autosize: "npm:^8.4.1"
|
||||
redux-immutable: "npm:^4.0.0"
|
||||
regenerator-runtime: "npm:^0.14.0"
|
||||
@@ -4872,15 +4870,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/react-test-renderer@npm:^18.0.0":
|
||||
version: 18.3.1
|
||||
resolution: "@types/react-test-renderer@npm:18.3.1"
|
||||
dependencies:
|
||||
"@types/react": "npm:^18"
|
||||
checksum: 10c0/9fc8467ff1a3f14be6cc3498a75fc788d2c92c0fffa7bf21269ed5d9d82db9195bf2178ddc42ea16a0836995c1b77601c6be8abb27bd1864668c418c6d0e5a3b
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/react-transition-group@npm:^4.4.0":
|
||||
version: 4.4.8
|
||||
resolution: "@types/react-transition-group@npm:4.4.8"
|
||||
@@ -9945,7 +9934,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"loose-envify@npm:^1.0.0, loose-envify@npm:^1.1.0, loose-envify@npm:^1.2.0, loose-envify@npm:^1.3.1, loose-envify@npm:^1.4.0":
|
||||
"loose-envify@npm:^1.0.0, loose-envify@npm:^1.2.0, loose-envify@npm:^1.3.1, loose-envify@npm:^1.4.0":
|
||||
version: 1.4.0
|
||||
resolution: "loose-envify@npm:1.4.0"
|
||||
dependencies:
|
||||
@@ -12137,15 +12126,14 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"react-dom@npm:^18.2.0":
|
||||
version: 18.3.1
|
||||
resolution: "react-dom@npm:18.3.1"
|
||||
"react-dom@npm:^19.2.0":
|
||||
version: 19.2.7
|
||||
resolution: "react-dom@npm:19.2.7"
|
||||
dependencies:
|
||||
loose-envify: "npm:^1.1.0"
|
||||
scheduler: "npm:^0.23.2"
|
||||
scheduler: "npm:^0.27.0"
|
||||
peerDependencies:
|
||||
react: ^18.3.1
|
||||
checksum: 10c0/a752496c1941f958f2e8ac56239172296fcddce1365ce45222d04a1947e0cc5547df3e8447f855a81d6d39f008d7c32eab43db3712077f09e3f67c4874973e85
|
||||
react: ^19.2.7
|
||||
checksum: 10c0/970ff600f6e80d47d39e2f226f12f226173b3cba3382efc97c5f0cd663de9af38c7a4c11c213fb936094faeac83060d660247accaa96b752180d5b951b9cfecb
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -12197,13 +12185,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"react-is@npm:^16.12.0 || ^17.0.0 || ^18.0.0, react-is@npm:^18.3.1":
|
||||
version: 18.3.1
|
||||
resolution: "react-is@npm:18.3.1"
|
||||
checksum: 10c0/f2f1e60010c683479e74c63f96b09fb41603527cd131a9959e2aee1e5a8b0caf270b365e5ca77d4a6b18aae659b60a86150bb3979073528877029b35aecd2072
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"react-is@npm:^16.13.1, react-is@npm:^16.6.0, react-is@npm:^16.7.0":
|
||||
version: 16.13.1
|
||||
resolution: "react-is@npm:16.13.1"
|
||||
@@ -12334,18 +12315,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"react-shallow-renderer@npm:^16.15.0":
|
||||
version: 16.15.0
|
||||
resolution: "react-shallow-renderer@npm:16.15.0"
|
||||
dependencies:
|
||||
object-assign: "npm:^4.1.1"
|
||||
react-is: "npm:^16.12.0 || ^17.0.0 || ^18.0.0"
|
||||
peerDependencies:
|
||||
react: ^16.0.0 || ^17.0.0 || ^18.0.0
|
||||
checksum: 10c0/c194d741792e86043a4ae272f7353c1cb9412bc649945c4220c6a101a6ea5410cceb3d65d5a4d750f11a24f7426e8eec7977e8a4e3ad5d3ee235ca2b18166fa8
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"react-sparklines@npm:^1.7.0":
|
||||
version: 1.7.0
|
||||
resolution: "react-sparklines@npm:1.7.0"
|
||||
@@ -12358,19 +12327,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"react-test-renderer@npm:^18.2.0":
|
||||
version: 18.3.1
|
||||
resolution: "react-test-renderer@npm:18.3.1"
|
||||
dependencies:
|
||||
react-is: "npm:^18.3.1"
|
||||
react-shallow-renderer: "npm:^16.15.0"
|
||||
scheduler: "npm:^0.23.2"
|
||||
peerDependencies:
|
||||
react: ^18.3.1
|
||||
checksum: 10c0/c633558ef9af33bc68f0c4dbb5163a004c4fb9eade7bd0a7cfc0355fb367f36bd9d96533c90b7e85a146be6c525113a15f58683d269e0177ad77e2b04d4fe51c
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"react-textarea-autosize@npm:^8.4.1":
|
||||
version: 8.5.9
|
||||
resolution: "react-textarea-autosize@npm:8.5.9"
|
||||
@@ -12406,12 +12362,10 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"react@npm:^18.2.0":
|
||||
version: 18.3.1
|
||||
resolution: "react@npm:18.3.1"
|
||||
dependencies:
|
||||
loose-envify: "npm:^1.1.0"
|
||||
checksum: 10c0/283e8c5efcf37802c9d1ce767f302dd569dd97a70d9bb8c7be79a789b9902451e0d16334b05d73299b20f048cbc3c7d288bbbde10b701fa194e2089c237dbea3
|
||||
"react@npm:^19.2.0":
|
||||
version: 19.2.7
|
||||
resolution: "react@npm:19.2.7"
|
||||
checksum: 10c0/0bd0e2f1bbd4ba97561c6597bf8a5fec05e6476fe61e165c1065598d16668efc6715205599c94d3ddd49d36cb0f21cbf1b9bcc18ee840b805ce222c3e8d558ac
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -12979,15 +12933,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"scheduler@npm:^0.23.2":
|
||||
version: 0.23.2
|
||||
resolution: "scheduler@npm:0.23.2"
|
||||
dependencies:
|
||||
loose-envify: "npm:^1.1.0"
|
||||
checksum: 10c0/26383305e249651d4c58e6705d5f8425f153211aef95f15161c151f7b8de885f24751b377e4a0b3dd42cce09aad3f87a61dab7636859c0d89b7daf1a1e2a5c78
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"scheduler@npm:^0.26.0":
|
||||
version: 0.26.0
|
||||
resolution: "scheduler@npm:0.26.0"
|
||||
@@ -12995,6 +12940,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"scheduler@npm:^0.27.0":
|
||||
version: 0.27.0
|
||||
resolution: "scheduler@npm:0.27.0"
|
||||
checksum: 10c0/4f03048cb05a3c8fddc45813052251eca00688f413a3cee236d984a161da28db28ba71bd11e7a3dd02f7af84ab28d39fb311431d3b3772fed557945beb00c452
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"scroll-behavior@npm:^0.11.0":
|
||||
version: 0.11.0
|
||||
resolution: "scroll-behavior@npm:0.11.0"
|
||||
|
||||
Reference in new issue
Block a user