Merge commit '52b781c2f4e65d6782e9a120e2fd595d332c03a9' into glitch-soc/merge-upstream

This commit is contained in:
Claire committed 2026-06-27 15:38:29 +02:00
commit cb3cdec7d8
143 files changed
+1241 -665

No files matched your search

+1 -1
View File
@@ -1 +1 @@
24.17 24.18
+12 -1
View File
@@ -84,7 +84,7 @@ const preview: Preview = {
// Get the locale from the global toolbar // Get the locale from the global toolbar
// and merge it with any parameters or args state. // and merge it with any parameters or args state.
const { locale } = globals as { locale: string }; const { locale } = globals as { locale: string };
const { state = {} } = parameters; const { state = {}, stateFn } = parameters;
const argsState: Record<string, unknown> = {}; const argsState: Record<string, unknown> = {};
for (const [key, value] of Object.entries(args)) { for (const [key, value] of Object.entries(args)) {
@@ -106,6 +106,16 @@ const preview: Preview = {
} }
} }
let stateFnState: Record<string, unknown> = {};
if (typeof stateFn === 'function') {
stateFnState =
(
stateFn as (
args: Record<string, unknown>,
) => Record<string, unknown> | undefined | null
)(args) ?? {};
}
const reducer = reducerWithInitialState( const reducer = reducerWithInitialState(
{ {
meta: { meta: {
@@ -113,6 +123,7 @@ const preview: Preview = {
}, },
}, },
state as Record<string, unknown>, state as Record<string, unknown>,
stateFnState,
argsState, argsState,
); );
+6 -5
View File
@@ -292,7 +292,7 @@ GEM
activesupport (>= 5.1) activesupport (>= 5.1)
haml (>= 4.0.6) haml (>= 4.0.6)
railties (>= 5.1) railties (>= 5.1)
haml_lint (0.73.0) haml_lint (0.74.0)
haml (>= 5.0) haml (>= 5.0)
parallel (>= 1.10) parallel (>= 1.10)
rainbow rainbow
@@ -354,7 +354,7 @@ GEM
azure-blob (~> 0.5.2) azure-blob (~> 0.5.2)
hashie (~> 5.0) hashie (~> 5.0)
jmespath (1.6.2) jmespath (1.6.2)
json (2.19.9) json (2.20.0)
json-canonicalization (1.0.0) json-canonicalization (1.0.0)
json-jwt (1.17.1) json-jwt (1.17.1)
activesupport (>= 4.2) activesupport (>= 4.2)
@@ -832,9 +832,10 @@ GEM
concurrent-ruby (~> 1.0, >= 1.0.5) concurrent-ruby (~> 1.0, >= 1.0.5)
sidekiq (>= 7.0.0, < 9.0.0) sidekiq (>= 7.0.0, < 9.0.0)
thor (>= 1.0, < 3.0) thor (>= 1.0, < 3.0)
simple-navigation (4.4.1) simple-navigation (4.5.0)
activesupport (>= 2.3.2) activesupport (>= 6.1.0)
ostruct json
zeitwerk
simple_form (5.4.1) simple_form (5.4.1)
actionpack (>= 7.0) actionpack (>= 7.0)
activemodel (>= 7.0) activemodel (>= 7.0)
+6
View File
@@ -9,6 +9,12 @@ module SettingsHelper
LanguagesHelper.sorted_locale_keys(I18n.available_locales) LanguagesHelper.sorted_locale_keys(I18n.available_locales)
end end
def inline_qrcode_svg(code)
code
.as_svg(padding: 0, module_size: 4, use_path: true)
.html_safe # rubocop:disable Rails/OutputSafety
end
def featured_tags_hint(recently_used_tags) def featured_tags_hint(recently_used_tags)
recently_used_tags.present? && recently_used_tags.present? &&
safe_join( safe_join(
-8
View File
@@ -522,14 +522,6 @@ on('click', '.rules-list button', ({ target }) => {
* don't produce accessible markup (simple-forms & simple-navigation) * don't produce accessible markup (simple-forms & simple-navigation)
*/ */
function applyRailsA11yPatches() { function applyRailsA11yPatches() {
/**
* Mark current navigation item with aria-current
*/
const activeNavLink = document.querySelector(
'.simple-navigation-active-leaf a.selected',
);
activeNavLink?.setAttribute('aria-current', 'page');
/** /**
* Hides the asterisk added to labels of required form fields * Hides the asterisk added to labels of required form fields
* from assistive tech. (Those fields already have the `required` attribute) * from assistive tech. (Those fields already have the `required` attribute)
@@ -20,7 +20,7 @@ export function normalizeStatus(
) { ) {
const normalStatus: StatusShape = { const normalStatus: StatusShape = {
hidden: normalOldStatus?.hidden ?? false, hidden: normalOldStatus?.hidden ?? false,
collapsed: normalOldStatus?.collapsed ?? false, collapsed: normalOldStatus?.collapsed ?? null,
content: '', content: '',
contentHtml: '', contentHtml: '',
muted: false, muted: false,
@@ -1,12 +1,10 @@
import { useCallback, useId, useRef, useState } from 'react'; import { useCallback, useId, useState } from 'react';
import type { FC } from 'react'; import type { FC } from 'react';
import { defineMessages, FormattedMessage, useIntl } from 'react-intl'; import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
import classNames from 'classnames'; import classNames from 'classnames';
import Overlay from 'react-overlays/esm/Overlay';
import { useAccount } from '@/mastodon/hooks/useAccount'; import { useAccount } from '@/mastodon/hooks/useAccount';
import { useRelationship } from '@/mastodon/hooks/useRelationship'; import { useRelationship } from '@/mastodon/hooks/useRelationship';
import { useAppSelector } from '@/mastodon/store'; import { useAppSelector } from '@/mastodon/store';
@@ -20,6 +18,7 @@ import { CopyButton } from '../copy_button';
import { DisplayName } from '../display_name'; import { DisplayName } from '../display_name';
import { Icon } from '../icon'; import { Icon } from '../icon';
import { NavigationFocusTarget } from '../navigation_focus_target'; import { NavigationFocusTarget } from '../navigation_focus_target';
import { Popover } from '../popover';
import { AccountBadges } from './badges'; import { AccountBadges } from './badges';
import classes from './styles.module.scss'; import classes from './styles.module.scss';
@@ -82,7 +81,8 @@ const AccountNameHelp: FC<{
const accessibilityId = useId(); const accessibilityId = useId();
const intl = useIntl(); const intl = useIntl();
const [open, setOpen] = useState(false); const [open, setOpen] = useState(false);
const triggerRef = useRef<HTMLButtonElement>(null); const [triggerElement, setTriggerElement] =
useState<HTMLButtonElement | null>(null);
const handleClick = useCallback(() => { const handleClick = useCallback(() => {
setOpen((prev) => !prev); setOpen((prev) => !prev);
@@ -94,7 +94,7 @@ const AccountNameHelp: FC<{
<> <>
<button <button
type='button' type='button'
ref={triggerRef} ref={setTriggerElement}
className={classes.handleHelpButton} className={classes.handleHelpButton}
onClick={handleClick} onClick={handleClick}
aria-expanded={open} aria-expanded={open}
@@ -108,12 +108,11 @@ const AccountNameHelp: FC<{
/> />
</button> </button>
<Overlay <Popover
show={open} isOpen={open}
rootClose reference={triggerElement}
target={triggerRef as React.RefObject<HTMLButtonElement>} onClose={handleClick}
onHide={handleClick} offset={5}
offset={[5, 5]}
> >
{({ props }) => ( {({ props }) => (
<div <div
@@ -192,7 +191,7 @@ const AccountNameHelp: FC<{
</CopyButton> </CopyButton>
</div> </div>
)} )}
</Overlay> </Popover>
</> </>
); );
}; };
@@ -4,22 +4,14 @@ import { FormattedMessage, useIntl } from 'react-intl';
import classNames from 'classnames'; import classNames from 'classnames';
import type {
OffsetValue,
UsePopperOptions,
} from 'react-overlays/esm/usePopper';
import Overlay from 'react-overlays/Overlay';
import CloseIcon from '@/material-icons/400-24px/close.svg?react'; import CloseIcon from '@/material-icons/400-24px/close.svg?react';
import { useSelectableClick } from 'mastodon/hooks/useSelectableClick'; import { useSelectableClick } from 'mastodon/hooks/useSelectableClick';
import { IconButton } from '../icon_button'; import { IconButton } from '../icon_button';
import { Popover } from '../popover';
import classes from './styles.module.scss'; import classes from './styles.module.scss';
const offset = [0, 4] as OffsetValue;
const popperConfig = { strategy: 'fixed' } as UsePopperOptions;
export const AltTextBadge: React.FC<{ export const AltTextBadge: React.FC<{
description: string; description: string;
className?: string; className?: string;
@@ -28,7 +20,9 @@ export const AltTextBadge: React.FC<{
const uniqueId = useId(); const uniqueId = useId();
const popoverId = `${uniqueId}-popover`; const popoverId = `${uniqueId}-popover`;
const titleId = `${uniqueId}-title`; const titleId = `${uniqueId}-title`;
const buttonRef = useRef<HTMLButtonElement>(null); const [buttonElement, setButtonElement] = useState<HTMLButtonElement | null>(
null,
);
const popoverRef = useRef<HTMLDivElement>(null); const popoverRef = useRef<HTMLDivElement>(null);
const [open, setOpen] = useState(false); const [open, setOpen] = useState(false);
@@ -41,8 +35,8 @@ export const AltTextBadge: React.FC<{
const handleClose = useCallback(() => { const handleClose = useCallback(() => {
setOpen(false); setOpen(false);
buttonRef.current?.focus(); buttonElement?.focus();
}, [setOpen]); }, [buttonElement]);
const [handleMouseDown, handleMouseUp] = useSelectableClick(handleClose); const [handleMouseDown, handleMouseUp] = useSelectableClick(handleClose);
@@ -50,7 +44,7 @@ export const AltTextBadge: React.FC<{
<> <>
<button <button
type='button' type='button'
ref={buttonRef} ref={setButtonElement}
className={classNames('media-gallery__alt__label', className)} className={classNames('media-gallery__alt__label', className)}
onClick={handleClick} onClick={handleClick}
aria-expanded={open} aria-expanded={open}
@@ -60,15 +54,12 @@ export const AltTextBadge: React.FC<{
ALT ALT
</button> </button>
<Overlay <Popover
rootClose isOpen={open}
onHide={handleClose} onClose={handleClose}
show={open} reference={buttonElement}
target={buttonRef as React.RefObject<HTMLButtonElement>}
placement='top-end' placement='top-end'
flip offset={4}
offset={offset}
popperConfig={popperConfig}
> >
{({ props }) => ( {({ props }) => (
<div {...props} className='hover-card-controller'> <div {...props} className='hover-card-controller'>
@@ -105,7 +96,7 @@ export const AltTextBadge: React.FC<{
</div> </div>
</div> </div>
)} )}
</Overlay> </Popover>
</> </>
); );
}; };
@@ -5,14 +5,13 @@ import classNames from 'classnames';
import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component'; import ImmutablePureComponent from 'react-immutable-pure-component';
import Overlay from 'react-overlays/Overlay';
import AutosuggestAccountContainer from '../features/compose/containers/autosuggest_account_container'; import AutosuggestAccountContainer from '../features/compose/containers/autosuggest_account_container';
import { AutosuggestEmoji } from './autosuggest_emoji'; import { AutosuggestEmoji } from './autosuggest_emoji';
import { AutosuggestHashtag } from './autosuggest_hashtag'; import { AutosuggestHashtag } from './autosuggest_hashtag';
import { LocalCustomEmojiProvider } from './emoji/context'; import { LocalCustomEmojiProvider } from './emoji/context';
import { textAtCursorMatchesToken } from './autosuggest/utils'; import { textAtCursorMatchesToken } from './autosuggest/utils';
import { Popover } from './popover';
export default class AutosuggestInput extends ImmutablePureComponent { export default class AutosuggestInput extends ImmutablePureComponent {
@@ -129,6 +128,10 @@ export default class AutosuggestInput extends ImmutablePureComponent {
this.setState({ focused: true }); this.setState({ focused: true });
}; };
onCloseMenu = () => {
this.setState({ suggestionsHidden: true });
};
onSuggestionClick = (e) => { onSuggestionClick = (e) => {
const suggestion = this.props.suggestions.get(e.currentTarget.getAttribute('data-index')); const suggestion = this.props.suggestions.get(e.currentTarget.getAttribute('data-index'));
e.preventDefault(); e.preventDefault();
@@ -197,7 +200,12 @@ export default class AutosuggestInput extends ImmutablePureComponent {
/> />
<LocalCustomEmojiProvider> <LocalCustomEmojiProvider>
<Overlay show={!(suggestionsHidden || suggestions.isEmpty())} offset={[0, 0]} placement='bottom' target={this.input} popperConfig={{ strategy: 'fixed' }}> <Popover
reference={this.input}
isOpen={!(suggestionsHidden || suggestions.isEmpty())}
onClose={this.onCloseMenu}
flip={false}
>
{({ props }) => ( {({ props }) => (
<div {...props}> <div {...props}>
<div className='autosuggest-textarea__suggestions' style={{ width: this.input?.clientWidth }}> <div className='autosuggest-textarea__suggestions' style={{ width: this.input?.clientWidth }}>
@@ -205,7 +213,7 @@ export default class AutosuggestInput extends ImmutablePureComponent {
</div> </div>
</div> </div>
)} )}
</Overlay> </Popover>
</LocalCustomEmojiProvider> </LocalCustomEmojiProvider>
</div> </div>
); );
@@ -5,7 +5,6 @@ import classNames from 'classnames';
import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePropTypes from 'react-immutable-proptypes';
import Overlay from 'react-overlays/Overlay';
import Textarea from 'react-textarea-autosize'; import Textarea from 'react-textarea-autosize';
import AutosuggestAccountContainer from '../features/compose/containers/autosuggest_account_container'; import AutosuggestAccountContainer from '../features/compose/containers/autosuggest_account_container';
@@ -14,6 +13,7 @@ import { AutosuggestEmoji } from './autosuggest_emoji';
import { AutosuggestHashtag } from './autosuggest_hashtag'; import { AutosuggestHashtag } from './autosuggest_hashtag';
import { LocalCustomEmojiProvider } from './emoji/context'; import { LocalCustomEmojiProvider } from './emoji/context';
import { textAtCursorMatchesToken } from './autosuggest/utils'; import { textAtCursorMatchesToken } from './autosuggest/utils';
import { Popover } from './popover';
const AutosuggestTextarea = forwardRef(({ const AutosuggestTextarea = forwardRef(({
value, value,
@@ -36,6 +36,7 @@ const AutosuggestTextarea = forwardRef(({
const [suggestionsHidden, setSuggestionsHidden] = useState(true); const [suggestionsHidden, setSuggestionsHidden] = useState(true);
const [selectedSuggestion, setSelectedSuggestion] = useState(0); const [selectedSuggestion, setSelectedSuggestion] = useState(0);
const [textareaElement, setTextareaElement] = useState(null);
const lastTokenRef = useRef(null); const lastTokenRef = useRef(null);
const tokenStartRef = useRef(0); const tokenStartRef = useRef(0);
@@ -110,7 +111,7 @@ const AutosuggestTextarea = forwardRef(({
onKeyDown(e); onKeyDown(e);
}, [disabled, suggestions, suggestionsHidden, selectedSuggestion, setSelectedSuggestion, setSuggestionsHidden, onSuggestionSelected, onKeyDown]); }, [disabled, suggestions, suggestionsHidden, selectedSuggestion, setSelectedSuggestion, setSuggestionsHidden, onSuggestionSelected, onKeyDown]);
const handleBlur = useCallback(() => { const closeMenu = useCallback(() => {
setSuggestionsHidden(true); setSuggestionsHidden(true);
}, [setSuggestionsHidden]); }, [setSuggestionsHidden]);
@@ -173,10 +174,15 @@ const AutosuggestTextarea = forwardRef(({
); );
}; };
const handleRef = useCallback((element) => {
textareaRef.current = element;
setTextareaElement(element);
}, []);
return ( return (
<div className={classNames('autosuggest-textarea', className)}> <div className={classNames('autosuggest-textarea', className)}>
<Textarea <Textarea
ref={textareaRef} ref={handleRef}
className='autosuggest-textarea__textarea' className='autosuggest-textarea__textarea'
disabled={disabled} disabled={disabled}
placeholder={placeholder} placeholder={placeholder}
@@ -186,7 +192,7 @@ const AutosuggestTextarea = forwardRef(({
onKeyDown={handleKeyDown} onKeyDown={handleKeyDown}
onKeyUp={onKeyUp} onKeyUp={onKeyUp}
onFocus={handleFocus} onFocus={handleFocus}
onBlur={handleBlur} onBlur={closeMenu}
onPaste={handlePaste} onPaste={handlePaste}
onDrop={handleDrop} onDrop={handleDrop}
dir='auto' dir='auto'
@@ -196,15 +202,20 @@ const AutosuggestTextarea = forwardRef(({
/> />
<LocalCustomEmojiProvider> <LocalCustomEmojiProvider>
<Overlay show={!(suggestionsHidden || suggestions.isEmpty())} offset={[0, 0]} placement='bottom' target={textareaRef} popperConfig={{ strategy: 'fixed' }}> <Popover
matchReferenceWidth
isOpen={!(suggestionsHidden || suggestions.isEmpty())}
onClose={closeMenu}
reference={textareaElement}
>
{({ props }) => ( {({ props }) => (
<div {...props}> <div {...props}>
<div className='autosuggest-textarea__suggestions' style={{ width: textareaRef.current?.clientWidth }}> <div className='autosuggest-textarea__suggestions' style={{ width: textareaElement?.clientWidth }}>
{suggestions.map(renderSuggestion)} {suggestions.map(renderSuggestion)}
</div> </div>
</div> </div>
)} )}
</Overlay> </Popover>
</LocalCustomEmojiProvider> </LocalCustomEmojiProvider>
</div> </div>
); );
@@ -1,4 +1,4 @@
import { useCallback, useId, useMemo, useRef, useState } from 'react'; import { useCallback, useId, useMemo, useState } from 'react';
import type { ComponentPropsWithoutRef, FC } from 'react'; import type { ComponentPropsWithoutRef, FC } from 'react';
import { useIntl } from 'react-intl'; import { useIntl } from 'react-intl';
@@ -6,15 +6,12 @@ import type { MessageDescriptor } from 'react-intl';
import classNames from 'classnames'; import classNames from 'classnames';
import Overlay from 'react-overlays/Overlay';
import UnfoldMoreIcon from '@/material-icons/400-24px/unfold_more.svg?react'; import UnfoldMoreIcon from '@/material-icons/400-24px/unfold_more.svg?react';
import type { SelectItem } from '../dropdown_selector'; import type { SelectItem } from '../dropdown_selector';
import { DropdownSelector } from '../dropdown_selector'; import { DropdownSelector } from '../dropdown_selector';
import { Icon } from '../icon'; import { Icon } from '../icon';
import { Popover } from '../popover';
import { matchWidth } from './utils';
interface DropdownProps { interface DropdownProps {
disabled?: boolean; disabled?: boolean;
@@ -42,7 +39,9 @@ export const Dropdown: FC<
...buttonProps ...buttonProps
}) => { }) => {
const intl = useIntl(); const intl = useIntl();
const buttonRef = useRef<HTMLButtonElement>(null); const [buttonElement, setButtonElement] = useState<HTMLButtonElement | null>(
null,
);
const uniqueId = useId(); const uniqueId = useId();
const buttonId = id ?? `${uniqueId}-button`; const buttonId = id ?? `${uniqueId}-button`;
const listboxId = `${uniqueId}-listbox`; const listboxId = `${uniqueId}-listbox`;
@@ -52,16 +51,16 @@ export const Dropdown: FC<
const handleToggle = useCallback(() => { const handleToggle = useCallback(() => {
if (!disabled) { if (!disabled) {
setOpen((prevOpen) => { setOpen((prevOpen) => {
buttonRef.current?.focus(); buttonElement?.focus();
return !prevOpen; return !prevOpen;
}); });
} }
}, [disabled]); }, [buttonElement, disabled]);
const handleClose = useCallback(() => { const handleClose = useCallback(() => {
setOpen(false); setOpen(false);
buttonRef.current?.focus(); buttonElement?.focus();
}, []); }, [buttonElement]);
const currentText = useMemo( const currentText = useMemo(
() => () =>
@@ -93,7 +92,7 @@ export const Dropdown: FC<
}, },
className, className,
)} )}
ref={buttonRef} ref={setButtonElement}
> >
{currentText} {currentText}
<Icon <Icon
@@ -103,17 +102,12 @@ export const Dropdown: FC<
/> />
</button> </button>
<Overlay <Popover
show={open} matchReferenceWidth
offset={[0, 0]} isOpen={open}
placement='bottom-start' placement='bottom-start'
onHide={handleClose} onClose={handleClose}
flip reference={buttonElement}
target={buttonRef as React.RefObject<HTMLButtonElement>}
popperConfig={{
strategy: 'fixed',
modifiers: [matchWidth],
}}
> >
{({ props, placement }) => ( {({ props, placement }) => (
<div {...props} className={`${classPrefix}__overlay`}> <div {...props} className={`${classPrefix}__overlay`}>
@@ -135,7 +129,7 @@ export const Dropdown: FC<
</div> </div>
</div> </div>
)} )}
</Overlay> </Popover>
</> </>
); );
}; };
@@ -1,17 +0,0 @@
import type { Modifier, UsePopperState } from 'react-overlays/esm/usePopper';
export const matchWidth: Modifier<'sameWidth', UsePopperState> = {
name: 'sameWidth',
enabled: true,
phase: 'beforeWrite',
requires: ['computeStyles'],
fn: ({ state }) => {
if (state.styles.popper) {
state.styles.popper.width = `${state.rects.reference.width}px`;
}
},
effect: ({ state }) => {
const reference = state.elements.reference as HTMLElement;
state.elements.popper.style.width = `${reference.offsetWidth}px`;
},
};
@@ -13,13 +13,6 @@ import { Link } from 'react-router-dom';
import type { Map as ImmutableMap } from 'immutable'; import type { Map as ImmutableMap } from 'immutable';
import type {
OffsetValue,
UsePopperOptions,
Placement,
} from 'react-overlays/esm/usePopper';
import Overlay from 'react-overlays/Overlay';
import { fetchRelationships } from 'mastodon/actions/accounts'; import { fetchRelationships } from 'mastodon/actions/accounts';
import { import {
openDropdownMenu, openDropdownMenu,
@@ -40,6 +33,8 @@ import { useAppDispatch, useAppSelector } from 'mastodon/store';
import { Icon } from './icon'; import { Icon } from './icon';
import type { IconProp } from './icon'; import type { IconProp } from './icon';
import { IconButton } from './icon_button'; import { IconButton } from './icon_button';
import type { PopoverProps } from './popover';
import { Popover } from './popover';
let id = 0; let id = 0;
@@ -302,8 +297,8 @@ interface DropdownProps<Item extends object | null = MenuItem> {
title?: string; title?: string;
disabled?: boolean; disabled?: boolean;
scrollable?: boolean; scrollable?: boolean;
placement?: Placement; placement?: PopoverProps['placement'];
offset?: OffsetValue; offset?: PopoverProps['offset'];
/** /**
* Prevent the `ScrollableList` with this scrollKey * Prevent the `ScrollableList` with this scrollKey
* from being scrolled while the dropdown is open * from being scrolled while the dropdown is open
@@ -321,8 +316,6 @@ interface DropdownProps<Item extends object | null = MenuItem> {
onItemClick?: ItemClickFn<Item>; onItemClick?: ItemClickFn<Item>;
} }
const popperConfig = { strategy: 'fixed' } as UsePopperOptions;
export const Dropdown = <Item extends object | null = MenuItem>({ export const Dropdown = <Item extends object | null = MenuItem>({
children, children,
icon, icon,
@@ -334,7 +327,7 @@ export const Dropdown = <Item extends object | null = MenuItem>({
disabled, disabled,
scrollable, scrollable,
placement = 'bottom', placement = 'bottom',
offset = [5, 5], offset = 5,
status, status,
needsStatusRefresh, needsStatusRefresh,
forceDropdown = false, forceDropdown = false,
@@ -352,7 +345,9 @@ export const Dropdown = <Item extends object | null = MenuItem>({
); );
const [currentId] = useState(id++); const [currentId] = useState(id++);
const open = currentId === openDropdownId; const open = currentId === openDropdownId;
const buttonRef = useRef<HTMLButtonElement>(null); const [buttonElement, setButtonElement] = useState<HTMLButtonElement | null>(
null,
);
const menuId = useId(); const menuId = useId();
const prefetchAccountId = status const prefetchAccountId = status
? status.getIn(['account', 'id']) ? status.getIn(['account', 'id'])
@@ -360,8 +355,8 @@ export const Dropdown = <Item extends object | null = MenuItem>({
const statusId = status?.get('id') as string | undefined; const statusId = status?.get('id') as string | undefined;
const handleClose = useCallback(() => { const handleClose = useCallback(() => {
if (buttonRef.current) { if (buttonElement) {
buttonRef.current.focus({ preventScroll: true }); buttonElement.focus({ preventScroll: true });
} }
dispatch( dispatch(
@@ -372,7 +367,7 @@ export const Dropdown = <Item extends object | null = MenuItem>({
); );
dispatch(closeDropdownMenu({ id: currentId })); dispatch(closeDropdownMenu({ id: currentId }));
}, [dispatch, currentId]); }, [buttonElement, dispatch, currentId]);
const handleItemClick = useCallback( const handleItemClick = useCallback(
(e: React.MouseEvent) => { (e: React.MouseEvent) => {
@@ -489,7 +484,7 @@ export const Dropdown = <Item extends object | null = MenuItem>({
onBlur: unsetIsKeypress, onBlur: unsetIsKeypress,
'aria-expanded': open, 'aria-expanded': open,
'aria-controls': menuId, 'aria-controls': menuId,
ref: buttonRef, ref: setButtonElement,
}; };
if (children) { if (children) {
@@ -513,22 +508,16 @@ export const Dropdown = <Item extends object | null = MenuItem>({
<> <>
{button} {button}
<Overlay <Popover
show={open} isOpen={open}
onClose={handleClose}
offset={offset} offset={offset}
placement={placement} placement={placement}
flip reference={buttonElement}
target={buttonRef as React.RefObject<HTMLButtonElement>}
popperConfig={popperConfig}
> >
{({ props, arrowProps, placement }) => ( {({ props, placement }) => (
<div {...props} className={className} id={menuId}> <div {...props} className={className} id={menuId}>
<div className={`dropdown-animation dropdown-menu ${placement}`}> <div className={`dropdown-animation dropdown-menu ${placement}`}>
<div
className={`dropdown-menu__arrow ${placement}`}
{...arrowProps}
/>
<DropdownMenu <DropdownMenu
items={items} items={items}
loading={loading} loading={loading}
@@ -542,7 +531,7 @@ export const Dropdown = <Item extends object | null = MenuItem>({
</div> </div>
</div> </div>
)} )}
</Overlay> </Popover>
</> </>
); );
}; };
@@ -14,16 +14,13 @@ import { useIntl } from 'react-intl';
import classNames from 'classnames'; import classNames from 'classnames';
import Overlay from 'react-overlays/Overlay';
import KeyboardArrowDownIcon from '@/material-icons/400-24px/keyboard_arrow_down.svg?react'; import KeyboardArrowDownIcon from '@/material-icons/400-24px/keyboard_arrow_down.svg?react';
import KeyboardArrowUpIcon from '@/material-icons/400-24px/keyboard_arrow_up.svg?react'; import KeyboardArrowUpIcon from '@/material-icons/400-24px/keyboard_arrow_up.svg?react';
import SearchIcon from '@/material-icons/400-24px/search.svg?react'; import SearchIcon from '@/material-icons/400-24px/search.svg?react';
import { matchWidth } from 'mastodon/components/dropdown/utils';
import { IconButton } from 'mastodon/components/icon_button'; import { IconButton } from 'mastodon/components/icon_button';
import { useOnClickOutside } from 'mastodon/hooks/useOnClickOutside';
import { LoadingIndicator } from '../loading_indicator'; import { LoadingIndicator } from '../loading_indicator';
import { Popover } from '../popover';
import classes from './combobox.module.scss'; import classes from './combobox.module.scss';
import { FormFieldWrapper } from './form_field_wrapper'; import { FormFieldWrapper } from './form_field_wrapper';
@@ -236,8 +233,12 @@ const ComboboxWithRef = <Item extends ComboboxItem, GroupKey extends string>(
) => { ) => {
const intl = useIntl(); const intl = useIntl();
const wrapperRef = useRef<HTMLDivElement>(null); const wrapperRef = useRef<HTMLDivElement>(null);
const inputRef = useRef<HTMLInputElement>(null); const [inputElement, setInputElement] = useState<HTMLInputElement | null>(
const popoverRef = useRef<HTMLDivElement>(null); null,
);
const [popoverElement, setPopoverElement] = useState<HTMLDivElement | null>(
null,
);
// This ref tracks whether the menu was just closed following a // This ref tracks whether the menu was just closed following a
// selection, and prevents the menu from re-opening again // selection, and prevents the menu from re-opening again
@@ -275,24 +276,27 @@ const ComboboxWithRef = <Item extends ComboboxItem, GroupKey extends string>(
const openMenu = useCallback(() => { const openMenu = useCallback(() => {
setShouldMenuOpen(true); setShouldMenuOpen(true);
inputRef.current?.focus(); inputElement?.focus();
}, []); }, [inputElement]);
const closeMenu = useCallback(() => { const closeMenu = useCallback(() => {
setShouldMenuOpen(false); setShouldMenuOpen(false);
}, []); }, []);
const highlightItem = useCallback((id: string | null) => { const highlightItem = useCallback(
setHighlightedItemId(id); (id: string | null) => {
if (id) { setHighlightedItemId(id);
const itemElement = popoverRef.current?.querySelector<HTMLLIElement>( if (id) {
`[data-item-id='${id}']`, const itemElement = popoverElement?.querySelector<HTMLLIElement>(
); `[data-item-id='${id}']`,
if (itemElement && popoverRef.current) { );
scrollItemIntoView(itemElement, popoverRef.current); if (itemElement && popoverElement) {
scrollItemIntoView(itemElement, popoverElement);
}
} }
} },
}, []); [popoverElement],
);
const resetHighlight = useCallback(() => { const resetHighlight = useCallback(() => {
const firstItem = flatItems[0]; const firstItem = flatItems[0];
@@ -353,9 +357,16 @@ const ComboboxWithRef = <Item extends ComboboxItem, GroupKey extends string>(
} }
} }
} }
inputRef.current?.focus(); inputElement?.focus();
}, },
[closeMenu, closeOnSelect, getIsItemDisabled, flatItems, onSelectItem], [
flatItems,
inputElement,
getIsItemDisabled,
onSelectItem,
closeOnSelect,
closeMenu,
],
); );
const handleSelectItem = useCallback( const handleSelectItem = useCallback(
@@ -406,8 +417,6 @@ const ComboboxWithRef = <Item extends ComboboxItem, GroupKey extends string>(
[getItemId, highlightItem, highlightedItemId, flatItems], [getItemId, highlightItem, highlightedItemId, flatItems],
); );
useOnClickOutside(wrapperRef, closeMenu);
const handleInputKeyDown = useCallback( const handleInputKeyDown = useCallback(
(e: React.KeyboardEvent<HTMLInputElement>) => { (e: React.KeyboardEvent<HTMLInputElement>) => {
onKeyDown?.(e); onKeyDown?.(e);
@@ -489,9 +498,9 @@ const ComboboxWithRef = <Item extends ComboboxItem, GroupKey extends string>(
); );
}); });
const mergeRefs = useCallback( const mergeInputRefs = useCallback(
(element: HTMLInputElement | null) => { (element: HTMLInputElement | null) => {
inputRef.current = element; setInputElement(element);
if (typeof ref === 'function') { if (typeof ref === 'function') {
ref(element); ref(element);
} else if (ref) { } else if (ref) {
@@ -525,7 +534,7 @@ const ComboboxWithRef = <Item extends ComboboxItem, GroupKey extends string>(
onKeyDown={handleInputKeyDown} onKeyDown={handleInputKeyDown}
icon={icon ?? undefined} icon={icon ?? undefined}
className={classNames(classes.input, className)} className={classNames(classes.input, className)}
ref={mergeRefs} ref={mergeInputRefs}
/> />
{hasMenuContent && ( {hasMenuContent && (
<IconButton <IconButton
@@ -551,20 +560,23 @@ const ComboboxWithRef = <Item extends ComboboxItem, GroupKey extends string>(
<span role='status' aria-live='polite' className='sr-only'> <span role='status' aria-live='polite' className='sr-only'>
{isMenuOpen && statusMessage} {isMenuOpen && statusMessage}
</span> </span>
<Overlay <Popover
show={isMenuOpen} matchReferenceWidth
offset={[0, 1]} isOpen={isMenuOpen}
onClose={closeMenu}
offset={1}
placement='bottom-start' placement='bottom-start'
onHide={closeMenu} strategy='absolute'
ref={popoverRef} popoverElement={popoverElement}
target={inputRef as React.RefObject<HTMLInputElement>} reference={inputElement}
container={wrapperRef as React.RefObject<HTMLDivElement>} container={null}
popperConfig={{
modifiers: [matchWidth],
}}
> >
{({ props, placement }) => ( {({ props, placement }) => (
<div {...props} className={classNames(classes.popover, placement)}> <div
{...props}
ref={setPopoverElement}
className={classNames(classes.popover, placement)}
>
<StatusMessageWrapper <StatusMessageWrapper
showStatus={showStatusMessageInMenu} showStatus={showStatusMessageInMenu}
isLoading={isLoading} isLoading={isLoading}
@@ -608,7 +620,7 @@ const ComboboxWithRef = <Item extends ComboboxItem, GroupKey extends string>(
</StatusMessageWrapper> </StatusMessageWrapper>
</div> </div>
)} )}
</Overlay> </Popover>
</div> </div>
); );
}; };
@@ -2,23 +2,18 @@ import { useEffect, useRef, useState, useCallback } from 'react';
import { useLocation } from 'react-router-dom'; import { useLocation } from 'react-router-dom';
import type {
OffsetValue,
UsePopperOptions,
} from 'react-overlays/esm/usePopper';
import Overlay from 'react-overlays/Overlay';
import { HoverCardAccount } from 'mastodon/components/hover_card_account'; import { HoverCardAccount } from 'mastodon/components/hover_card_account';
import type { PopoverProps } from 'mastodon/components/popover';
import { Popover } from 'mastodon/components/popover';
import { useTimeout } from 'mastodon/hooks/useTimeout'; import { useTimeout } from 'mastodon/hooks/useTimeout';
const offset = [-12, 4] as OffsetValue; const offset: PopoverProps['offset'] = { crossAxis: -12, mainAxis: 4 } as const;
const enterDelay = 750; const enterDelay = 750;
const leaveDelay = 150; const leaveDelay = 150;
// Only open the card if the mouse was moved within this time, // Only open the card if the mouse was moved within this time,
// to avoid triggering the card without intentional mouse movement // to avoid triggering the card without intentional mouse movement
// (e.g. when content changed underneath the mouse cursor) // (e.g. when content changed underneath the mouse cursor)
const activeMovementThreshold = 150; const activeMovementThreshold = 150;
const popperConfig = { strategy: 'fixed' } as UsePopperOptions;
const isHoverCardAnchor = (element: HTMLElement) => const isHoverCardAnchor = (element: HTMLElement) =>
element.matches('[data-hover-card-account]'); element.matches('[data-hover-card-account]');
@@ -212,21 +207,18 @@ export const HoverCardController: React.FC = () => {
]); ]);
return ( return (
<Overlay <Popover
rootClose onClose={handleClose}
onHide={handleClose} isOpen={open}
show={open} reference={anchor}
target={anchor}
placement='bottom-start' placement='bottom-start'
flip
offset={offset} offset={offset}
popperConfig={popperConfig}
> >
{({ props }) => ( {({ props }) => (
<div {...props} className='hover-card-controller'> <div {...props} className='hover-card-controller'>
<HoverCardAccount accountId={accountId} ref={cardRef} /> <HoverCardAccount accountId={accountId} ref={cardRef} />
</div> </div>
)} )}
</Overlay> </Popover>
); );
}; };
@@ -1,15 +1,15 @@
import { useState, useRef, useCallback, useId } from 'react'; import { useState, useCallback, useId } from 'react';
import { FormattedMessage } from 'react-intl'; import { FormattedMessage } from 'react-intl';
import Overlay from 'react-overlays/Overlay'; import { Popover } from './popover';
export const LearnMoreLink: React.FC<{ children: React.ReactNode }> = ({ export const LearnMoreLink: React.FC<{ children: React.ReactNode }> = ({
children, children,
}) => { }) => {
const accessibilityId = useId(); const accessibilityId = useId();
const [open, setOpen] = useState(false); const [open, setOpen] = useState(false);
const triggerRef = useRef<HTMLButtonElement>(null); const [trigger, setTrigger] = useState<HTMLButtonElement | null>(null);
const handleClick = useCallback(() => { const handleClick = useCallback(() => {
setOpen(!open); setOpen(!open);
@@ -19,7 +19,7 @@ export const LearnMoreLink: React.FC<{ children: React.ReactNode }> = ({
<> <>
<button <button
className='link-button' className='link-button'
ref={triggerRef} ref={setTrigger}
onClick={handleClick} onClick={handleClick}
aria-expanded={open} aria-expanded={open}
aria-controls={accessibilityId} aria-controls={accessibilityId}
@@ -31,13 +31,12 @@ export const LearnMoreLink: React.FC<{ children: React.ReactNode }> = ({
/> />
</button> </button>
<Overlay <Popover
show={open} isOpen={open}
rootClose onClose={handleClick}
onHide={handleClick} offset={5}
offset={[5, 5]}
placement='bottom-end' placement='bottom-end'
target={triggerRef as React.RefObject<HTMLButtonElement>} reference={trigger}
> >
{({ props }) => ( {({ props }) => (
<div <div
@@ -62,7 +61,7 @@ export const LearnMoreLink: React.FC<{ children: React.ReactNode }> = ({
</div> </div>
</div> </div>
)} )}
</Overlay> </Popover>
</> </>
); );
}; };
+19 -6
View File
@@ -15,7 +15,6 @@ import { fetchPoll, vote } from 'mastodon/actions/polls';
import { Icon } from 'mastodon/components/icon'; import { Icon } from 'mastodon/components/icon';
import { useIdentity } from 'mastodon/identity_context'; import { useIdentity } from 'mastodon/identity_context';
import type * as Model from 'mastodon/models/poll'; import type * as Model from 'mastodon/models/poll';
import type { Status } from 'mastodon/models/status';
import { useAppDispatch, useAppSelector } from 'mastodon/store'; import { useAppDispatch, useAppSelector } from 'mastodon/store';
import { RelativeTimestamp } from './relative_timestamp'; import { RelativeTimestamp } from './relative_timestamp';
@@ -40,12 +39,18 @@ const isPollExpired = (expiresAt: Model.Poll['expires_at']) =>
interface PollProps { interface PollProps {
pollId: string; pollId: string;
status: Status; accountId: string;
statusUrl: string;
lang?: string; lang?: string;
disabled?: boolean; disabled?: boolean;
} }
export const Poll: React.FC<PollProps> = ({ pollId, disabled, status }) => { export const Poll: React.FC<PollProps> = ({
pollId,
disabled,
accountId,
statusUrl,
}) => {
// Third party hooks // Third party hooks
const poll = useAppSelector((state) => state.polls[pollId]); const poll = useAppSelector((state) => state.polls[pollId]);
const identity = useIdentity(); const identity = useIdentity();
@@ -110,14 +115,22 @@ export const Poll: React.FC<PollProps> = ({ pollId, disabled, status }) => {
openModal({ openModal({
modalType: 'INTERACTION', modalType: 'INTERACTION',
modalProps: { modalProps: {
accountId,
intent: 'vote', intent: 'vote',
accountId: status.getIn(['account', 'id']), url: statusUrl,
url: status.get('uri'),
}, },
}), }),
); );
} }
}, [voteDisabled, dispatch, identity, pollId, selected, status]); }, [
voteDisabled,
dispatch,
identity,
pollId,
selected,
accountId,
statusUrl,
]);
const handleReveal = useCallback(() => { const handleReveal = useCallback(() => {
setRevealed(true); setRevealed(true);
@@ -0,0 +1,203 @@
import { useEffect } from 'react';
import type {
ReferenceType,
Placement,
OffsetOptions,
Strategy,
} from '@floating-ui/react-dom';
import {
useFloating,
autoUpdate,
inline,
offset as offsetMiddleware,
shift,
flip as flipMiddleware,
size,
hide,
} from '@floating-ui/react-dom';
import { useOnClickOutside } from '@/mastodon/hooks/useOnClickOutside';
import { Portal } from './portal';
export interface PopoverProps {
/**
* Set the visibility of the popover
*/
isOpen?: boolean;
/**
* Callback triggered when the popover needs to be closed
* (e.g. because the Esc key was pressed).
*/
onClose: (e: Event) => void;
/**
* Pass an element that the popover should be attached to.
* Must come from `useState`, not `useRef`.
*/
reference: ReferenceType | null;
/**
* Pass the popover element (useful if you also need the element
* in the parent and already have it in state).
* Must come from `useState`, not `useRef`.
*/
popoverElement?: HTMLElement | null;
/**
* Control which element the popover will be rendered into.
* Passing `null` will render the popover in place.
*/
container?: HTMLElement | null;
/**
* Control where the overlay element is positioned in relation
* to the reference element
*/
placement?: Placement;
/**
* Control the distance between popover and reference
*/
offset?: OffsetOptions;
/**
* Allow the popover to flip to the other side of the reference
* if there's no room in the specified direction. Enabled by default.
*/
flip?: boolean;
/**
* Change the positioning strategy, defaults to 'fixed'
* but can be changed to 'absolute'
*/
strategy?: Strategy;
/**
* Adapt the popover's width to match that of the reference,
* useful when attached to text input.
*/
matchReferenceWidth?: boolean;
/**
* Control whether to close the popover when clicking outside
* of it (enabled by default).
*/
closeOnClickOutside?: boolean;
/**
* Render prop that must return the popover element.
*/
children: (value: {
/**
* The popover's final computed placement. Can be used to
* adjust the popover's style based on its position.
*/
placement: Placement | undefined;
/**
* Re-computes the popover's position – call this when an
* action inside of the popover has changed its size.
*/
update: () => void;
/**
* These props must be passed to the popover element to
* enable it to be sized and positioned. The `ref` prop
* is not passed when the `popoverElement` prop is provided.
*/
props: Record<string, unknown> & {
ref?: React.RefCallback<HTMLElement>;
style: React.CSSProperties;
};
}) => React.ReactNode;
}
export const Popover: React.FC<PopoverProps> = ({
isOpen,
onClose,
reference,
popoverElement,
placement = 'bottom',
offset,
strategy = 'fixed',
flip = true,
container,
matchReferenceWidth = false,
closeOnClickOutside = true,
children,
}) => {
const {
placement: computedPlacement,
update,
refs,
floatingStyles,
middlewareData,
elements,
} = useFloating({
elements: {
reference,
floating: popoverElement,
},
placement,
strategy,
whileElementsMounted: autoUpdate,
middleware: [
offsetMiddleware(offset),
inline(),
shift(),
flip ? flipMiddleware() : null,
matchReferenceWidth
? size({
apply({ rects, elements }) {
Object.assign(elements.floating.style, {
minWidth: `${rects.reference.width}px`,
});
},
})
: null,
hide(),
],
});
// Close when clicking outside the popover
useOnClickOutside(
[
elements.floating,
// Only pass reference if it's not a "virtual element"
elements.reference instanceof Element ? elements.reference : null,
],
(e) => {
onClose(e);
},
isOpen && closeOnClickOutside,
);
// Close when pressing Escape
useEffect(() => {
if (!isOpen) {
return () => null;
}
function closeOnEscape(event: KeyboardEvent) {
if (event.key === 'Escape') {
onClose(event);
}
}
document.addEventListener('keyup', closeOnEscape);
return () => {
document.removeEventListener('keyup', closeOnEscape);
};
}, [isOpen, onClose]);
if (!isOpen) {
return null;
}
return (
<Portal container={container}>
{children({
placement: computedPlacement,
update,
props: {
ref: popoverElement ? undefined : refs.setFloating,
style: floatingStyles,
'data-popover-placement': computedPlacement,
'data-popover-reference-hidden': middlewareData.hide?.referenceHidden,
'data-popover-escaped': middlewareData.hide?.escaped,
},
})}
</Portal>
);
};
@@ -0,0 +1,21 @@
import { createPortal } from 'react-dom';
interface PortalProps {
/**
* The element to render the Portal's children into.
* Must be an object, e.g. the result of a getElementById() call.
* Set to `null` to render the children in place,
* i.e. effectively disable the Portal's functionality
*/
readonly container?: HTMLElement | SVGElement | null;
readonly children?: React.ReactNode;
}
export const Portal: React.FC<PortalProps> = ({
container,
children,
}: PortalProps) => {
if (container === null) return children;
return createPortal(children, container ?? document.body);
};
@@ -187,7 +187,7 @@ const BoostOrQuoteMenu: FC<ReblogButtonProps> = ({ status, counters }) => {
return ( return (
<Dropdown <Dropdown
placement='bottom-start' placement='bottom-start'
offset={[-19, 5]} // This aligns button icon with menu icons offset={{ mainAxis: 5, crossAxis: -19 }} // This aligns button icon with menu icons
items={items} items={items}
renderItem={renderMenuItem} renderItem={renderMenuItem}
onOpen={handleDropdownOpen} onOpen={handleDropdownOpen}
@@ -0,0 +1,121 @@
import type { Meta, StoryObj } from '@storybook/react-vite';
import { fn } from 'storybook/test';
import type { StatusTranslation } from '@/mastodon/models/status';
import { statusFactoryState } from '@/testing/factories';
import { StatusContent } from './content';
interface StatusContentProps {
text: string;
collapsible: boolean;
clickable: boolean;
translatable: boolean;
translatedTo?: string;
}
const onClickFn = fn().mockName('onClick');
const onTranslateFn = fn().mockName('onTranslate');
const meta = {
title: 'Components/Status/StatusContent',
render(args) {
return (
<div style={{ width: 'min(600px, 80vw)' }}>
<StatusContent
statusId='1'
collapsible={args.collapsible}
onClick={args.clickable ? onClickFn : undefined}
onTranslate={args.translatable ? onTranslateFn : undefined}
/>
</div>
);
},
args: {
text: 'This is status text.',
collapsible: true,
clickable: true,
translatable: true,
},
argTypes: {
text: {
reduxPath: 'statuses.1.contentHtml',
},
translatedTo: {
control: 'select',
options: ['en', 'de', 'fr'],
},
},
parameters: {
state: {
server: {
translationLanguages: {
item: {
en: ['en', 'de', 'fr'],
},
},
},
},
stateFn(args: StatusContentProps) {
let status = statusFactoryState();
if (args.translatedTo) {
status = status.set('translation', {
contentHtml: `${args.text}<p><em>(in ${args.translatedTo})</em></p>`,
provider: 'Test Translation API',
spoiler_text: '',
spoilerHtml: '',
language: args.translatedTo,
detected_source_language: 'en',
} satisfies StatusTranslation);
}
return {
statuses: {
'1': status,
},
};
},
},
} satisfies Meta<StatusContentProps>;
export default meta;
type Story = StoryObj<typeof meta>;
export const Default: Story = {};
export const ReadMore: Story = {
args: {
text: [
'This is a long-form piece of text that wraps multiple lines.',
'It is here to test what a longer status looks like.',
'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
'Pellentesque a ante placerat, egestas eros vitae, ornare orci.',
'Phasellus fringilla felis vel purus fermentum, nec viverra eros fringilla.',
'Mauris feugiat metus in dolor elementum, ultricies suscipit sapien tincidunt.',
'Mauris vestibulum urna vel mauris sagittis, a blandit felis cursus.',
'Sed nec sem dictum ligula hendrerit dignissim et non dolor.',
'Cras maximus lorem sit amet aliquet faucibus.',
'Donec tempus lectus vitae laoreet congue.',
'Nulla congue nibh sed eros pulvinar pharetra.',
'Fusce vel nibh quis nisi mollis volutpat quis vel erat.',
'Fusce non metus non sapien volutpat elementum.',
'Aenean elementum ipsum ut neque bibendum, eget blandit ex efficitur.',
'Morbi semper eros at ipsum pellentesque mattis.',
'Donec ultricies ante imperdiet placerat tempus.',
'Vivamus vitae ante sit amet lectus porta mollis quis dictum quam.',
'Cras dignissim ante at turpis scelerisque, non hendrerit ipsum vestibulum.',
'Quisque ac nulla ac sem auctor posuere eget id ex.',
'Phasellus cursus purus sit amet sollicitudin finibus.',
'In varius justo eu metus dapibus, non imperdiet lorem efficitur.',
'Nulla tincidunt odio eget ipsum auctor rhoncus.',
]
.map((text) => `<p>${text}</p>`)
.join('\n'),
},
};
export const Translated: Story = {
args: {
translatedTo: 'fr',
},
};
@@ -0,0 +1,210 @@
import type React from 'react';
import { useCallback } from 'react';
import { FormattedMessage, useIntl } from 'react-intl';
import classnames from 'classnames';
import { toggleStatusCollapse } from '@/mastodon/actions/statuses';
import { useIdentity } from '@/mastodon/identity_context';
import { languages as preloadedLanguages } from '@/mastodon/initial_state';
import type { StatusTranslation } from '@/mastodon/models/status';
import { selectPlainStatus } from '@/mastodon/selectors/statuses';
import { useAppDispatch, useAppSelector } from '@/mastodon/store';
import ChevronRightIcon from '@/material-icons/400-24px/chevron_right.svg?react';
import { EmojiHTML } from '../emoji/html';
import { Icon } from '../icon';
import { Poll } from '../poll';
import { useElementHandledLink } from './handled_link';
const MAX_HEIGHT = 706; // 22px * 32 (+ 2px padding at the top)
export const StatusContent: React.FC<{
statusId: string;
onClick?: React.MouseEventHandler;
onTranslate?: React.MouseEventHandler<HTMLButtonElement>;
collapsible?: boolean;
}> = ({ statusId, onClick, onTranslate, collapsible }) => {
const status = useAppSelector((state) => selectPlainStatus(state, statusId));
const { signedIn } = useIdentity();
const targetLanguages = useAppSelector(
(state) =>
state.server.translationLanguages.item?.[status?.language ?? 'und'],
);
const intl = useIntl();
// Determines if a long post should show the read more button.
const dispatch = useAppDispatch();
const handleCollapse = useCallback(
(node: HTMLDivElement | null) => {
if (!node || status?.collapsed !== null || !collapsible) {
return;
}
const text = node.querySelector(':scope > .status__content__text');
const collapsed =
(node.clientHeight > MAX_HEIGHT ||
(text !== null && text.scrollWidth > text.clientWidth)) &&
!status.spoiler_text;
dispatch(toggleStatusCollapse(status.id, collapsed));
},
[collapsible, status, dispatch],
);
// Trigger the click event if clicking outside a link, button, or label inside a status.
const handleClick: React.MouseEventHandler<HTMLDivElement> = useCallback(
(event) => {
const { target } = event;
if (
!onClick ||
!(target instanceof Element) ||
target.closest(':is(a, button, label)')
) {
return;
}
onClick(event);
},
[onClick],
);
const hrefToMention = useCallback(
(href: string) => status?.mentions.find((item) => item.url === href),
[status?.mentions],
);
const hrefToCollectionId = useCallback(
(href: string) =>
status?.tagged_collections.find((item) => item.url === href)?.id,
[status?.tagged_collections],
);
const htmlHandlers = useElementHandledLink({
hashtagAccountId: status?.account,
hrefToCollectionId,
hrefToMention,
});
if (!status) {
return null;
}
const language = status.translation?.language ?? status.language;
const renderReadMore = !!onClick && status.collapsed;
const readMoreButton = renderReadMore && (
<button
className='status__content__read-more-button'
type='button'
onClick={onClick}
key='read-more'
>
<FormattedMessage id='status.read_more' defaultMessage='Read more' />
<Icon id='angle-right' icon={ChevronRightIcon} />
</button>
);
const renderTranslate =
!!onTranslate &&
signedIn &&
['public', 'unlisted'].includes(status.visibility) &&
status.search_index &&
status.search_index.trim().length > 0 &&
targetLanguages?.includes(intl.locale.replace(/[_-].*/, ''));
const translateButton = renderTranslate && (
<TranslateButton onClick={onTranslate} translation={status.translation} />
);
const poll = !!status.poll && (
<Poll
pollId={status.poll}
statusUrl={status.uri}
accountId={status.account}
lang={language}
/>
);
const content = (
<EmojiHTML
className='status__content__text status__content__text--visible translate'
lang={language}
htmlString={status.translation?.contentHtml ?? status.contentHtml}
extraEmojis={status.emojis}
{...htmlHandlers}
/>
);
const classNames = classnames('status__content', {
'status__content--with-action': onClick,
'status__content--collapsed': renderReadMore,
});
if (!onClick) {
return (
<div className={classNames} ref={handleCollapse}>
{content}
{poll}
{translateButton}
</div>
);
}
/* eslint-disable jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */
return (
<>
<div className={classNames} ref={handleCollapse} onClick={handleClick}>
{content}
{poll}
{translateButton}
</div>
{readMoreButton}
</>
);
/* eslint-enable jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */
};
const TranslateButton: React.FC<{
onClick: React.MouseEventHandler<HTMLButtonElement>;
translation?: StatusTranslation;
}> = ({ translation, onClick }) => {
if (!translation) {
return (
<button
type='button'
className='status__content__translate-button'
onClick={onClick}
>
<FormattedMessage id='status.translate' defaultMessage='Translate' />
</button>
);
}
const language = preloadedLanguages?.find(
(lang) => lang[0] === translation.detected_source_language,
);
const languageName = language
? language[1]
: translation.detected_source_language;
const provider = translation.provider;
return (
<div className='translate-button'>
<button type='button' className='link-button' onClick={onClick}>
<FormattedMessage
id='status.show_original'
defaultMessage='Show original'
/>
</button>
<div className='translate-button__meta'>
<FormattedMessage
id='status.translated_from_with'
defaultMessage='Translated from {lang} using {provider}'
values={{ lang: languageName, provider }}
/>
</div>
</div>
);
};
@@ -1,16 +1,15 @@
import { useEffect, useRef, useState, useId } from 'react'; import { useEffect, useState, useId } from 'react';
import { FormattedMessage, useIntl } from 'react-intl'; import { FormattedMessage, useIntl } from 'react-intl';
import classNames from 'classnames'; import classNames from 'classnames';
import Overlay from 'react-overlays/Overlay';
import { useDismissible } from '@/mastodon/hooks/useDismissible'; import { useDismissible } from '@/mastodon/hooks/useDismissible';
import MoreHorizIcon from '@/material-icons/400-24px/more_horiz.svg?react'; import MoreHorizIcon from '@/material-icons/400-24px/more_horiz.svg?react';
import { Button } from '../button'; import { Button } from '../button';
import { Icon } from '../icon'; import { Icon } from '../icon';
import { Popover } from '../popover';
import classes from './remove_quote_hint.module.css'; import classes from './remove_quote_hint.module.css';
@@ -28,7 +27,9 @@ export const RemoveQuoteHint: React.FC<{
className?: string; className?: string;
children: (dismiss: () => void) => React.ReactNode; children: (dismiss: () => void) => React.ReactNode;
}> = ({ canShowHint, className, children }) => { }> = ({ canShowHint, className, children }) => {
const anchorRef = useRef<HTMLDivElement>(null); const [anchorElement, setAnchorElement] = useState<HTMLDivElement | null>(
null,
);
const intl = useIntl(); const intl = useIntl();
const { wasDismissed, dismiss } = useDismissible(DISMISSIBLE_BANNER_ID); const { wasDismissed, dismiss } = useDismissible(DISMISSIBLE_BANNER_ID);
@@ -57,16 +58,16 @@ export const RemoveQuoteHint: React.FC<{
}, [shouldShowHint, uniqueId]); }, [shouldShowHint, uniqueId]);
return ( return (
<div className={className} ref={anchorRef}> <div className={className} ref={setAnchorElement}>
{children(dismiss)} {children(dismiss)}
{shouldShowHint && isOnlyHint && ( {shouldShowHint && isOnlyHint && (
<Overlay <Popover
show isOpen
flip offset={{ mainAxis: 10, crossAxis: 12 }}
offset={[12, 10]}
placement='bottom-end' placement='bottom-end'
target={anchorRef as React.RefObject<HTMLDivElement>} reference={anchorElement}
container={anchorRef as React.RefObject<HTMLDivElement>} container={anchorElement}
onClose={dismiss}
> >
{({ props, placement }) => ( {({ props, placement }) => (
<div <div
@@ -113,7 +114,7 @@ export const RemoveQuoteHint: React.FC<{
</FormattedMessage> </FormattedMessage>
</div> </div>
)} )}
</Overlay> </Popover>
)} )}
</div> </div>
); );
@@ -208,7 +208,7 @@ class StatusContent extends PureComponent {
); );
const poll = !!status.get('poll') && ( const poll = !!status.get('poll') && (
<Poll pollId={status.get('poll')} status={status} lang={language} /> <Poll pollId={status.get('poll')} statusUrl={status.get('uri')} accountId={status.getIn(['account', 'id'])} lang={language} />
); );
if (this.props.onClick) { if (this.props.onClick) {
@@ -5,8 +5,6 @@ import { defineMessages, useIntl } from 'react-intl';
import classNames from 'classnames'; import classNames from 'classnames';
import type { OffsetValue } from 'react-overlays/esm/usePopper';
import type { ModalType } from '@/mastodon/actions/modal'; import type { ModalType } from '@/mastodon/actions/modal';
import { openModal } from '@/mastodon/actions/modal'; import { openModal } from '@/mastodon/actions/modal';
import { Dropdown } from '@/mastodon/components/dropdown_menu'; import { Dropdown } from '@/mastodon/components/dropdown_menu';
@@ -118,7 +116,7 @@ export const AccountImageEdit: FC<{
<Dropdown <Dropdown
items={items} items={items}
placement={location === 'header' ? 'bottom-end' : 'bottom-start'} placement={location === 'header' ? 'bottom-end' : 'bottom-start'}
offset={popperOffset} offset={6}
className={classes.imageMenu} className={classes.imageMenu}
icon='camera' icon='camera'
title={intl.formatMessage(messages.replace)} title={intl.formatMessage(messages.replace)}
@@ -127,5 +125,3 @@ export const AccountImageEdit: FC<{
/> />
); );
}; };
const popperOffset = [0, 6] as OffsetValue;
@@ -1,15 +1,14 @@
import { useCallback, useId, useRef, useState } from 'react'; import { useCallback, useId, useState } from 'react';
import type { ChangeEventHandler, FC } from 'react'; import type { ChangeEventHandler, FC } from 'react';
import { FormattedMessage } from 'react-intl'; import { FormattedMessage } from 'react-intl';
import { useParams } from 'react-router'; import { useParams } from 'react-router';
import Overlay from 'react-overlays/esm/Overlay';
import { AccountTabs } from '@/mastodon/components/account_header/tabs'; import { AccountTabs } from '@/mastodon/components/account_header/tabs';
import { Toggle } from '@/mastodon/components/form_fields'; import { Toggle } from '@/mastodon/components/form_fields';
import { Icon } from '@/mastodon/components/icon'; import { Icon } from '@/mastodon/components/icon';
import { Popover } from '@/mastodon/components/popover';
import KeyboardArrowDownIcon from '@/material-icons/400-24px/keyboard_arrow_down.svg?react'; import KeyboardArrowDownIcon from '@/material-icons/400-24px/keyboard_arrow_down.svg?react';
import { useAccountContext } from '../hooks/useAccountContext'; import { useAccountContext } from '../hooks/useAccountContext';
@@ -32,10 +31,12 @@ export const AccountFilters: FC = () => {
const FilterDropdown: FC = () => { const FilterDropdown: FC = () => {
const [open, setOpen] = useState(false); const [open, setOpen] = useState(false);
const buttonRef = useRef<HTMLButtonElement>(null); const [buttonElement, setButtonElement] = useState<HTMLButtonElement | null>(
null,
);
const handleClick = useCallback(() => { const handleClick = useCallback(() => {
setOpen(true); setOpen((prev) => !prev);
}, []); }, []);
const handleHide = useCallback(() => { const handleHide = useCallback(() => {
setOpen(false); setOpen(false);
@@ -55,14 +56,13 @@ const FilterDropdown: FC = () => {
); );
const accessibleId = useId(); const accessibleId = useId();
const containerRef = useRef<HTMLDivElement>(null);
return ( return (
<div ref={containerRef}> <div>
<button <button
type='button' type='button'
className={classes.filterSelectButton} className={classes.filterSelectButton}
ref={buttonRef} ref={setButtonElement}
onClick={handleClick} onClick={handleClick}
aria-expanded={open} aria-expanded={open}
aria-controls={`${accessibleId}-wrapper`} aria-controls={`${accessibleId}-wrapper`}
@@ -97,13 +97,13 @@ const FilterDropdown: FC = () => {
className={classes.filterSelectIcon} className={classes.filterSelectIcon}
/> />
</button> </button>
<Overlay <Popover
show={open} isOpen={open}
target={buttonRef as React.RefObject<HTMLButtonElement>} reference={buttonElement}
placement='bottom-start' placement='bottom-start'
rootClose onClose={handleHide}
onHide={handleHide} strategy='absolute'
container={containerRef as React.RefObject<HTMLDivElement>} container={null}
> >
{({ props }) => ( {({ props }) => (
<div <div
@@ -138,7 +138,7 @@ const FilterDropdown: FC = () => {
/> />
</div> </div>
)} )}
</Overlay> </Popover>
</div> </div>
); );
}; };
@@ -1,11 +1,10 @@
import { useState, useRef, useCallback, useId } from 'react'; import { useState, useCallback, useId } from 'react';
import { FormattedMessage, useIntl, defineMessages } from 'react-intl'; import { FormattedMessage, useIntl, defineMessages } from 'react-intl';
import classNames from 'classnames'; import classNames from 'classnames';
import Overlay from 'react-overlays/Overlay'; import { Popover } from '@/mastodon/components/popover';
import QuestionMarkIcon from '@/material-icons/400-24px/question_mark.svg?react'; import QuestionMarkIcon from '@/material-icons/400-24px/question_mark.svg?react';
import { Icon } from 'mastodon/components/icon'; import { Icon } from 'mastodon/components/icon';
import { useSelectableClick } from 'mastodon/hooks/useSelectableClick'; import { useSelectableClick } from 'mastodon/hooks/useSelectableClick';
@@ -17,7 +16,7 @@ const messages = defineMessages({
export const InfoButton: React.FC = () => { export const InfoButton: React.FC = () => {
const intl = useIntl(); const intl = useIntl();
const [open, setOpen] = useState(false); const [open, setOpen] = useState(false);
const triggerRef = useRef<HTMLButtonElement>(null); const [trigger, setTrigger] = useState<HTMLButtonElement | null>(null);
const accessibilityId = useId(); const accessibilityId = useId();
const handleClick = useCallback(() => { const handleClick = useCallback(() => {
@@ -31,7 +30,7 @@ export const InfoButton: React.FC = () => {
<button <button
type='button' type='button'
className={classNames('help-button', { active: open })} className={classNames('help-button', { active: open })}
ref={triggerRef} ref={setTrigger}
onClick={handleClick} onClick={handleClick}
aria-expanded={open} aria-expanded={open}
aria-controls={accessibilityId} aria-controls={accessibilityId}
@@ -40,13 +39,12 @@ export const InfoButton: React.FC = () => {
<Icon id='' icon={QuestionMarkIcon} /> <Icon id='' icon={QuestionMarkIcon} />
</button> </button>
<Overlay <Popover
show={open} isOpen={open}
rootClose
placement='top' placement='top'
onHide={handleClick} onClose={handleClick}
offset={[5, 5]} offset={5}
target={triggerRef as React.RefObject<HTMLButtonElement>} reference={trigger}
> >
{({ props }) => ( {({ props }) => (
<div // eslint-disable-line jsx-a11y/no-noninteractive-element-interactions <div // eslint-disable-line jsx-a11y/no-noninteractive-element-interactions
@@ -82,7 +80,7 @@ export const InfoButton: React.FC = () => {
/> />
</div> </div>
)} )}
</Overlay> </Popover>
</> </>
); );
}; };
@@ -6,11 +6,11 @@ import { defineMessages, FormattedMessage } from 'react-intl';
import classNames from 'classnames'; import classNames from 'classnames';
import { supportsPassiveEvents } from 'detect-passive-events'; import { supportsPassiveEvents } from 'detect-passive-events';
import Overlay from 'react-overlays/Overlay';
import MoodIcon from '@/material-icons/400-20px/mood.svg?react'; import MoodIcon from '@/material-icons/400-20px/mood.svg?react';
import { IconButton } from 'mastodon/components/icon_button'; import { IconButton } from '@/mastodon/components/icon_button';
import { injectIntl } from '@/mastodon/components/intl'; import { injectIntl } from '@/mastodon/components/intl';
import { Popover } from '@/mastodon/components/popover';
import { EmojiPicker as EmojiPickerAsync } from '../../ui/util/async-components'; import { EmojiPicker as EmojiPickerAsync } from '../../ui/util/async-components';
@@ -175,16 +175,7 @@ class EmojiPickerMenuImpl extends PureComponent {
readyToFocus: false, readyToFocus: false,
}; };
handleDocumentClick = e => {
if (this.node && !this.node.contains(e.target) && !this.props.pickerButtonRef.contains(e.target)) {
this.props.onClose();
}
};
componentDidMount() { componentDidMount() {
document.addEventListener('click', this.handleDocumentClick, { capture: true });
document.addEventListener('touchend', this.handleDocumentClick, listenerOptions);
// Because of https://github.com/react-bootstrap/react-bootstrap/issues/2614 we need // Because of https://github.com/react-bootstrap/react-bootstrap/issues/2614 we need
// to wait for a frame before focusing // to wait for a frame before focusing
requestAnimationFrame(() => { requestAnimationFrame(() => {
@@ -196,11 +187,6 @@ class EmojiPickerMenuImpl extends PureComponent {
}); });
} }
componentWillUnmount() {
document.removeEventListener('click', this.handleDocumentClick, { capture: true });
document.removeEventListener('touchend', this.handleDocumentClick, listenerOptions);
}
setRef = c => { setRef = c => {
this.node = c; this.node = c;
}; };
@@ -307,7 +293,7 @@ class EmojiPickerDropdown extends PureComponent {
state = { state = {
active: false, active: false,
loading: false, loading: false,
placement: 'bottom', target: null,
}; };
setRef = (c) => { setRef = (c) => {
@@ -344,31 +330,17 @@ class EmojiPickerDropdown extends PureComponent {
} }
}; };
handleKeyDown = e => {
if (e.key === 'Escape') {
this.onHideDropdown();
}
};
setTargetRef = c => { setTargetRef = c => {
this.target = c; this.setState({ target: c });
};
findTarget = () => {
return this.target;
};
handleOverlayEnter = (state) => {
this.setState({ placement: state.placement });
}; };
render() { render() {
const { intl, onPickEmoji, onSkinTone, skinTone, frequentlyUsedEmojis, disabled } = this.props; const { intl, onPickEmoji, onSkinTone, skinTone, frequentlyUsedEmojis, disabled } = this.props;
const title = intl.formatMessage(messages.emoji); const title = intl.formatMessage(messages.emoji);
const { active, loading, placement } = this.state; const { active, loading, target } = this.state;
return ( return (
<div className='emoji-picker-dropdown' onKeyDown={this.handleKeyDown} ref={this.setTargetRef}> <div className='emoji-picker-dropdown' ref={this.setTargetRef}>
<IconButton <IconButton
title={title} title={title}
aria-expanded={active} aria-expanded={active}
@@ -380,23 +352,25 @@ class EmojiPickerDropdown extends PureComponent {
inverted inverted
/> />
<Overlay show={active} placement={placement} flip target={this.findTarget} popperConfig={{ strategy: 'fixed', onFirstUpdate: this.handleOverlayEnter }}> <Popover
isOpen={active}
reference={target}
onClose={this.onHideDropdown}
>
{({ props, placement }) => ( {({ props, placement }) => (
<div {...props} style={{ ...props.style }}> <div {...props} className={`dropdown-animation ${placement}`}>
<div className={`dropdown-animation ${placement}`}> <EmojiPickerMenu
<EmojiPickerMenu loading={loading}
loading={loading} onClose={this.onHideDropdown}
onClose={this.onHideDropdown} onPick={onPickEmoji}
onPick={onPickEmoji} onSkinTone={onSkinTone}
onSkinTone={onSkinTone} skinTone={skinTone}
skinTone={skinTone} frequentlyUsedEmojis={frequentlyUsedEmojis}
frequentlyUsedEmojis={frequentlyUsedEmojis} pickerButtonRef={this.target}
pickerButtonRef={this.target} />
/>
</div>
</div> </div>
)} )}
</Overlay> </Popover>
</div> </div>
); );
} }
@@ -8,9 +8,8 @@ import { createSelector } from '@reduxjs/toolkit';
import { Map as ImmutableMap } from 'immutable'; import { Map as ImmutableMap } from 'immutable';
import fuzzysort from 'fuzzysort'; import fuzzysort from 'fuzzysort';
import Overlay from 'react-overlays/Overlay';
import type { State, Placement } from 'react-overlays/usePopper';
import { Popover } from '@/mastodon/components/popover';
import CancelIcon from '@/material-icons/400-24px/cancel-fill.svg?react'; import CancelIcon from '@/material-icons/400-24px/cancel-fill.svg?react';
import SearchIcon from '@/material-icons/400-24px/search.svg?react'; import SearchIcon from '@/material-icons/400-24px/search.svg?react';
import TranslateIcon from '@/material-icons/400-24px/translate.svg?react'; import TranslateIcon from '@/material-icons/400-24px/translate.svg?react';
@@ -203,34 +202,13 @@ const LanguageDropdownMenu: React.FC<{
const isSearching = searchValue !== ''; const isSearching = searchValue !== '';
useEffect(() => { useEffect(() => {
const handleDocumentClick = (e: MouseEvent) => { if (nodeRef.current) {
if ( const element = nodeRef.current.querySelector<HTMLInputElement>(
nodeRef.current && 'input[type="search"]',
e.target instanceof HTMLElement && );
!nodeRef.current.contains(e.target) if (element) element.focus();
) { }
onClose(); }, []);
e.stopPropagation();
}
};
document.addEventListener('click', handleDocumentClick, { capture: true });
// Because of https://github.com/react-bootstrap/react-bootstrap/issues/2614 we need
// to wait for a frame before focusing
requestAnimationFrame(() => {
if (nodeRef.current) {
const element = nodeRef.current.querySelector<HTMLInputElement>(
'input[type="search"]',
);
if (element) element.focus();
}
});
return () => {
document.removeEventListener('click', handleDocumentClick);
};
}, [onClose]);
const results = useMemo(() => { const results = useMemo(() => {
if (searchValue === '') { if (searchValue === '') {
@@ -326,10 +304,9 @@ const LanguageDropdownMenu: React.FC<{
export const LanguageDropdown: React.FC = () => { export const LanguageDropdown: React.FC = () => {
const [open, setOpen] = useState(false); const [open, setOpen] = useState(false);
const [placement, setPlacement] = useState<Placement | undefined>('bottom');
const [guess, setGuess] = useState(''); const [guess, setGuess] = useState('');
const activeElementRef = useRef<HTMLElement>(null); const activeElementRef = useRef<HTMLElement | null>(null);
const targetRef = useRef<HTMLButtonElement>(null); const [targetElement, setTargetElement] = useState<HTMLElement | null>(null);
const intl = useIntl(); const intl = useIntl();
@@ -369,13 +346,6 @@ export const LanguageDropdown: React.FC = () => {
[dispatch], [dispatch],
); );
const handleOverlayEnter = useCallback(
(state: Partial<State>) => {
setPlacement(state.placement);
},
[setPlacement],
);
useEffect(() => { useEffect(() => {
if (isTextLongEnoughForGuess(text)) { if (isTextLongEnoughForGuess(text)) {
debouncedGuess(text, setGuess); debouncedGuess(text, setGuess);
@@ -402,7 +372,7 @@ export const LanguageDropdown: React.FC = () => {
<> <>
<button <button
type='button' type='button'
ref={targetRef} ref={setTargetElement}
title={intl.formatMessage(messages.changeLanguage)} title={intl.formatMessage(messages.changeLanguage)}
aria-expanded={open} aria-expanded={open}
onClick={handleToggle} onClick={handleToggle}
@@ -416,13 +386,11 @@ export const LanguageDropdown: React.FC = () => {
<span className='dropdown-button__label'>{current[2] ?? value}</span> <span className='dropdown-button__label'>{current[2] ?? value}</span>
</button> </button>
<Overlay <Popover
show={open} isOpen={open}
offset={[5, 5]} onClose={handleClose}
placement={placement} offset={5}
flip reference={targetElement}
target={targetRef as React.RefObject<HTMLButtonElement>}
popperConfig={{ strategy: 'fixed', onFirstUpdate: handleOverlayEnter }}
> >
{({ props, placement }) => ( {({ props, placement }) => (
<div {...props}> <div {...props}>
@@ -438,7 +406,7 @@ export const LanguageDropdown: React.FC = () => {
</div> </div>
</div> </div>
)} )}
</Overlay> </Popover>
</> </>
); );
}; };
@@ -4,10 +4,8 @@ import { defineMessages, useIntl } from 'react-intl';
import classNames from 'classnames'; import classNames from 'classnames';
import type { OverlayProps } from 'react-overlays/Overlay';
import Overlay from 'react-overlays/Overlay';
import type { StatusVisibility } from '@/mastodon/api_types/statuses'; import type { StatusVisibility } from '@/mastodon/api_types/statuses';
import { Popover } from '@/mastodon/components/popover';
import AlternateEmailIcon from '@/material-icons/400-24px/alternate_email.svg?react'; import AlternateEmailIcon from '@/material-icons/400-24px/alternate_email.svg?react';
import LockIcon from '@/material-icons/400-24px/lock.svg?react'; import LockIcon from '@/material-icons/400-24px/lock.svg?react';
import PublicIcon from '@/material-icons/400-24px/public.svg?react'; import PublicIcon from '@/material-icons/400-24px/public.svg?react';
@@ -58,7 +56,6 @@ interface PrivacyDropdownProps {
value: StatusVisibility; value: StatusVisibility;
onChange: (value: StatusVisibility) => void; onChange: (value: StatusVisibility) => void;
noDirect?: boolean; noDirect?: boolean;
container?: OverlayProps['container'];
disabled?: boolean; disabled?: boolean;
} }
@@ -66,11 +63,12 @@ const PrivacyDropdown: React.FC<PrivacyDropdownProps> = ({
value, value,
onChange, onChange,
noDirect, noDirect,
container,
disabled, disabled,
}) => { }) => {
const intl = useIntl(); const intl = useIntl();
const overlayTargetRef = useRef<HTMLDivElement>(null); const [popoverTarget, setPopoverTarget] = useState<HTMLDivElement | null>(
null,
);
const previousFocusTargetRef = useRef<HTMLElement>(null); const previousFocusTargetRef = useRef<HTMLElement>(null);
const [isOpen, setIsOpen] = useState(false); const [isOpen, setIsOpen] = useState(false);
@@ -142,7 +140,7 @@ const PrivacyDropdown: React.FC<PrivacyDropdownProps> = ({
options.find((item) => item.value === value) ?? options.at(0); options.find((item) => item.value === value) ?? options.at(0);
return ( return (
<div ref={overlayTargetRef}> <div ref={setPopoverTarget}>
<button <button
type='button' type='button'
title={intl.formatMessage(messages.change_privacy)} title={intl.formatMessage(messages.change_privacy)}
@@ -166,14 +164,11 @@ const PrivacyDropdown: React.FC<PrivacyDropdownProps> = ({
)} )}
</button> </button>
<Overlay <Popover
show={isOpen} isOpen={isOpen}
offset={[5, 5]} offset={5}
placement='bottom' reference={popoverTarget}
flip onClose={handleClose}
target={overlayTargetRef as React.RefObject<HTMLDivElement>}
container={container}
popperConfig={{ strategy: 'fixed' }}
> >
{({ props, placement }) => ( {({ props, placement }) => (
<div {...props}> <div {...props}>
@@ -190,7 +185,7 @@ const PrivacyDropdown: React.FC<PrivacyDropdownProps> = ({
</div> </div>
</div> </div>
)} )}
</Overlay> </Popover>
</div> </div>
); );
}; };
@@ -60,6 +60,7 @@ export const Emoji: FC<EmojiProps> = ({
sheetSize={sheetSize} sheetSize={sheetSize}
skin={1} skin={1}
tooltip={false} tooltip={false}
forceSize={false}
{...{ useButton: true }} {...{ useButton: true }}
{...props} {...props}
/> />
@@ -73,7 +73,7 @@ export type CustomEmojiMapArg =
| ExtraCustomEmojiMap | ExtraCustomEmojiMap
| ImmutableList<CustomEmoji> | ImmutableList<CustomEmoji>
| CustomEmoji[] | CustomEmoji[]
| ApiCustomEmojiJSON[]; | Pick<ApiCustomEmojiJSON, 'shortcode' | 'static_url' | 'url'>[];
export type ExtraCustomEmojiMap = Record< export type ExtraCustomEmojiMap = Record<
string, string,
@@ -1,11 +1,9 @@
import type { PropsWithChildren } from 'react'; import type { PropsWithChildren } from 'react';
import { useCallback, useState, useRef, useId } from 'react'; import { useCallback, useState, useId } from 'react';
import classNames from 'classnames'; import classNames from 'classnames';
import type { Placement, State as PopperState } from '@popperjs/core'; import { Popover } from '@/mastodon/components/popover';
import Overlay from 'react-overlays/Overlay';
import ArrowDropDownIcon from '@/material-icons/400-24px/arrow_drop_down.svg?react'; import ArrowDropDownIcon from '@/material-icons/400-24px/arrow_drop_down.svg?react';
import type { SelectItem } from 'mastodon/components/dropdown_selector'; import type { SelectItem } from 'mastodon/components/dropdown_selector';
import { DropdownSelector } from 'mastodon/components/dropdown_selector'; import { DropdownSelector } from 'mastodon/components/dropdown_selector';
@@ -18,7 +16,6 @@ interface DropdownProps {
onChange: (value: string) => void; onChange: (value: string) => void;
'aria-labelledby': string; 'aria-labelledby': string;
'aria-describedby'?: string; 'aria-describedby'?: string;
placement?: Placement;
} }
const Dropdown: React.FC<DropdownProps> = ({ const Dropdown: React.FC<DropdownProps> = ({
@@ -28,22 +25,21 @@ const Dropdown: React.FC<DropdownProps> = ({
onChange, onChange,
'aria-labelledby': ariaLabelledBy, 'aria-labelledby': ariaLabelledBy,
'aria-describedby': ariaDescribedBy, 'aria-describedby': ariaDescribedBy,
placement: initialPlacement = 'bottom-end',
}) => { }) => {
const containerRef = useRef<HTMLDivElement>(null); const [buttonElement, setButtonElement] = useState<HTMLButtonElement | null>(
const buttonRef = useRef<HTMLButtonElement>(null); null,
);
const [isOpen, setOpen] = useState<boolean>(false); const [isOpen, setOpen] = useState<boolean>(false);
const [placement, setPlacement] = useState<Placement>(initialPlacement);
const uniqueId = useId(); const uniqueId = useId();
const menuId = `${uniqueId}-menu`; const menuId = `${uniqueId}-menu`;
const buttonLabelId = `${uniqueId}-button`; const buttonLabelId = `${uniqueId}-button`;
const handleClose = useCallback(() => { const handleClose = useCallback(() => {
if (isOpen && buttonRef.current) { if (isOpen && buttonElement) {
buttonRef.current.focus({ preventScroll: true }); buttonElement.focus({ preventScroll: true });
} }
setOpen(false); setOpen(false);
}, [isOpen]); }, [isOpen, buttonElement]);
const handleToggle = useCallback(() => { const handleToggle = useCallback(() => {
if (isOpen) { if (isOpen) {
@@ -53,20 +49,13 @@ const Dropdown: React.FC<DropdownProps> = ({
} }
}, [isOpen, handleClose]); }, [isOpen, handleClose]);
const handleOverlayEnter = useCallback(
(state: Partial<PopperState>) => {
if (state.placement) setPlacement(state.placement);
},
[setPlacement],
);
const valueOption = options.find((item) => item.value === value); const valueOption = options.find((item) => item.value === value);
return ( return (
<div ref={containerRef}> <div>
<button <button
type='button' type='button'
ref={buttonRef} ref={setButtonElement}
onClick={handleToggle} onClick={handleToggle}
disabled={disabled} disabled={disabled}
aria-expanded={isOpen} aria-expanded={isOpen}
@@ -81,30 +70,29 @@ const Dropdown: React.FC<DropdownProps> = ({
<Icon id='down' icon={ArrowDropDownIcon} /> <Icon id='down' icon={ArrowDropDownIcon} />
</button> </button>
<Overlay <Popover
show={isOpen} isOpen={isOpen}
offset={[5, 5]} offset={5}
placement={placement} placement='bottom-end'
flip reference={buttonElement}
target={containerRef as React.RefObject<HTMLDivElement>} onClose={handleClose}
popperConfig={{ strategy: 'fixed', onFirstUpdate: handleOverlayEnter }}
> >
{({ props, placement }) => ( {({ props, placement }) => (
<div {...props} id={menuId}> <div
<div {...props}
className={`dropdown-animation privacy-dropdown__dropdown ${placement}`} id={menuId}
> className={`dropdown-animation privacy-dropdown__dropdown ${placement}`}
<DropdownSelector >
items={options} <DropdownSelector
value={value} items={options}
onClose={handleClose} value={value}
onChange={onChange} onClose={handleClose}
classNamePrefix='privacy-dropdown' onChange={onChange}
/> classNamePrefix='privacy-dropdown'
</div> />
</div> </div>
)} )}
</Overlay> </Popover>
</div> </div>
); );
}; };
@@ -52,14 +52,6 @@ export const BoostModal: React.FC<{
onClose(); onClose();
}, [onClose]); }, [onClose]);
const findContainer = useCallback(
() =>
document.getElementsByClassName(
'modal-root__container',
)[0] as HTMLDivElement,
[],
);
return ( return (
<div className='modal-root__modal safety-action-modal'> <div className='modal-root__modal safety-action-modal'>
<div className='safety-action-modal__top'> <div className='safety-action-modal__top'>
@@ -109,7 +101,6 @@ export const BoostModal: React.FC<{
<PrivacyDropdown <PrivacyDropdown
noDirect noDirect
value={privacy} value={privacy}
container={findContainer}
onChange={onPrivacyChange} onChange={onPrivacyChange}
disabled={statusVisibility === 'private'} disabled={statusVisibility === 'private'}
/> />
@@ -4,13 +4,8 @@ import { useIntl, defineMessages } from 'react-intl';
import { useLocation } from 'react-router-dom'; import { useLocation } from 'react-router-dom';
import type {
OffsetValue,
UsePopperOptions,
} from 'react-overlays/esm/usePopper';
import Overlay from 'react-overlays/Overlay';
import { DropdownMenu } from 'mastodon/components/dropdown_menu'; import { DropdownMenu } from 'mastodon/components/dropdown_menu';
import { Popover } from 'mastodon/components/popover';
import { useIdentity } from 'mastodon/identity_context'; import { useIdentity } from 'mastodon/identity_context';
import type { MenuItem } from 'mastodon/models/dropdown_menu'; import type { MenuItem } from 'mastodon/models/dropdown_menu';
import { useAppSelector } from 'mastodon/store'; import { useAppSelector } from 'mastodon/store';
@@ -27,9 +22,6 @@ const messages = defineMessages({
muteHashtag: { id: 'hashtag.mute', defaultMessage: 'Mute #{hashtag}' }, muteHashtag: { id: 'hashtag.mute', defaultMessage: 'Mute #{hashtag}' },
}); });
const offset = [5, 5] as OffsetValue;
const popperConfig = { strategy: 'fixed' } as UsePopperOptions;
const isHashtagLink = ( const isHashtagLink = (
element: HTMLAnchorElement | null, element: HTMLAnchorElement | null,
): element is HTMLAnchorElement => { ): element is HTMLAnchorElement => {
@@ -135,30 +127,19 @@ export const HashtagMenuController: React.FC = () => {
} }
return ( return (
<Overlay <Popover isOpen={open} offset={5} reference={element} onClose={handleClose}>
show={open} {({ props, placement }) => (
offset={offset} <div
placement='bottom' {...props}
flip className={`dropdown-animation dropdown-menu ${placement}`}
target={element} >
popperConfig={popperConfig} <DropdownMenu
> items={menu}
{({ props, arrowProps, placement }) => ( onClose={handleClose}
<div {...props}> openedViaKeyboard={false}
<div className={`dropdown-animation dropdown-menu ${placement}`}> />
<div
className={`dropdown-menu__arrow ${placement}`}
{...arrowProps}
/>
<DropdownMenu
items={menu}
onClose={handleClose}
openedViaKeyboard={false}
/>
</div>
</div> </div>
)} )}
</Overlay> </Popover>
); );
}; };
@@ -3,47 +3,45 @@
*/ */
import type { RefObject } from 'react'; import type { RefObject } from 'react';
import { useEffect } from 'react'; import { useEffect, useEffectEvent } from 'react';
type ElementRef = RefObject<HTMLElement | null>; type PlainElement = Element | null;
type ElementOrRef = PlainElement | RefObject<PlainElement>;
export function useOnClickOutside( export function useOnClickOutside(
excludedElementRef: ElementRef | ElementRef[] | null, excludedElement: ElementOrRef | ElementOrRef[],
onClick: (e: MouseEvent) => void, onClick: (e: MouseEvent) => void,
enabled = true, enabled = true,
) { ) {
useEffect(() => { const handleClickOutside = useEffectEvent((event: MouseEvent) => {
// If the search popover is expanded, close it when tabbing or const excludedRefs = Array.isArray(excludedElement)
// clicking outside of it or the search form, while allowing ? excludedElement
// tabbing or clicking inside of the popover : [excludedElement];
if (enabled) {
function handleClickOutside(event: MouseEvent) {
const excludedRefs = Array.isArray(excludedElementRef)
? excludedElementRef
: [excludedElementRef];
for (const ref of excludedRefs) { for (const ref of excludedRefs) {
const excludedElement = ref?.current; const excludedElement = ref instanceof Element ? ref : ref?.current;
// Bail out if the clicked element or the currently focused element // Bail out if the clicked element or the currently focused element
// is inside of excludedElement. We're also checking the focused element // is inside of excludedElement. We're also checking the focused element
// to prevent an issue in Chrome where initiating a drag inside of an // to prevent an issue in Chrome where initiating a drag inside of an
// input (to select the text inside of it) and ending that drag outside // input (to select the text inside of it) and ending that drag outside
// of the input fires a click event, breaking our excludedElement rule. // of the input fires a click event, breaking our excludedElement rule.
if ( if (
excludedElement && excludedElement &&
(excludedElement === event.target || (excludedElement === event.target ||
excludedElement === document.activeElement || excludedElement === document.activeElement ||
excludedElement.contains(event.target as Node) || excludedElement.contains(event.target as Node) ||
excludedElement.contains(document.activeElement)) excludedElement.contains(document.activeElement))
) { ) {
return; return;
}
}
onClick(event);
} }
}
onClick(event);
});
useEffect(() => {
if (enabled) {
document.addEventListener('click', handleClickOutside); document.addEventListener('click', handleClickOutside);
return () => { return () => {
@@ -51,5 +49,5 @@ export function useOnClickOutside(
}; };
} }
return () => null; return () => null;
}, [enabled, excludedElementRef, onClick]); }, [enabled, excludedElement, onClick]);
} }
+2 -1
View File
@@ -267,6 +267,7 @@
"admin.impact_report.instance_followers": "Падпісчыкі, якіх страцяць нашыя карыстальнікі", "admin.impact_report.instance_followers": "Падпісчыкі, якіх страцяць нашыя карыстальнікі",
"admin.impact_report.instance_follows": "Падпісчыкі, якіх могуць страціць іх карыстальнікі", "admin.impact_report.instance_follows": "Падпісчыкі, якіх могуць страціць іх карыстальнікі",
"admin.impact_report.title": "Агульны ўплыў", "admin.impact_report.title": "Агульны ўплыў",
"alert.need_reload.message": "Mastodon быў абноўлены. Некаторыя функцыі могуць працаваць некарэктна, пакуль Вы не перазагрузіце старонку.",
"alert.rate_limited.message": "Калі ласка, паспрабуйце праз {retry_time, time, medium}.", "alert.rate_limited.message": "Калі ласка, паспрабуйце праз {retry_time, time, medium}.",
"alert.rate_limited.title": "Ліміт перавышаны", "alert.rate_limited.title": "Ліміт перавышаны",
"alert.unexpected.message": "Узнікла нечаканая памылка.", "alert.unexpected.message": "Узнікла нечаканая памылка.",
@@ -637,7 +638,7 @@
"empty_column.account_featured.other": "{acct} пакуль нічога не адабраў(-ла) для паказу.", "empty_column.account_featured.other": "{acct} пакуль нічога не адабраў(-ла) для паказу.",
"empty_column.account_featured_self.no_collections_button": "Стварыць калекцыю", "empty_column.account_featured_self.no_collections_button": "Стварыць калекцыю",
"empty_column.account_featured_self.no_collections_hide_tab": "Або схаваць гэтую ўкладку", "empty_column.account_featured_self.no_collections_hide_tab": "Або схаваць гэтую ўкладку",
"empty_column.account_featured_self.showcase_accounts": "Паказаць Вашыя ўлюбёныя ўліковыя запісы", "empty_column.account_featured_self.showcase_accounts": "Пакажыце свае ўлюбёныя ўліковыя запісы",
"empty_column.account_featured_self.showcase_accounts_desc": "Калекцыі — спісы адабраных уліковых запісаў, якія дапамагаюць іншым знаходзіць нешта новае ў федэральным сусвеце.", "empty_column.account_featured_self.showcase_accounts_desc": "Калекцыі — спісы адабраных уліковых запісаў, якія дапамагаюць іншым знаходзіць нешта новае ў федэральным сусвеце.",
"empty_column.account_featured_unknown.other": "Гэты ўліковы запіс пакуль нічога не адабраў для паказу.", "empty_column.account_featured_unknown.other": "Гэты ўліковы запіс пакуль нічога не адабраў для паказу.",
"empty_column.account_hides_collections": "Гэты карыстальнік вырашыў схаваць гэтую інфармацыю", "empty_column.account_hides_collections": "Гэты карыстальнік вырашыў схаваць гэтую інфармацыю",
+24
View File
@@ -199,7 +199,31 @@
"account_edit.field_reorder_modal.handle_label": "Přetáhněte pole \"{item}\"", "account_edit.field_reorder_modal.handle_label": "Přetáhněte pole \"{item}\"",
"account_edit.field_reorder_modal.title": "Přeuspořádat pole", "account_edit.field_reorder_modal.title": "Přeuspořádat pole",
"account_edit.image_alt_modal.add_title": "Přidat alternativní text", "account_edit.image_alt_modal.add_title": "Přidat alternativní text",
"account_edit.image_alt_modal.details_title": "Tipy: Alt text pro profilové fotky",
"account_edit.image_alt_modal.edit_title": "Upravit alt text",
"account_edit.image_alt_modal.text_hint": "Alt text pomáhá uživatelům používajícím čtečku obrazovky porozumět vašemu obsahu.",
"account_edit.image_alt_modal.text_label": "Alternativní text",
"account_edit.image_delete_modal.confirm": "Opravdu chcete smazat tento obrázek? Tuto akci nelze vrátit.",
"account_edit.image_delete_modal.delete_button": "Smazat",
"account_edit.image_delete_modal.title": "Smazat obrázek?",
"account_edit.image_edit.add_button": "Přidat obrázek",
"account_edit.image_edit.alt_add_button": "Přidat alt text",
"account_edit.image_edit.alt_edit_button": "Upravit alt text",
"account_edit.image_edit.remove_button": "Odstranit obrázek",
"account_edit.image_edit.replace_button": "Nahradit obrázek",
"account_edit.item_list.delete": "Odstranit {name}",
"account_edit.item_list.edit": "Upravit {name}",
"account_edit.name_modal.add_title": "Přidat zobrazované jméno",
"account_edit.name_modal.edit_title": "Upravit zobrazované jméno",
"account_edit.profile_tab.button_label": "Přizpůsobit",
"account_edit.save": "Uložit", "account_edit.save": "Uložit",
"account_edit.upload_modal.back": "Zpět",
"account_edit.upload_modal.done": "Hotovo",
"account_edit.upload_modal.next": "Další",
"account_edit.upload_modal.step_crop.zoom": "Přiblížit",
"account_edit.upload_modal.step_upload.button": "Procházet soubory",
"account_edit.upload_modal.step_upload.dragging": "Přetáhněte pro nahrání",
"account_edit.upload_modal.step_upload.header": "Vyberte obrázek",
"account_edit.upload_modal.step_upload.hint": "Formát WEBP, PNG, GIF nebo JPG, maximálně {limit}MB.{br}Obrázek bude převeden na rozměry {width}x{height}px.", "account_edit.upload_modal.step_upload.hint": "Formát WEBP, PNG, GIF nebo JPG, maximálně {limit}MB.{br}Obrázek bude převeden na rozměry {width}x{height}px.",
"account_edit.upload_modal.title_add.avatar": "Přidat profilovou fotku", "account_edit.upload_modal.title_add.avatar": "Přidat profilovou fotku",
"account_edit.upload_modal.title_add.header": "Přidat úvodní fotku", "account_edit.upload_modal.title_add.header": "Přidat úvodní fotku",
+4 -3
View File
@@ -267,6 +267,7 @@
"admin.impact_report.instance_followers": "Dilynwyr byddai ein defnyddwyr yn colli", "admin.impact_report.instance_followers": "Dilynwyr byddai ein defnyddwyr yn colli",
"admin.impact_report.instance_follows": "Dilynwyr byddai eu defnyddwyr yn colli", "admin.impact_report.instance_follows": "Dilynwyr byddai eu defnyddwyr yn colli",
"admin.impact_report.title": "Crynodeb effaith", "admin.impact_report.title": "Crynodeb effaith",
"alert.need_reload.message": "Mae Mastdon wedi'i ddiweddaru. Efallai na fydd rhai pethau'n gweithio'n iawn nes i chi ail-lwytho'r dudalen.",
"alert.rate_limited.message": "Ceisiwch eto ar ôl {retry_time, time, medium}.", "alert.rate_limited.message": "Ceisiwch eto ar ôl {retry_time, time, medium}.",
"alert.rate_limited.title": "Cyfradd gyfyngedig", "alert.rate_limited.title": "Cyfradd gyfyngedig",
"alert.unexpected.message": "Digwyddodd gwall annisgwyl.", "alert.unexpected.message": "Digwyddodd gwall annisgwyl.",
@@ -586,9 +587,9 @@
"copypaste.copy_to_clipboard": "Copïo i'r clipfwrdd", "copypaste.copy_to_clipboard": "Copïo i'r clipfwrdd",
"custom_homepage.about": "Ynghylch", "custom_homepage.about": "Ynghylch",
"custom_homepage.about_this_server": "Ynghylch y gweinydd hwn", "custom_homepage.about_this_server": "Ynghylch y gweinydd hwn",
"custom_homepage.administered_by": "Yn cael ei weinyddu gan:", "custom_homepage.administered_by": "Yn cael ei weinyddu gan",
"custom_homepage.contact": "Cysylltiad:", "custom_homepage.contact": "Cysylltiad:",
"custom_homepage.latest_activity": "Gweithred ddiwethaf:", "custom_homepage.latest_activity": "Gweithred ddiwethaf",
"custom_homepage.these_are_the_latest_posts": "Dyma'r 40 cofnod diweddaraf o gyfrifon ar y gweinydd hwn.", "custom_homepage.these_are_the_latest_posts": "Dyma'r 40 cofnod diweddaraf o gyfrifon ar y gweinydd hwn.",
"directory.federated": "O'r ffedysawd cyfan", "directory.federated": "O'r ffedysawd cyfan",
"directory.local": "O {domain} yn unig", "directory.local": "O {domain} yn unig",
@@ -1007,7 +1008,7 @@
"notifications.column_settings.admin.report": "Adroddiadau newydd:", "notifications.column_settings.admin.report": "Adroddiadau newydd:",
"notifications.column_settings.admin.sign_up": "Cofrestriadau newydd:", "notifications.column_settings.admin.sign_up": "Cofrestriadau newydd:",
"notifications.column_settings.alert": "Hysbysiadau bwrdd gwaith", "notifications.column_settings.alert": "Hysbysiadau bwrdd gwaith",
"notifications.column_settings.collections": "Casgliadau", "notifications.column_settings.collections": "Casgliadau:",
"notifications.column_settings.favourite": "Ffefrynnau:", "notifications.column_settings.favourite": "Ffefrynnau:",
"notifications.column_settings.filter_bar.advanced": "Dangos pob categori", "notifications.column_settings.filter_bar.advanced": "Dangos pob categori",
"notifications.column_settings.filter_bar.category": "Bar hidlo cyflym", "notifications.column_settings.filter_bar.category": "Bar hidlo cyflym",
+1
View File
@@ -267,6 +267,7 @@
"admin.impact_report.instance_followers": "Følgere, vores brugere ville miste", "admin.impact_report.instance_followers": "Følgere, vores brugere ville miste",
"admin.impact_report.instance_follows": "Følgere, deres brugere ville miste", "admin.impact_report.instance_follows": "Følgere, deres brugere ville miste",
"admin.impact_report.title": "Resumé af effekt", "admin.impact_report.title": "Resumé af effekt",
"alert.need_reload.message": "Mastodon er blevet opdateret. Nogle ting fungerer muligvis ikke korrekt, før du genindlæser siden.",
"alert.rate_limited.message": "Forsøg igen efter {retry_time, time, medium}.", "alert.rate_limited.message": "Forsøg igen efter {retry_time, time, medium}.",
"alert.rate_limited.title": "Hastighedsbegrænset", "alert.rate_limited.title": "Hastighedsbegrænset",
"alert.unexpected.message": "En uventet fejl opstod.", "alert.unexpected.message": "En uventet fejl opstod.",
+1
View File
@@ -267,6 +267,7 @@
"admin.impact_report.instance_followers": "Follower, die unsere Nutzer*innen verlieren würden", "admin.impact_report.instance_followers": "Follower, die unsere Nutzer*innen verlieren würden",
"admin.impact_report.instance_follows": "Follower, die deren Nutzer*innen verlieren würden", "admin.impact_report.instance_follows": "Follower, die deren Nutzer*innen verlieren würden",
"admin.impact_report.title": "Zusammenfassung der Auswirkung", "admin.impact_report.title": "Zusammenfassung der Auswirkung",
"alert.need_reload.message": "Mastodon wurde aktualisiert. Möglicherweise funktioniert nicht alles ordnungsgemäß, bis die Seite neu geladen wurde.",
"alert.rate_limited.message": "Bitte versuche es um {retry_time, time, medium} erneut.", "alert.rate_limited.message": "Bitte versuche es um {retry_time, time, medium} erneut.",
"alert.rate_limited.title": "Anfragelimit überschritten", "alert.rate_limited.title": "Anfragelimit überschritten",
"alert.unexpected.message": "Ein unerwarteter Fehler ist aufgetreten.", "alert.unexpected.message": "Ein unerwarteter Fehler ist aufgetreten.",
@@ -267,6 +267,7 @@
"admin.impact_report.instance_followers": "Seguidores que nuestros usuarios perderían", "admin.impact_report.instance_followers": "Seguidores que nuestros usuarios perderían",
"admin.impact_report.instance_follows": "Seguidores que perderían sus usuarios", "admin.impact_report.instance_follows": "Seguidores que perderían sus usuarios",
"admin.impact_report.title": "Resumen de impacto", "admin.impact_report.title": "Resumen de impacto",
"alert.need_reload.message": "Se actualizó Mastodon. Algunas cosas pueden no funcionar correctamente hasta que recargues la página.",
"alert.rate_limited.message": "Por favor, reintentá después de las {retry_time, time, medium}.", "alert.rate_limited.message": "Por favor, reintentá después de las {retry_time, time, medium}.",
"alert.rate_limited.title": "Acción limitada", "alert.rate_limited.title": "Acción limitada",
"alert.unexpected.message": "Ocurrió un error.", "alert.unexpected.message": "Ocurrió un error.",
@@ -267,6 +267,7 @@
"admin.impact_report.instance_followers": "Seguidores que nuestros usuarios perderían", "admin.impact_report.instance_followers": "Seguidores que nuestros usuarios perderían",
"admin.impact_report.instance_follows": "Seguidores que perderían sus usuarios", "admin.impact_report.instance_follows": "Seguidores que perderían sus usuarios",
"admin.impact_report.title": "Resumen de impacto", "admin.impact_report.title": "Resumen de impacto",
"alert.need_reload.message": "Se ha actualizado Mastodon. Es posible que algunas cosas no funcionen correctamente hasta que refresques la página.",
"alert.rate_limited.message": "Por favor, intenta después de las {retry_time, time, medium}.", "alert.rate_limited.message": "Por favor, intenta después de las {retry_time, time, medium}.",
"alert.rate_limited.title": "Tarifa limitada", "alert.rate_limited.title": "Tarifa limitada",
"alert.unexpected.message": "Hubo un error inesperado.", "alert.unexpected.message": "Hubo un error inesperado.",
+1
View File
@@ -267,6 +267,7 @@
"admin.impact_report.instance_followers": "Seguidores que nuestros usuarios perderían", "admin.impact_report.instance_followers": "Seguidores que nuestros usuarios perderían",
"admin.impact_report.instance_follows": "Seguidores que perderían sus usuarios", "admin.impact_report.instance_follows": "Seguidores que perderían sus usuarios",
"admin.impact_report.title": "Resumen de impacto", "admin.impact_report.title": "Resumen de impacto",
"alert.need_reload.message": "Mastodon ha sido actualizado. Algunas cosas pueden no funcionar correctamente hasta que recargues la página.",
"alert.rate_limited.message": "Por favor, vuelve a intentarlo después de {retry_time, time, medium}.", "alert.rate_limited.message": "Por favor, vuelve a intentarlo después de {retry_time, time, medium}.",
"alert.rate_limited.title": "Tráfico limitado", "alert.rate_limited.title": "Tráfico limitado",
"alert.unexpected.message": "Hubo un error inesperado.", "alert.unexpected.message": "Hubo un error inesperado.",
+1
View File
@@ -267,6 +267,7 @@
"admin.impact_report.instance_followers": "Seuraajat, jotka käyttäjämme menettäisivät", "admin.impact_report.instance_followers": "Seuraajat, jotka käyttäjämme menettäisivät",
"admin.impact_report.instance_follows": "Seuraajat, jotka heidän käyttäjänsä menettäisivät", "admin.impact_report.instance_follows": "Seuraajat, jotka heidän käyttäjänsä menettäisivät",
"admin.impact_report.title": "Vaikutusten yhteenveto", "admin.impact_report.title": "Vaikutusten yhteenveto",
"alert.need_reload.message": "Mastodon on päivitetty. Jotkin asiat eivät välttämättä toimi oikein, ennen kuin lataat sivun uudelleen.",
"alert.rate_limited.message": "Yritä uudelleen kello {retry_time, time, medium} jälkeen.", "alert.rate_limited.message": "Yritä uudelleen kello {retry_time, time, medium} jälkeen.",
"alert.rate_limited.title": "Pyyntömäärää rajoitettu", "alert.rate_limited.title": "Pyyntömäärää rajoitettu",
"alert.unexpected.message": "Tapahtui odottamaton virhe.", "alert.unexpected.message": "Tapahtui odottamaton virhe.",
@@ -267,6 +267,7 @@
"admin.impact_report.instance_followers": "Abonnés que nos utilisateurs perdraient", "admin.impact_report.instance_followers": "Abonnés que nos utilisateurs perdraient",
"admin.impact_report.instance_follows": "Abonnées que ses utilisateurs perdraient", "admin.impact_report.instance_follows": "Abonnées que ses utilisateurs perdraient",
"admin.impact_report.title": "Résumé de l'impact", "admin.impact_report.title": "Résumé de l'impact",
"alert.need_reload.message": "Mastodon a été mis à jour. Il peut y avoir des dysfonctionnements tant que vous ne rechargez pas la page.",
"alert.rate_limited.message": "Veuillez réessayer après {retry_time, time, medium}.", "alert.rate_limited.message": "Veuillez réessayer après {retry_time, time, medium}.",
"alert.rate_limited.title": "Débit limité", "alert.rate_limited.title": "Débit limité",
"alert.unexpected.message": "Une erreur inattendue s’est produite.", "alert.unexpected.message": "Une erreur inattendue s’est produite.",
+1
View File
@@ -267,6 +267,7 @@
"admin.impact_report.instance_followers": "Abonné·e·s que nos utilisateur·rice·s perdraient", "admin.impact_report.instance_followers": "Abonné·e·s que nos utilisateur·rice·s perdraient",
"admin.impact_report.instance_follows": "Abonné·e·s que leurs utilisateur·rice·s perdraient", "admin.impact_report.instance_follows": "Abonné·e·s que leurs utilisateur·rice·s perdraient",
"admin.impact_report.title": "Résumé de l'impact", "admin.impact_report.title": "Résumé de l'impact",
"alert.need_reload.message": "Mastodon a été mis à jour. Il peut y avoir des dysfonctionnements tant que vous ne rechargez pas la page.",
"alert.rate_limited.message": "Veuillez réessayer après {retry_time, time, medium}.", "alert.rate_limited.message": "Veuillez réessayer après {retry_time, time, medium}.",
"alert.rate_limited.title": "Nombre de requêtes limité", "alert.rate_limited.title": "Nombre de requêtes limité",
"alert.unexpected.message": "Une erreur inattendue s’est produite.", "alert.unexpected.message": "Une erreur inattendue s’est produite.",
+1
View File
@@ -267,6 +267,7 @@
"admin.impact_report.instance_followers": "As seguidoras que perderían as nosas usuarias", "admin.impact_report.instance_followers": "As seguidoras que perderían as nosas usuarias",
"admin.impact_report.instance_follows": "As seguidoras que as súas usuarias perderían", "admin.impact_report.instance_follows": "As seguidoras que as súas usuarias perderían",
"admin.impact_report.title": "Resumo das consecuencias", "admin.impact_report.title": "Resumo das consecuencias",
"alert.need_reload.message": "Actualizouse Mastodon. Pode que algunhas cousas non funcionen ben ata que volvas a cargar a páxina.",
"alert.rate_limited.message": "Téntao novamente após {retry_time, time, medium}.", "alert.rate_limited.message": "Téntao novamente após {retry_time, time, medium}.",
"alert.rate_limited.title": "Límite de intentos", "alert.rate_limited.title": "Límite de intentos",
"alert.unexpected.message": "Aconteceu un fallo non agardado.", "alert.unexpected.message": "Aconteceu un fallo non agardado.",
+1
View File
@@ -267,6 +267,7 @@
"admin.impact_report.instance_followers": "עוקבים שהמתשתמשים שלנו יאבדו", "admin.impact_report.instance_followers": "עוקבים שהמתשתמשים שלנו יאבדו",
"admin.impact_report.instance_follows": "עוקבים שהמתשתמשים שלהם יאבדו", "admin.impact_report.instance_follows": "עוקבים שהמתשתמשים שלהם יאבדו",
"admin.impact_report.title": "סיכום ההשפעה", "admin.impact_report.title": "סיכום ההשפעה",
"alert.need_reload.message": "מסטודון שודרג. חלק מהדברים עלולים לא לעבוד כראוי עד שתרעננו את הדף.",
"alert.rate_limited.message": " נא לנסות שוב אחרי {retry_time, time, medium}.", "alert.rate_limited.message": " נא לנסות שוב אחרי {retry_time, time, medium}.",
"alert.rate_limited.title": "חלה הגבלה על קצב התעבורה", "alert.rate_limited.title": "חלה הגבלה על קצב התעבורה",
"alert.unexpected.message": "אירעה שגיאה בלתי צפויה.", "alert.unexpected.message": "אירעה שגיאה בלתי צפויה.",
+1
View File
@@ -267,6 +267,7 @@
"admin.impact_report.instance_followers": "Követők, akiket a mi felhasználóink elveszítenének", "admin.impact_report.instance_followers": "Követők, akiket a mi felhasználóink elveszítenének",
"admin.impact_report.instance_follows": "Követők, akiket az ő felhasználóik elveszítenének", "admin.impact_report.instance_follows": "Követők, akiket az ő felhasználóik elveszítenének",
"admin.impact_report.title": "Hatásvizsgálat", "admin.impact_report.title": "Hatásvizsgálat",
"alert.need_reload.message": "A Mastodon frissítve lett. Az oldal újratöltséig néhány dolog lehet, hogy nem fog megfelelően működni.",
"alert.rate_limited.message": "Próbáld újra {retry_time, time, medium} után.", "alert.rate_limited.message": "Próbáld újra {retry_time, time, medium} után.",
"alert.rate_limited.title": "Adatforgalom korlátozva", "alert.rate_limited.title": "Adatforgalom korlátozva",
"alert.unexpected.message": "Váratlan hiba történt.", "alert.unexpected.message": "Váratlan hiba történt.",
+5
View File
@@ -267,6 +267,7 @@
"admin.impact_report.instance_followers": "Fylgjendur sem notendur okkar myndu tapa", "admin.impact_report.instance_followers": "Fylgjendur sem notendur okkar myndu tapa",
"admin.impact_report.instance_follows": "Fylgjendur sem þeirra notendur myndu tapa", "admin.impact_report.instance_follows": "Fylgjendur sem þeirra notendur myndu tapa",
"admin.impact_report.title": "Samantekt áhrifa", "admin.impact_report.title": "Samantekt áhrifa",
"alert.need_reload.message": "Mastodon hefur verið uppfært. Sum atriði gætu virkað ekki rétt fyrr en þú hefur látið endurlesa síðuna.",
"alert.rate_limited.message": "Prófaðu aftur eftir {retry_time, time, medium}.", "alert.rate_limited.message": "Prófaðu aftur eftir {retry_time, time, medium}.",
"alert.rate_limited.title": "Með takmörkum", "alert.rate_limited.title": "Með takmörkum",
"alert.unexpected.message": "Upp kom óvænt villa.", "alert.unexpected.message": "Upp kom óvænt villa.",
@@ -561,6 +562,7 @@
"confirmations.remove_from_followers.message": "{name} mun hætta að fylgja þér. Ertu viss um að þú viljir halda áfram?", "confirmations.remove_from_followers.message": "{name} mun hætta að fylgja þér. Ertu viss um að þú viljir halda áfram?",
"confirmations.remove_from_followers.title": "Fjarlægja fylgjanda?", "confirmations.remove_from_followers.title": "Fjarlægja fylgjanda?",
"confirmations.revoke_collection_inclusion.confirm": "Fjarlægja mig", "confirmations.revoke_collection_inclusion.confirm": "Fjarlægja mig",
"confirmations.revoke_collection_inclusion.message": "Umsjónaraðilinn getur ekki bætt þér aftur í þetta safn í næstu 24 klukkustundir. Til að koma endanlega í veg fyrir að viðkomandi geti bætt þér í söfn ættirðu að loka á hann.",
"confirmations.revoke_collection_inclusion.title": "Á að fjarlægja þig úr þessu safni?", "confirmations.revoke_collection_inclusion.title": "Á að fjarlægja þig úr þessu safni?",
"confirmations.revoke_quote.confirm": "Fjarlægja færslu", "confirmations.revoke_quote.confirm": "Fjarlægja færslu",
"confirmations.revoke_quote.message": "Þessa aðgerð er ekki hægt að afturkalla.", "confirmations.revoke_quote.message": "Þessa aðgerð er ekki hægt að afturkalla.",
@@ -1137,6 +1139,9 @@
"report.categories.spam": "Ruslpóstur", "report.categories.spam": "Ruslpóstur",
"report.categories.violation": "Efnið brýtur gegn einni eða fleiri reglum netþjónsins", "report.categories.violation": "Efnið brýtur gegn einni eða fleiri reglum netþjónsins",
"report.category.subtitle": "Veldu hvað samsvarar best", "report.category.subtitle": "Veldu hvað samsvarar best",
"report.category.title_account": "Segðu okkur hvað sé athugavert við þennan notandaaðgang",
"report.category.title_collection": "Segðu okkur hvað sé athugavert við þetta safn",
"report.category.title_status": "Segðu okkur hvað sé athugavert við þessa færslu",
"report.close": "Lokið", "report.close": "Lokið",
"report.comment.title": "Er eitthvað annað sem þú heldur að við ættum að vita?", "report.comment.title": "Er eitthvað annað sem þú heldur að við ættum að vita?",
"report.forward": "Áframsenda til {target}", "report.forward": "Áframsenda til {target}",
+1
View File
@@ -267,6 +267,7 @@
"admin.impact_report.instance_followers": "I follower che i nostri utenti perderebbero", "admin.impact_report.instance_followers": "I follower che i nostri utenti perderebbero",
"admin.impact_report.instance_follows": "I follower che i loro utenti perderebbero", "admin.impact_report.instance_follows": "I follower che i loro utenti perderebbero",
"admin.impact_report.title": "Riepilogo dell'impatto", "admin.impact_report.title": "Riepilogo dell'impatto",
"alert.need_reload.message": "Mastodon è stato aggiornato. Alcune funzionalità potrebbero non funzionare correttamente finché non ricarichi la pagina.",
"alert.rate_limited.message": "Sei pregato di riprovare dopo le {retry_time, time, medium}.", "alert.rate_limited.message": "Sei pregato di riprovare dopo le {retry_time, time, medium}.",
"alert.rate_limited.title": "Limitazione per eccesso di richieste", "alert.rate_limited.title": "Limitazione per eccesso di richieste",
"alert.unexpected.message": "Si è verificato un errore imprevisto.", "alert.unexpected.message": "Si è verificato un errore imprevisto.",
+10
View File
@@ -267,6 +267,7 @@
"admin.impact_report.instance_followers": "Fylgjarar som brukarane våre ville mista", "admin.impact_report.instance_followers": "Fylgjarar som brukarane våre ville mista",
"admin.impact_report.instance_follows": "Fylgjarar som brukarane deira ville mista", "admin.impact_report.instance_follows": "Fylgjarar som brukarane deira ville mista",
"admin.impact_report.title": "Samandrag av konsekvensane", "admin.impact_report.title": "Samandrag av konsekvensane",
"alert.need_reload.message": "Mastodon er oppdatert. Nokre ting fungerer kanskje ikkje skikkeleg før du lastar sida på nytt.",
"alert.rate_limited.message": "Ver venleg å prøv på nytt etter {retry_time, time, medium}.", "alert.rate_limited.message": "Ver venleg å prøv på nytt etter {retry_time, time, medium}.",
"alert.rate_limited.title": "Redusert kapasitet", "alert.rate_limited.title": "Redusert kapasitet",
"alert.unexpected.message": "Det oppstod eit uventa problem.", "alert.unexpected.message": "Det oppstod eit uventa problem.",
@@ -561,6 +562,7 @@
"confirmations.remove_from_followers.message": "{name} vil ikkje fylgja deg meir. Vil du halda fram?", "confirmations.remove_from_followers.message": "{name} vil ikkje fylgja deg meir. Vil du halda fram?",
"confirmations.remove_from_followers.title": "Fjern fylgjar?", "confirmations.remove_from_followers.title": "Fjern fylgjar?",
"confirmations.revoke_collection_inclusion.confirm": "Fjern meg", "confirmations.revoke_collection_inclusion.confirm": "Fjern meg",
"confirmations.revoke_collection_inclusion.message": "Kuratoren vil ikkje kunna leggja deg til att i denne samlinga på 24 timar. Du kan blokkera dei for å hindra dei i å leggja deg til i samlingar for alltid.",
"confirmations.revoke_collection_inclusion.title": "Vil du fjerna deg sjølv frå denne samlinga?", "confirmations.revoke_collection_inclusion.title": "Vil du fjerna deg sjølv frå denne samlinga?",
"confirmations.revoke_quote.confirm": "Fjern innlegget", "confirmations.revoke_quote.confirm": "Fjern innlegget",
"confirmations.revoke_quote.message": "Du kan ikkje angra denne handlinga.", "confirmations.revoke_quote.message": "Du kan ikkje angra denne handlinga.",
@@ -648,6 +650,7 @@
"empty_column.collections": "{acct} har ikkje laga nokon samlingar enno.", "empty_column.collections": "{acct} har ikkje laga nokon samlingar enno.",
"empty_column.collections.featured_in": "Du er ikkje lagt til i nokon samlingar enno.", "empty_column.collections.featured_in": "Du er ikkje lagt til i nokon samlingar enno.",
"empty_column.collections.featured_in_undiscoverable": "For at folk skal kunna leggja deg til i samlingar, må du gje dei løyve til å oppdaga deg i <link>Innstillingar > Personvern og rekkjevidd</link>", "empty_column.collections.featured_in_undiscoverable": "For at folk skal kunna leggja deg til i samlingar, må du gje dei løyve til å oppdaga deg i <link>Innstillingar > Personvern og rekkjevidd</link>",
"empty_column.collections_self": "Du har ikkje laga nokon samlingar enno.",
"empty_column.community": "Den lokale tidslina er tom. Skriv noko offentleg å få ballen til å rulle!", "empty_column.community": "Den lokale tidslina er tom. Skriv noko offentleg å få ballen til å rulle!",
"empty_column.direct": "Du har ingen private omtaler enda. Etter du har sendt eller mottatt en, så vil den dukke opp her.", "empty_column.direct": "Du har ingen private omtaler enda. Etter du har sendt eller mottatt en, så vil den dukke opp her.",
"empty_column.disabled_feed": "Administratorane på tenaren din har skrudd av denne straumen.", "empty_column.disabled_feed": "Administratorane på tenaren din har skrudd av denne straumen.",
@@ -779,6 +782,7 @@
"home.pending_critical_update.link": "Sjå oppdateringar", "home.pending_critical_update.link": "Sjå oppdateringar",
"home.pending_critical_update.title": "Kritisk sikkerheitsoppdatering er tilgjengeleg!", "home.pending_critical_update.title": "Kritisk sikkerheitsoppdatering er tilgjengeleg!",
"home.show_announcements": "Vis kunngjeringar", "home.show_announcements": "Vis kunngjeringar",
"ignore_notifications_modal.bots_title": "Oversjå varsel frå botar?",
"ignore_notifications_modal.disclaimer": "Mastodon kan ikkje informera brukarane at du overser varsla deira. Å oversjå varsel vil ikkje hindra at meldingane blir sende.", "ignore_notifications_modal.disclaimer": "Mastodon kan ikkje informera brukarane at du overser varsla deira. Å oversjå varsel vil ikkje hindra at meldingane blir sende.",
"ignore_notifications_modal.filter_instead": "Filtrer i staden", "ignore_notifications_modal.filter_instead": "Filtrer i staden",
"ignore_notifications_modal.filter_to_act_users": "Du kan framleis godta, avvisa eller rapportera brukarar", "ignore_notifications_modal.filter_to_act_users": "Du kan framleis godta, avvisa eller rapportera brukarar",
@@ -845,6 +849,7 @@
"keyboard_shortcuts.toggle_sensitivity": "Vis/gøym media", "keyboard_shortcuts.toggle_sensitivity": "Vis/gøym media",
"keyboard_shortcuts.toot": "Lag nytt tut", "keyboard_shortcuts.toot": "Lag nytt tut",
"keyboard_shortcuts.top": "Flytt til toppen av lista", "keyboard_shortcuts.top": "Flytt til toppen av lista",
"keyboard_shortcuts.translate": "Omset eit innlegg",
"keyboard_shortcuts.unfocus": "for å fokusere vekk skrive-/søkefeltet", "keyboard_shortcuts.unfocus": "for å fokusere vekk skrive-/søkefeltet",
"keyboard_shortcuts.up": "Flytt opp på lista", "keyboard_shortcuts.up": "Flytt opp på lista",
"learn_more_link.got_it": "Forstått", "learn_more_link.got_it": "Forstått",
@@ -1040,6 +1045,8 @@
"notifications.policy.drop": "Oversjå", "notifications.policy.drop": "Oversjå",
"notifications.policy.drop_hint": "Send ut i endeløysa så det aldri kjem att", "notifications.policy.drop_hint": "Send ut i endeløysa så det aldri kjem att",
"notifications.policy.filter": "Filtrer", "notifications.policy.filter": "Filtrer",
"notifications.policy.filter_bots_hint": "Kontoar som er merkte som automatiske",
"notifications.policy.filter_bots_title": "Botar",
"notifications.policy.filter_hint": "Send til innboksen for filtrerte varsel", "notifications.policy.filter_hint": "Send til innboksen for filtrerte varsel",
"notifications.policy.filter_limited_accounts_hint": "Avgrensa av moderatorar på tenaren", "notifications.policy.filter_limited_accounts_hint": "Avgrensa av moderatorar på tenaren",
"notifications.policy.filter_limited_accounts_title": "Modererte kontoar", "notifications.policy.filter_limited_accounts_title": "Modererte kontoar",
@@ -1132,6 +1139,9 @@
"report.categories.spam": "Søppelpost", "report.categories.spam": "Søppelpost",
"report.categories.violation": "Innhaldet bryt med ein eller fleire reglar for tenaren", "report.categories.violation": "Innhaldet bryt med ein eller fleire reglar for tenaren",
"report.category.subtitle": "Vel det som passar best", "report.category.subtitle": "Vel det som passar best",
"report.category.title_account": "Fortel oss kva som er i vegen med denne profilen",
"report.category.title_collection": "Fortel oss kva som er i vegen med denne samlinga",
"report.category.title_status": "Fortel oss kva som er i vegen med dette innlegget",
"report.close": "Ferdig", "report.close": "Ferdig",
"report.comment.title": "Er det noko anna du meiner me bør vite?", "report.comment.title": "Er det noko anna du meiner me bør vite?",
"report.forward": "Vidaresend til {target}", "report.forward": "Vidaresend til {target}",
+47
View File
@@ -182,15 +182,18 @@
"account_edit.field_edit_modal.discard_confirm": "Odrzuć", "account_edit.field_edit_modal.discard_confirm": "Odrzuć",
"account_edit.field_edit_modal.discard_message": "Masz niezapisane zmiany. Czy na pewno chcesz je odrzucić?", "account_edit.field_edit_modal.discard_message": "Masz niezapisane zmiany. Czy na pewno chcesz je odrzucić?",
"account_edit.field_edit_modal.edit_title": "Edytuj dodatkowe pole", "account_edit.field_edit_modal.edit_title": "Edytuj dodatkowe pole",
"account_edit.field_edit_modal.length_warning": "Przekroczono limit zalecanych znaków. Użytkownicy mobilni mogą nie widzieć Twojego pola w całości.",
"account_edit.field_edit_modal.name_hint": "Np. Strona osobista", "account_edit.field_edit_modal.name_hint": "Np. Strona osobista",
"account_edit.field_edit_modal.name_label": "Etykieta", "account_edit.field_edit_modal.name_label": "Etykieta",
"account_edit.field_edit_modal.value_hint": "Np. \"https://example.me\"", "account_edit.field_edit_modal.value_hint": "Np. \"https://example.me\"",
"account_edit.field_edit_modal.value_label": "Wartość", "account_edit.field_edit_modal.value_label": "Wartość",
"account_edit.field_reorder_modal.handle_label": "Przeciągnij pole \"{item}\"", "account_edit.field_reorder_modal.handle_label": "Przeciągnij pole \"{item}\"",
"account_edit.image_alt_modal.add_title": "Dodaj tekst alternatywny", "account_edit.image_alt_modal.add_title": "Dodaj tekst alternatywny",
"account_edit.image_alt_modal.details_title": "Wskazówki: Tekst alternatywny dla zdjęć profilowych",
"account_edit.image_alt_modal.edit_title": "Edytuj tekst alternatywny", "account_edit.image_alt_modal.edit_title": "Edytuj tekst alternatywny",
"account_edit.image_alt_modal.text_hint": "Tekst alternatywny pomaga użytkownikom czytników ekranu zrozumieć twoją treść.", "account_edit.image_alt_modal.text_hint": "Tekst alternatywny pomaga użytkownikom czytników ekranu zrozumieć twoją treść.",
"account_edit.image_alt_modal.text_label": "Tekst alternatywny", "account_edit.image_alt_modal.text_label": "Tekst alternatywny",
"account_edit.image_delete_modal.confirm": "Czy na pewno chcesz usunąć ten obraz? Tej czynności nie można cofnąć.",
"account_edit.image_delete_modal.delete_button": "Usuń", "account_edit.image_delete_modal.delete_button": "Usuń",
"account_edit.image_delete_modal.title": "Usunąć obraz?", "account_edit.image_delete_modal.title": "Usunąć obraz?",
"account_edit.image_edit.add_button": "Dodaj obraz", "account_edit.image_edit.add_button": "Dodaj obraz",
@@ -232,7 +235,9 @@
"account_edit.verified_modal.title": "Jak dodać zweryfikowany link", "account_edit.verified_modal.title": "Jak dodać zweryfikowany link",
"account_edit_tags.add_tag": "Dodaj #{tagName}", "account_edit_tags.add_tag": "Dodaj #{tagName}",
"account_edit_tags.column_title": "Edytuj tagi", "account_edit_tags.column_title": "Edytuj tagi",
"account_edit_tags.max_tags_reached": "Osiągnięto maksymalną liczbę wyróżnionych hasztagów.",
"account_edit_tags.search_placeholder": "Dodaj hashtag...", "account_edit_tags.search_placeholder": "Dodaj hashtag...",
"account_edit_tags.suggestions": "Propozycje:",
"account_list.hidden_notice": "To jest widoczne tylko dla Ciebie. Aby pokazać tę listę innym, przejdź do <link>{page} > {modal} > {field}</link>.", "account_list.hidden_notice": "To jest widoczne tylko dla Ciebie. Aby pokazać tę listę innym, przejdź do <link>{page} > {modal} > {field}</link>.",
"admin.dashboard.daily_retention": "Wskaźnik utrzymania użytkowników według dni od rejestracji", "admin.dashboard.daily_retention": "Wskaźnik utrzymania użytkowników według dni od rejestracji",
"admin.dashboard.monthly_retention": "Wskaźnik utrzymania użytkowników według miesięcy od rejestracji", "admin.dashboard.monthly_retention": "Wskaźnik utrzymania użytkowników według miesięcy od rejestracji",
@@ -243,6 +248,7 @@
"admin.impact_report.instance_followers": "Obserwujący, których straciliby nasi użytkownicy", "admin.impact_report.instance_followers": "Obserwujący, których straciliby nasi użytkownicy",
"admin.impact_report.instance_follows": "Obserwujący, których straciliby ich użytkownicy", "admin.impact_report.instance_follows": "Obserwujący, których straciliby ich użytkownicy",
"admin.impact_report.title": "Podsumowanie zmian", "admin.impact_report.title": "Podsumowanie zmian",
"alert.need_reload.message": "Mastodon został zaktualizowany. Niektóre rzeczy mogą nie działać poprawnie, dopóki nie odświeżysz strony.",
"alert.rate_limited.message": "Spróbuj ponownie po {retry_time, time, medium}.", "alert.rate_limited.message": "Spróbuj ponownie po {retry_time, time, medium}.",
"alert.rate_limited.title": "Ograniczenie liczby zapytań", "alert.rate_limited.title": "Ograniczenie liczby zapytań",
"alert.unexpected.message": "Wystąpił nieoczekiwany błąd.", "alert.unexpected.message": "Wystąpił nieoczekiwany błąd.",
@@ -326,14 +332,25 @@
"closed_registrations_modal.title": "Rejestracja na Mastodonie", "closed_registrations_modal.title": "Rejestracja na Mastodonie",
"collection.share_modal.share_link_label": "Udostępnij link", "collection.share_modal.share_link_label": "Udostępnij link",
"collection.share_modal.share_via_system": "Udostępnij…", "collection.share_modal.share_via_system": "Udostępnij…",
"collection.share_modal.title": "Udostępnij kolekcję",
"collection.share_modal.title_new": "Udostępnij swoją nową kolekcję!", "collection.share_modal.title_new": "Udostępnij swoją nową kolekcję!",
"collection.share_template_own": "Sprawdź moją nową kolekcję:", "collection.share_template_own": "Sprawdź moją nową kolekcję:",
"collections.accounts.empty_description": "Dodaj maksymalnie {count} użytkowników",
"collections.accounts.empty_editor_title": "W tej kolekcji nie ma jeszcze nikogo",
"collections.accounts.empty_title": "Ta kolekcja jest pusta",
"collections.add_to_collection": "Dodaj {name} do kolekcji",
"collections.by_account": "przez {account_handle}",
"collections.collection_description": "Opis", "collections.collection_description": "Opis",
"collections.collection_language": "Język", "collections.collection_language": "Język",
"collections.collection_language_none": "Brak",
"collections.collection_name": "Nazwa", "collections.collection_name": "Nazwa",
"collections.collection_topic": "Temat",
"collections.confirm_account_removal": "Czy na pewno chcesz usunąć to konto z tej kolekcji?",
"collections.content_warning": "Ostrzeżenie o zawartości", "collections.content_warning": "Ostrzeżenie o zawartości",
"collections.continue": "Kontynuuj", "collections.continue": "Kontynuuj",
"collections.copy_link": "Skopiuj link", "collections.copy_link": "Skopiuj link",
"collections.copy_link_confirmation": "Skopiowano link kolekcji do schowka",
"collections.create.accounts_title": "Kogo umieścisz w tej kolekcji?",
"collections.create.basic_details_title": "Podstawowe informacje", "collections.create.basic_details_title": "Podstawowe informacje",
"collections.create.steps": "Krok {step}/{total}", "collections.create.steps": "Krok {step}/{total}",
"collections.create_collection": "Utwórz kolekcję", "collections.create_collection": "Utwórz kolekcję",
@@ -343,23 +360,42 @@
"collections.detail.revoke_inclusion": "Usuń mnie", "collections.detail.revoke_inclusion": "Usuń mnie",
"collections.detail.sensitive_content": "Wrażliwa zawartość", "collections.detail.sensitive_content": "Wrażliwa zawartość",
"collections.detail.share": "Udostępnij tę kolekcję", "collections.detail.share": "Udostępnij tę kolekcję",
"collections.detail.you_are_in_this_collection": "Jesteś wyróżniony w tej kolekcji",
"collections.edit_details": "Edytuj szczegóły", "collections.edit_details": "Edytuj szczegóły",
"collections.last_updated_at": "Ostatnia aktualizacja: {date}", "collections.last_updated_at": "Ostatnia aktualizacja: {date}",
"collections.list.created_by_author": "Utworzone przez {name}", "collections.list.created_by_author": "Utworzone przez {name}",
"collections.list.created_by_you": "Stworzone przez Ciebie", "collections.list.created_by_you": "Stworzone przez Ciebie",
"collections.list.featuring_you": "Zawierające Ciebie", "collections.list.featuring_you": "Zawierające Ciebie",
"collections.manage_accounts": "Zarządzanie kontami",
"collections.mark_as_sensitive": "Oznacz jako wrażliwe", "collections.mark_as_sensitive": "Oznacz jako wrażliwe",
"collections.mark_as_sensitive_hint": "Ukrywa opis kolekcji i konta za ostrzeżeniem o zawartości. Nazwa kolekcji pozostanie widoczna.",
"collections.maximum_collection_count_description": "Twój serwer pozwala na tworzenie do {count} kolekcji.", "collections.maximum_collection_count_description": "Twój serwer pozwala na tworzenie do {count} kolekcji.",
"collections.name_length_hint": "Limit 40 znaków", "collections.name_length_hint": "Limit 40 znaków",
"collections.new_collection": "Nowa kolekcja", "collections.new_collection": "Nowa kolekcja",
"collections.remove_account": "Usuń", "collections.remove_account": "Usuń",
"collections.report_collection": "Zgłoś tę kolekcję", "collections.report_collection": "Zgłoś tę kolekcję",
"collections.revoke_collection_inclusion": "Usuń się z tej kolekcji",
"collections.revoke_inclusion.confirmation": "Zostałeś(aś) usunięty(a) z \"{collection}\"", "collections.revoke_inclusion.confirmation": "Zostałeś(aś) usunięty(a) z \"{collection}\"",
"collections.revoke_inclusion.error": "Wystąpił błąd, proszę spróbować ponownie później.", "collections.revoke_inclusion.error": "Wystąpił błąd, proszę spróbować ponownie później.",
"collections.search_accounts_label": "Wyszukaj konto do dodania",
"collections.search_accounts_max_reached": "Przekroczono maksymalną liczbę dodanych użytkowników", "collections.search_accounts_max_reached": "Przekroczono maksymalną liczbę dodanych użytkowników",
"collections.share_short": "Udostępnij", "collections.share_short": "Udostępnij",
"collections.sort_alphabetical": "Alfabetycznie",
"collections.sort_by": "Sortuj według:",
"collections.sort_date_added": "Data dodania",
"collections.sort_last_active": "Ostatnia aktywność",
"collections.sort_most_followers": "Najwięcej obserwujących",
"collections.suggestions.can_not_add": "Nie można dodać", "collections.suggestions.can_not_add": "Nie można dodać",
"collections.suggestions.can_not_add_desc": "Te konta mogły zrezygnować z funkcji odkrywania albo znajdują się na serwerze, który nie obsługuje kolekcji.", "collections.suggestions.can_not_add_desc": "Te konta mogły zrezygnować z funkcji odkrywania albo znajdują się na serwerze, który nie obsługuje kolekcji.",
"collections.suggestions.must_follow": "Musisz najpierw obserwować",
"collections.topic_hint": "Dodaj hasztag, który pomoże innym zrozumieć główny temat tej kolekcji.",
"collections.topic_special_chars_hint": "Znaki specjalne zostaną usunięte podczas zapisywania",
"collections.view_collection": "Pokaż kolekcję",
"collections.visibility_public": "Publiczna",
"collections.visibility_public_hint": "Widoczna w wynikach wyszukiwania i innych miejscach, gdzie pojawiają się rekomendacje.",
"collections.visibility_title": "Widoczność",
"collections.visibility_unlisted": "Niewidoczna",
"collections.visibility_unlisted_hint": "Widoczna dla każdego, kto ma link. Ukryta w wynikach wyszukiwania i rekomendacjach.",
"column.about": "O serwerze", "column.about": "O serwerze",
"column.blocks": "Zablokowani", "column.blocks": "Zablokowani",
"column.bookmarks": "Zakładki", "column.bookmarks": "Zakładki",
@@ -426,6 +462,7 @@
"confirmations.delete.message": "Czy na pewno chcesz usunąć ten wpis?", "confirmations.delete.message": "Czy na pewno chcesz usunąć ten wpis?",
"confirmations.delete.title": "Usunąć wpis?", "confirmations.delete.title": "Usunąć wpis?",
"confirmations.delete_collection.confirm": "Usuń", "confirmations.delete_collection.confirm": "Usuń",
"confirmations.delete_collection.title": "Usunąć „{name}\"?",
"confirmations.delete_list.confirm": "Usuń", "confirmations.delete_list.confirm": "Usuń",
"confirmations.delete_list.message": "Czy na pewno chcesz trwale usunąć tę listę?", "confirmations.delete_list.message": "Czy na pewno chcesz trwale usunąć tę listę?",
"confirmations.delete_list.title": "Usunąć listę?", "confirmations.delete_list.title": "Usunąć listę?",
@@ -441,6 +478,7 @@
"confirmations.follow_to_list.confirm": "Obserwuj i dodaj do listy", "confirmations.follow_to_list.confirm": "Obserwuj i dodaj do listy",
"confirmations.follow_to_list.message": "Musisz obserwować {name}, aby dodać do listy.", "confirmations.follow_to_list.message": "Musisz obserwować {name}, aby dodać do listy.",
"confirmations.follow_to_list.title": "Zaobserwować?", "confirmations.follow_to_list.title": "Zaobserwować?",
"confirmations.hide_featured_tab.confirm": "Ukryj zakładkę",
"confirmations.hide_featured_tab.title": "Ukryć zakładkę \"Wyróżnione\"?", "confirmations.hide_featured_tab.title": "Ukryć zakładkę \"Wyróżnione\"?",
"confirmations.logout.confirm": "Wyloguj", "confirmations.logout.confirm": "Wyloguj",
"confirmations.logout.message": "Czy na pewno chcesz się wylogować?", "confirmations.logout.message": "Czy na pewno chcesz się wylogować?",
@@ -531,6 +569,7 @@
"emoji_button.travel": "Podróże i miejsca", "emoji_button.travel": "Podróże i miejsca",
"empty_column.account_featured_self.no_collections_button": "Stwórz kolekcję", "empty_column.account_featured_self.no_collections_button": "Stwórz kolekcję",
"empty_column.account_featured_self.showcase_accounts": "Pokaż swoje ulubione konta", "empty_column.account_featured_self.showcase_accounts": "Pokaż swoje ulubione konta",
"empty_column.account_featured_self.showcase_accounts_desc": "Kolekcje to wyselekcjonowane listy kont, które pomagają innym odkrywać więcej zakątków Fediwersum.",
"empty_column.account_hides_collections": "Ta osoba postanowiła nie udostępniać tych informacji", "empty_column.account_hides_collections": "Ta osoba postanowiła nie udostępniać tych informacji",
"empty_column.account_suspended": "Konto zawieszone", "empty_column.account_suspended": "Konto zawieszone",
"empty_column.account_timeline": "Brak wpisów!", "empty_column.account_timeline": "Brak wpisów!",
@@ -625,6 +664,7 @@
"footer.source_code": "Zobacz kod źródłowy", "footer.source_code": "Zobacz kod źródłowy",
"footer.status": "Status", "footer.status": "Status",
"footer.terms_of_service": "Regulamin", "footer.terms_of_service": "Regulamin",
"form_field.optional": "(opcjonalnie)",
"getting_started.heading": "Pierwsze kroki", "getting_started.heading": "Pierwsze kroki",
"hashtag.admin_moderation": "Otwórz interfejs moderacji #{name}", "hashtag.admin_moderation": "Otwórz interfejs moderacji #{name}",
"hashtag.browse": "Przeglądaj posty z #{hashtag}", "hashtag.browse": "Przeglądaj posty z #{hashtag}",
@@ -724,6 +764,8 @@
"keyboard_shortcuts.toggle_hidden": "Pokaż lub ukryj tekst z ostrzeżeniem", "keyboard_shortcuts.toggle_hidden": "Pokaż lub ukryj tekst z ostrzeżeniem",
"keyboard_shortcuts.toggle_sensitivity": "Pokaż lub ukryj multimedia", "keyboard_shortcuts.toggle_sensitivity": "Pokaż lub ukryj multimedia",
"keyboard_shortcuts.toot": "Stwórz nowy wpis", "keyboard_shortcuts.toot": "Stwórz nowy wpis",
"keyboard_shortcuts.top": "Przenieś na górę listy",
"keyboard_shortcuts.translate": "Przetłumacz wpis",
"keyboard_shortcuts.unfocus": "Opuść pole tekstowe", "keyboard_shortcuts.unfocus": "Opuść pole tekstowe",
"keyboard_shortcuts.up": "Przesuń w górę na liście", "keyboard_shortcuts.up": "Przesuń w górę na liście",
"learn_more_link.got_it": "Rozumiem", "learn_more_link.got_it": "Rozumiem",
@@ -734,6 +776,7 @@
"lightbox.zoom_in": "Powiększ do rzeczywistego rozmiaru", "lightbox.zoom_in": "Powiększ do rzeczywistego rozmiaru",
"lightbox.zoom_out": "Powiększ, aby dopasować", "lightbox.zoom_out": "Powiększ, aby dopasować",
"limited_account_hint.action": "Pokaż profil mimo to", "limited_account_hint.action": "Pokaż profil mimo to",
"limited_account_hint.title": "Ten profil lub serwer został ukryty przez moderatorów {domain}.",
"link_preview.author": "{name}", "link_preview.author": "{name}",
"link_preview.more_from_author": "Więcej od {name}", "link_preview.more_from_author": "Więcej od {name}",
"link_preview.shares": "{count, plural, one {{counter} wpis} few {{counter} wpisy} many {{counter} wpisów} other {{counter} wpisów}}", "link_preview.shares": "{count, plural, one {{counter} wpis} few {{counter} wpisy} many {{counter} wpisów} other {{counter} wpisów}}",
@@ -1127,9 +1170,11 @@
"status.quote": "Cytuj", "status.quote": "Cytuj",
"status.quote.cancel": "Anuluj cytat", "status.quote.cancel": "Anuluj cytat",
"status.quote_error.blocked_account_hint.title": "Ten wpis jest ukryty, ponieważ zablokowałeś(aś) @{name}.", "status.quote_error.blocked_account_hint.title": "Ten wpis jest ukryty, ponieważ zablokowałeś(aś) @{name}.",
"status.quote_error.blocked_domain_hint.title": "Ten wpis jest ukryty, ponieważ zablokowano {domain}.",
"status.quote_error.filtered": "Ukryte z powodu jednego z Twoich filtrów", "status.quote_error.filtered": "Ukryte z powodu jednego z Twoich filtrów",
"status.quote_error.limited_account_hint.action": "Pokaż mimo wszystko", "status.quote_error.limited_account_hint.action": "Pokaż mimo wszystko",
"status.quote_error.limited_account_hint.title": "To konto zostało ukryte przez moderatorów {domain}.", "status.quote_error.limited_account_hint.title": "To konto zostało ukryte przez moderatorów {domain}.",
"status.quote_error.muted_account_hint.title": "Ten wpis jest ukryty, ponieważ wyciszono @{name}.",
"status.quote_error.not_available": "Post niedostępny", "status.quote_error.not_available": "Post niedostępny",
"status.quote_error.pending_approval": "Post oczekujący", "status.quote_error.pending_approval": "Post oczekujący",
"status.quote_error.pending_approval_popout.body": "Na Mastodon możesz kontrolować, czy ktoś może cytować twoje wpisy. Ten wpis oczekuje na zatwierdzenie przez autora.", "status.quote_error.pending_approval_popout.body": "Na Mastodon możesz kontrolować, czy ktoś może cytować twoje wpisy. Ten wpis oczekuje na zatwierdzenie przez autora.",
@@ -1180,6 +1225,7 @@
"tabs_bar.menu": "Menu", "tabs_bar.menu": "Menu",
"tabs_bar.notifications": "Powiadomienia", "tabs_bar.notifications": "Powiadomienia",
"tabs_bar.publish": "Nowy post", "tabs_bar.publish": "Nowy post",
"tabs_bar.quick_links": "Szybki dostęp",
"tabs_bar.search": "Szukaj", "tabs_bar.search": "Szukaj",
"tag.remove": "Usuń", "tag.remove": "Usuń",
"terms_of_service.effective_as_of": "Obowiązuje od {date}", "terms_of_service.effective_as_of": "Obowiązuje od {date}",
@@ -1225,6 +1271,7 @@
"video.volume_down": "Zmniejsz głośność", "video.volume_down": "Zmniejsz głośność",
"video.volume_up": "Zwiększ głośność", "video.volume_up": "Zwiększ głośność",
"visibility_modal.button_title": "Ustaw widoczność", "visibility_modal.button_title": "Ustaw widoczność",
"visibility_modal.direct_quote_warning.text": "Jeśli zapiszesz bieżące ustawienia, osadzony cytat zostanie zamieniony na link.",
"visibility_modal.direct_quote_warning.title": "Cytaty nie mogą być osadzane we wzmiankach prywatnych", "visibility_modal.direct_quote_warning.title": "Cytaty nie mogą być osadzane we wzmiankach prywatnych",
"visibility_modal.header": "Widoczność i interakcja", "visibility_modal.header": "Widoczność i interakcja",
"visibility_modal.helper.direct_quoting": "Prywatne wzmianki opublikowane na Mastodonie nie mogą być cytowane przez inne osoby.", "visibility_modal.helper.direct_quoting": "Prywatne wzmianki opublikowane na Mastodonie nie mogą być cytowane przez inne osoby.",
@@ -267,6 +267,7 @@
"admin.impact_report.instance_followers": "Seguidores que os nossos usuários perderiam", "admin.impact_report.instance_followers": "Seguidores que os nossos usuários perderiam",
"admin.impact_report.instance_follows": "Seguidores que os usuários deles perderiam", "admin.impact_report.instance_follows": "Seguidores que os usuários deles perderiam",
"admin.impact_report.title": "Resumo do impacto", "admin.impact_report.title": "Resumo do impacto",
"alert.need_reload.message": "O Mastodon foi atualizado. Algumas coisas podem não funcionar corretamente até você recarregar a página.",
"alert.rate_limited.message": "Tente novamente após {retry_time, time, medium}.", "alert.rate_limited.message": "Tente novamente após {retry_time, time, medium}.",
"alert.rate_limited.title": "Tentativas limitadas", "alert.rate_limited.title": "Tentativas limitadas",
"alert.unexpected.message": "Ocorreu um erro inesperado.", "alert.unexpected.message": "Ocorreu um erro inesperado.",
+1
View File
@@ -267,6 +267,7 @@
"admin.impact_report.instance_followers": "Följare som våra användare skulle förlora", "admin.impact_report.instance_followers": "Följare som våra användare skulle förlora",
"admin.impact_report.instance_follows": "Följare som deras användare skulle förlora", "admin.impact_report.instance_follows": "Följare som deras användare skulle förlora",
"admin.impact_report.title": "Sammanfattning av påverkan", "admin.impact_report.title": "Sammanfattning av påverkan",
"alert.need_reload.message": "Mastodon har uppdaterats. Vissa saker kanske inte fungerar korrekt förrän du laddar om sidan.",
"alert.rate_limited.message": "Vänligen försök igen efter {retry_time, time, medium}.", "alert.rate_limited.message": "Vänligen försök igen efter {retry_time, time, medium}.",
"alert.rate_limited.title": "Hastighetsbegränsad", "alert.rate_limited.title": "Hastighetsbegränsad",
"alert.unexpected.message": "Ett oväntat fel uppstod.", "alert.unexpected.message": "Ett oväntat fel uppstod.",
+1
View File
@@ -267,6 +267,7 @@
"admin.impact_report.instance_followers": "Kullanıcılarımızın kaybedeceği takipçiler", "admin.impact_report.instance_followers": "Kullanıcılarımızın kaybedeceği takipçiler",
"admin.impact_report.instance_follows": "Kullanıcılarının kaybedeceği takipçiler", "admin.impact_report.instance_follows": "Kullanıcılarının kaybedeceği takipçiler",
"admin.impact_report.title": "Etki özeti", "admin.impact_report.title": "Etki özeti",
"alert.need_reload.message": "Mastodon güncellendi. Siz sayfayı yenileyene kadar bazı şeyler çalışmayabilir.",
"alert.rate_limited.message": "Lütfen sonra tekrar deneyin {retry_time, time, medium}.", "alert.rate_limited.message": "Lütfen sonra tekrar deneyin {retry_time, time, medium}.",
"alert.rate_limited.title": "Aşırı istek gönderildi", "alert.rate_limited.title": "Aşırı istek gönderildi",
"alert.unexpected.message": "Beklenmedik bir hata oluştu.", "alert.unexpected.message": "Beklenmedik bir hata oluştu.",
@@ -267,6 +267,7 @@
"admin.impact_report.instance_followers": "本站用户即将丢失的关注者", "admin.impact_report.instance_followers": "本站用户即将丢失的关注者",
"admin.impact_report.instance_follows": "对方站点用户即将丢失的关注者", "admin.impact_report.instance_follows": "对方站点用户即将丢失的关注者",
"admin.impact_report.title": "影响摘要", "admin.impact_report.title": "影响摘要",
"alert.need_reload.message": "Mastodon 已更新。在你刷新页面之前,部分功能可能无法正常工作。",
"alert.rate_limited.message": "请在 {retry_time, time, medium} 后重试。", "alert.rate_limited.message": "请在 {retry_time, time, medium} 后重试。",
"alert.rate_limited.title": "频率受限", "alert.rate_limited.title": "频率受限",
"alert.unexpected.message": "发生了意外错误。", "alert.unexpected.message": "发生了意外错误。",
@@ -267,6 +267,7 @@
"admin.impact_report.instance_followers": "此伺服器之跟隨者將流失", "admin.impact_report.instance_followers": "此伺服器之跟隨者將流失",
"admin.impact_report.instance_follows": "彼伺服器之跟隨者將流失", "admin.impact_report.instance_follows": "彼伺服器之跟隨者將流失",
"admin.impact_report.title": "影響總結", "admin.impact_report.title": "影響總結",
"alert.need_reload.message": "Mastodon 已完成更新。某些功能可能暫時無法使用,直至您重新整理此頁面。",
"alert.rate_limited.message": "請於 {retry_time, time, medium} 後重試。", "alert.rate_limited.message": "請於 {retry_time, time, medium} 後重試。",
"alert.rate_limited.title": "已限速", "alert.rate_limited.title": "已限速",
"alert.unexpected.message": "發生非預期的錯誤。", "alert.unexpected.message": "發生非預期的錯誤。",
+1 -1
View File
@@ -47,7 +47,7 @@ export interface StatusShape {
pinned: boolean; pinned: boolean;
filtered: FilterResult[]; filtered: FilterResult[];
sensitive: boolean; sensitive: boolean;
collapsed: boolean; collapsed: boolean | null;
uri: string; uri: string;
url: string | null; url: string | null;
+4 -10
View File
@@ -731,10 +731,12 @@ table + p {
} }
.email-banner-td { .email-banner-td {
padding: 24px 24px 14px; padding: 24px;
} }
.email-banner-text-td { .email-banner-text-td {
text-align: center;
p { p {
margin: 0 0 12px; margin: 0 0 12px;
color: #fff; color: #fff;
@@ -743,12 +745,9 @@ table + p {
line-height: 16.8px; line-height: 16.8px;
} }
.email-desktop-flex {
align-items: center;
}
.email-btn-table { .email-btn-table {
background-color: #fff; background-color: #fff;
margin: 0 auto;
} }
.email-btn-td { .email-btn-td {
@@ -760,11 +759,6 @@ table + p {
padding-left: 10px; padding-left: 10px;
padding-right: 10px; padding-right: 10px;
} }
div + div {
margin-inline-start: auto;
margin-bottom: 12px;
}
} }
// Checklist item // Checklist item
+9 -14
View File
@@ -372,7 +372,7 @@
} }
} }
body > [data-popper-placement] { body > [data-popover-placement] {
z-index: 9999; z-index: 9999;
} }
@@ -4091,9 +4091,8 @@ a.account__display-name {
align-items: center; align-items: center;
gap: 8px; gap: 8px;
width: 100%; width: 100%;
padding: 10px; padding: 12px;
padding-inline-start: 14px; padding-inline-start: 16px;
overflow: hidden;
font-size: 16px; font-size: 16px;
font-weight: 400; font-weight: 400;
text-decoration: none; text-decoration: none;
@@ -4104,7 +4103,7 @@ a.account__display-name {
var(--color-text-secondary) var(--color-text-secondary)
); );
background: transparent; background: transparent;
border: 2px solid transparent; border: none;
border-radius: 4px; border-radius: 4px;
&:hover, &:hover,
@@ -4118,14 +4117,14 @@ a.account__display-name {
} }
&:focus-visible { &:focus-visible {
outline: none; outline: var(--outline-focus-default);
border-color: var(--color-border-brand); outline-offset: -2px;
background: var(--color-bg-brand-softest); background: var(--color-bg-brand-softest);
} }
&--logo { &--logo {
padding: 8px; padding: 10px;
padding-inline-start: 12px; padding-inline-start: 14px;
} }
} }
@@ -5772,10 +5771,6 @@ a.status-card {
} }
.visibility-dropdown { .visibility-dropdown {
&__overlay[data-popper-placement] {
z-index: 9999;
}
&.disabled { &.disabled {
opacity: 0.6; opacity: 0.6;
cursor: default; cursor: default;
@@ -10715,7 +10710,7 @@ noscript {
} }
} }
.hover-card-controller[data-popper-reference-hidden='true'] { .hover-card-controller[data-popover-reference-hidden='true'] {
opacity: 0; opacity: 0;
pointer-events: none; pointer-events: none;
} }
+1 -1
View File
@@ -24,7 +24,7 @@ class Multibase
case string[0] case string[0]
when 'u' when 'u'
Base64.decode(string[1...]) Base64.urlsafe_decode64(string[1...])
when 'z' when 'z'
Base58.base58_to_binary(string[1...], :bitcoin) Base58.base58_to_binary(string[1...], :bitcoin)
else else
@@ -19,17 +19,8 @@
%table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' } %table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' }
%tr %tr
%td.email-banner-text-td %td.email-banner-text-td
.email-desktop-flex %p= t('.interact_with_this_post', count: @statuses.size)
/[if mso] = render 'application/mailer/button', text: t('.create_account'), url: available_sign_up_url, has_arrow: false
<table border="0" cellpadding="0" cellspacing="0" align="center" style="width:100%;" role="presentation"><tr><td vertical-align:top;">
%div
%p= t('.interact_with_this_post', count: @statuses.size)
/[if mso]
</td><td style="vertical-align:top;">
%div
= render 'application/mailer/button', text: t('.create_account'), url: available_sign_up_url, has_arrow: false
/[if mso]
</td></tr></table>
- content_for :footer do - content_for :footer do
%p.email-footer-p= t('.footer.reason_for_email_html', name: display_name(@subscription.account), unsubscribe_path: @unsubscribe_url) %p.email-footer-p= t('.footer.reason_for_email_html', name: display_name(@subscription.account), unsubscribe_path: @unsubscribe_url)
+1 -1
View File
@@ -6,4 +6,4 @@
per_page: number of items to fetch per page per_page: number of items to fetch per page
remote: data-remote remote: data-remote
%span.page.gap %span.page.gap
!= t('pagination.truncate') = t('pagination.truncate_html')
@@ -9,7 +9,9 @@
- if status.ordered_media_attachments.size.positive? - if status.ordered_media_attachments.size.positive?
%p.email-status-media %p.email-status-media
- status.ordered_media_attachments.each do |a| - status.ordered_media_attachments.each do |a|
- if status.local? - if a.image? && !a.needs_redownload?
%img{ src: full_asset_url(a.file.url(:original)), alt: a.description }
- elsif status.local?
= link_to full_asset_url(a.file.url(:original)), full_asset_url(a.file.url(:original)) = link_to full_asset_url(a.file.url(:original)), full_asset_url(a.file.url(:original))
- else - else
= link_to a.remote_url, a.remote_url = link_to a.remote_url, a.remote_url
@@ -5,7 +5,7 @@
%p.hint= t('otp_authentication.instructions_html') %p.hint= t('otp_authentication.instructions_html')
.qr-wrapper .qr-wrapper
.qr-code!= @qrcode.as_svg(padding: 0, module_size: 4, use_path: true) .qr-code= inline_qrcode_svg(@qrcode)
.qr-alternative .qr-alternative
%p.hint= t('otp_authentication.manual_instructions') %p.hint= t('otp_authentication.manual_instructions')
-1
View File
@@ -1252,7 +1252,6 @@ an:
next: Proximo next: Proximo
older: Mas antigo older: Mas antigo
prev: Anterior prev: Anterior
truncate: "&hellip;"
polls: polls:
errors: errors:
already_voted: Ya has votau en esta enqüesta already_voted: Ya has votau en esta enqüesta
-1
View File
@@ -1894,7 +1894,6 @@ ar:
next: التالي next: التالي
older: الأقدَم older: الأقدَم
prev: السابق prev: السابق
truncate: و
polls: polls:
errors: errors:
already_voted: لقد قمت بالتصويت على استطلاع الرأي هذا مِن قبل already_voted: لقد قمت بالتصويت على استطلاع الرأي هذا مِن قبل
-1
View File
@@ -690,7 +690,6 @@ ast:
wrong_code: "¡El códigu introducíu nun yera válidu! ¿La hora del sirvidor y la del preséu son correutes?" wrong_code: "¡El códigu introducíu nun yera válidu! ¿La hora del sirvidor y la del preséu son correutes?"
pagination: pagination:
next: Siguiente next: Siguiente
truncate: "&hellip;"
polls: polls:
errors: errors:
already_voted: Yá votesti nesta encuesta already_voted: Yá votesti nesta encuesta
-1
View File
@@ -2025,7 +2025,6 @@ be:
next: Далей next: Далей
older: Старэйшае older: Старэйшае
prev: Папярэдні prev: Папярэдні
truncate: "&hellip;"
polls: polls:
errors: errors:
already_voted: Вы ўжо прагаласавалі ў апытанні already_voted: Вы ўжо прагаласавалі ў апытанні
-1
View File
@@ -1698,7 +1698,6 @@ bg:
next: Напред next: Напред
older: По-старо older: По-старо
prev: Назад prev: Назад
truncate: "&hellip;"
polls: polls:
errors: errors:
already_voted: Вече сте гласували в тази анкета already_voted: Вече сте гласували в тази анкета
-1
View File
@@ -723,7 +723,6 @@ br:
next: Da-heul next: Da-heul
older: Koshoc'h older: Koshoc'h
prev: A-raok prev: A-raok
truncate: "&hellip;"
polls: polls:
errors: errors:
self_vote: N'hallit ket votiñ en ho sontadegoù deoc'h-c'hwi self_vote: N'hallit ket votiñ en ho sontadegoù deoc'h-c'hwi
-1
View File
@@ -1723,7 +1723,6 @@ ca:
next: Endavant next: Endavant
older: Més vell older: Més vell
prev: Enrere prev: Enrere
truncate: "&hellip;"
polls: polls:
errors: errors:
already_voted: Ja has votat en aquesta enquesta already_voted: Ja has votat en aquesta enquesta
-1
View File
@@ -793,7 +793,6 @@ co:
next: Dopu next: Dopu
older: Più vechju older: Più vechju
prev: Nanzu prev: Nanzu
truncate: "&hellip;"
polls: polls:
errors: errors:
already_voted: Avete digià vutatu nant'à stu scandagliu already_voted: Avete digià vutatu nant'à stu scandagliu
-1
View File
@@ -1864,7 +1864,6 @@ cs:
next: Další next: Další
older: Starší older: Starší
prev: Předchozí prev: Předchozí
truncate: "&hellip;"
polls: polls:
errors: errors:
already_voted: V této anketě jste již hlasovali already_voted: V této anketě jste již hlasovali
+2 -1
View File
@@ -782,6 +782,8 @@ cy:
new: new:
title: Creu rheol IP newydd title: Creu rheol IP newydd
no_ip_block_selected: Heb newid unrhyw reolau IP gan na ddewiswyd yr un ohonyn nhw no_ip_block_selected: Heb newid unrhyw reolau IP gan na ddewiswyd yr un ohonyn nhw
reset: Ailosod
search: Chwilio
title: Rheolau IP title: Rheolau IP
relationships: relationships:
title: Perthnasau %{acct} title: Perthnasau %{acct}
@@ -2113,7 +2115,6 @@ cy:
next: Nesaf next: Nesaf
older: Hŷn older: Hŷn
prev: Blaenorol prev: Blaenorol
truncate: "&hellip;"
polls: polls:
errors: errors:
already_voted: Rydych chi eisoes wedi pleidleisio ar yr arolwg hwn already_voted: Rydych chi eisoes wedi pleidleisio ar yr arolwg hwn
-1
View File
@@ -1935,7 +1935,6 @@ da:
next: Næste next: Næste
older: Ældre older: Ældre
prev: Foregående prev: Foregående
truncate: "&hellip;"
polls: polls:
errors: errors:
already_voted: Du har allerede stemt i denne afstemning already_voted: Du har allerede stemt i denne afstemning
-1
View File
@@ -1936,7 +1936,6 @@ de:
next: Weiter next: Weiter
older: Älter older: Älter
prev: Zurück prev: Zurück
truncate: "&hellip;"
polls: polls:
errors: errors:
already_voted: An dieser Umfrage hast du bereits teilgenommen already_voted: An dieser Umfrage hast du bereits teilgenommen
-1
View File
@@ -1935,7 +1935,6 @@ el:
next: Επόμενη next: Επόμενη
older: Παλαιότερες older: Παλαιότερες
prev: Προηγούμενη prev: Προηγούμενη
truncate: "&hellip;"
polls: polls:
errors: errors:
already_voted: Έχετε ήδη ψηφίσει σε αυτή τη δημοσκόπηση already_voted: Έχετε ήδη ψηφίσει σε αυτή τη δημοσκόπηση
-1
View File
@@ -1794,7 +1794,6 @@ en-GB:
next: Next next: Next
older: Older older: Older
prev: Prev prev: Prev
truncate: "&hellip;"
polls: polls:
errors: errors:
already_voted: You have already voted on this poll already_voted: You have already voted on this poll
+1 -1
View File
@@ -1936,7 +1936,7 @@ en:
next: Next next: Next
older: Older older: Older
prev: Prev prev: Prev
truncate: "&hellip;" truncate_html: "&hellip;"
polls: polls:
errors: errors:
already_voted: You have already voted on this poll already_voted: You have already voted on this poll
-1
View File
@@ -1692,7 +1692,6 @@ eo:
next: Sekva next: Sekva
older: Malpli nova older: Malpli nova
prev: Antaŭa prev: Antaŭa
truncate: "&hellip;"
polls: polls:
errors: errors:
already_voted: Vi jam voĉdonis al ĉi tiu enketa already_voted: Vi jam voĉdonis al ĉi tiu enketa
-1
View File
@@ -1935,7 +1935,6 @@ es-AR:
next: Siguiente next: Siguiente
older: Más antiguos older: Más antiguos
prev: Anterior prev: Anterior
truncate: "&hellip;"
polls: polls:
errors: errors:
already_voted: Ya votaste en esta encuesta already_voted: Ya votaste en esta encuesta
-1
View File
@@ -1935,7 +1935,6 @@ es-MX:
next: Próximo next: Próximo
older: Más antiguo older: Más antiguo
prev: Anterior prev: Anterior
truncate: "&hellip;"
polls: polls:
errors: errors:
already_voted: Ya has votado en esta encuesta already_voted: Ya has votado en esta encuesta
+3 -1
View File
@@ -1689,6 +1689,9 @@ es:
bookmarks_html: bookmarks_html:
one: Estás a punto de <strong>reemplazar tus marcadores</strong> por <strong>%{count} publicación</strong> proveniente de <strong>%{filename}</strong>. one: Estás a punto de <strong>reemplazar tus marcadores</strong> por <strong>%{count} publicación</strong> proveniente de <strong>%{filename}</strong>.
other: Estás a punto de <strong>reemplazar tus marcadores</strong> por hasta <strong>%{count} publicaciones</strong> provenientes de <strong>%{filename}</strong>. other: Estás a punto de <strong>reemplazar tus marcadores</strong> por hasta <strong>%{count} publicaciones</strong> provenientes de <strong>%{filename}</strong>.
custom_filters_html:
one: Estás a punto de <strong>reemplazar tus filtros</strong> por el contenido de <strong>%{filename}</strong>. Se añadirá hasta <strong>%{count} filtro</strong> a los nuevos filtros.
other: Estás a punto de <strong>reemplazar tus filtros</strong> por el contenido de <strong>%{filename}</strong>. Se añadirán hasta <strong>%{count} filtros</strong> a los nuevos filtros.
domain_blocking_html: domain_blocking_html:
one: Estás a punto de <strong>reemplazar tu lista de bloqueos de dominio</strong> por <strong>%{count} dominio</strong> proveniente de <strong>%{filename}</strong>. one: Estás a punto de <strong>reemplazar tu lista de bloqueos de dominio</strong> por <strong>%{count} dominio</strong> proveniente de <strong>%{filename}</strong>.
other: Estás a punto de <strong>reemplazar tu lista de bloqueos de dominio</strong> por hasta <strong>%{count} dominios</strong> provenientes de <strong>%{filename}</strong>. other: Estás a punto de <strong>reemplazar tu lista de bloqueos de dominio</strong> por hasta <strong>%{count} dominios</strong> provenientes de <strong>%{filename}</strong>.
@@ -1934,7 +1937,6 @@ es:
next: Próximo next: Próximo
older: Más antiguo older: Más antiguo
prev: Anterior prev: Anterior
truncate: "&hellip;"
polls: polls:
errors: errors:
already_voted: Ya has votado en esta encuesta already_voted: Ya has votado en esta encuesta
-1
View File
@@ -1924,7 +1924,6 @@ et:
next: Järgmine next: Järgmine
older: Vanemad older: Vanemad
prev: Eelm prev: Eelm
truncate: "&hellip;"
polls: polls:
errors: errors:
already_voted: Oled siin hääletusel juba hääletanud already_voted: Oled siin hääletusel juba hääletanud
-1
View File
@@ -1639,7 +1639,6 @@ eu:
next: Hurrengoa next: Hurrengoa
older: Zaharragoa older: Zaharragoa
prev: Aurrekoa prev: Aurrekoa
truncate: "&hellip;"
polls: polls:
errors: errors:
already_voted: Inkesta honetan dagoeneko bozkatu duzu already_voted: Inkesta honetan dagoeneko bozkatu duzu
-1
View File
@@ -1851,7 +1851,6 @@ fa:
next: بعدی next: بعدی
older: قدیمی‌تر older: قدیمی‌تر
prev: قبلی prev: قبلی
truncate: "&hellip;"
polls: polls:
errors: errors:
already_voted: شما قبلاً در این نظرسنجی رأی داده‌اید already_voted: شما قبلاً در این نظرسنجی رأی داده‌اید
-1
View File
@@ -1919,7 +1919,6 @@ fi:
next: Seuraava next: Seuraava
older: Vanhemmat older: Vanhemmat
prev: Edellinen prev: Edellinen
truncate: "&hellip;"
polls: polls:
errors: errors:
already_voted: Olet jo osallistunut tähän äänestykseen already_voted: Olet jo osallistunut tähän äänestykseen
-1
View File
@@ -1753,7 +1753,6 @@ fo:
next: Næsta next: Næsta
older: Eldri older: Eldri
prev: Fyrra prev: Fyrra
truncate: "&hellip;"
polls: polls:
errors: errors:
already_voted: Tú hevur longu atkvøtt í hesi atkvøðugreiðsluni already_voted: Tú hevur longu atkvøtt í hesi atkvøðugreiðsluni
-1
View File
@@ -1935,7 +1935,6 @@ fr-CA:
next: Suivant next: Suivant
older: Plus ancien older: Plus ancien
prev: Précédent prev: Précédent
truncate: "&hellip;"
polls: polls:
errors: errors:
already_voted: Vous avez déjà voté sur ce sondage already_voted: Vous avez déjà voté sur ce sondage
-1
View File
@@ -1935,7 +1935,6 @@ fr:
next: Suivant next: Suivant
older: Plus ancien older: Plus ancien
prev: Précédent prev: Précédent
truncate: "&hellip;"
polls: polls:
errors: errors:
already_voted: Vous avez déjà voté sur ce sondage already_voted: Vous avez déjà voté sur ce sondage
-1
View File
@@ -1693,7 +1693,6 @@ fy:
next: Folgjende next: Folgjende
older: Alder older: Alder
prev: Foarige prev: Foarige
truncate: "&hellip;"
polls: polls:
errors: errors:
already_voted: Jo hawwe al op dizze enkête stimd already_voted: Jo hawwe al op dizze enkête stimd
-1
View File
@@ -2072,7 +2072,6 @@ ga:
next: An céad eile next: An céad eile
older: Níos sine older: Níos sine
prev: Ceann roimhe seo prev: Ceann roimhe seo
truncate: "&hellip;"
polls: polls:
errors: errors:
already_voted: Tá tú tar éis vótáil ar an vótaíocht seo cheana féin already_voted: Tá tú tar éis vótáil ar an vótaíocht seo cheana féin
-1
View File
@@ -2025,7 +2025,6 @@ gd:
next: Air adhart next: Air adhart
older: Nas sine older: Nas sine
prev: Air ais prev: Air ais
truncate: "&hellip;"
polls: polls:
errors: errors:
already_voted: Chuir thu bhòt sa chunntas-bheachd seo mu thràth already_voted: Chuir thu bhòt sa chunntas-bheachd seo mu thràth
-1
View File
@@ -1935,7 +1935,6 @@ gl:
next: Seguinte next: Seguinte
older: Máis antigo older: Máis antigo
prev: Previo prev: Previo
truncate: "&hellip;"
polls: polls:
errors: errors:
already_voted: Xa votaches nesta enquisa already_voted: Xa votaches nesta enquisa
-1
View File
@@ -2025,7 +2025,6 @@ he:
next: הבא next: הבא
older: ישן יותר older: ישן יותר
prev: הקודם prev: הקודם
truncate: "&hellip;"
polls: polls:
errors: errors:
already_voted: כבר הצבעת בסקר זה already_voted: כבר הצבעת בסקר זה
-1
View File
@@ -1935,7 +1935,6 @@ hu:
next: Következő next: Következő
older: Régebbi older: Régebbi
prev: Előző prev: Előző
truncate: "&hellip;"
polls: polls:
errors: errors:
already_voted: Ezen a szavazáson már voksoltál already_voted: Ezen a szavazáson már voksoltál
-1
View File
@@ -1717,7 +1717,6 @@ ia:
next: Sequente next: Sequente
older: Plus ancian older: Plus ancian
prev: Previe prev: Previe
truncate: "&hellip;"
polls: polls:
errors: errors:
already_voted: Tu jam ha votate in iste sondage already_voted: Tu jam ha votate in iste sondage
Loaded 100 of 143 files, more files were not shown because too many files have changed in this diff. Show more