Merge commit 'c4eec632b92c800ae38dba111c4c76e63bb1c0de' into glitch-soc/merge-upstream
This commit is contained in:
commit
b6abf7a69f
30 files changed
+242
-110
No files matched your search
@@ -76,6 +76,26 @@
|
||||
}
|
||||
|
||||
.emptyMessage {
|
||||
padding: 8px 16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
gap: 8px;
|
||||
padding: 16px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.loadingIndicator {
|
||||
--spinner-size: 20px;
|
||||
|
||||
position: relative;
|
||||
display: block;
|
||||
width: var(--spinner-size);
|
||||
height: var(--spinner-size);
|
||||
overflow: hidden;
|
||||
|
||||
& :global(.circular-progress) {
|
||||
width: var(--spinner-size);
|
||||
height: var(--spinner-size);
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,8 @@ import { matchWidth } from 'mastodon/components/dropdown/utils';
|
||||
import { IconButton } from 'mastodon/components/icon_button';
|
||||
import { useOnClickOutside } from 'mastodon/hooks/useOnClickOutside';
|
||||
|
||||
import { LoadingIndicator } from '../loading_indicator';
|
||||
|
||||
import classes from './combobox.module.scss';
|
||||
import { FormFieldWrapper } from './form_field_wrapper';
|
||||
import type { CommonFieldWrapperProps } from './form_field_wrapper';
|
||||
@@ -531,6 +533,7 @@ const ComboboxWithRef = <Item extends ComboboxItem, GroupKey extends string>(
|
||||
<div {...props} className={classNames(classes.popover, placement)}>
|
||||
<StatusMessageWrapper
|
||||
showStatus={showStatusMessageInMenu}
|
||||
isLoading={isLoading}
|
||||
status={statusMessage}
|
||||
>
|
||||
{hasGroups ? (
|
||||
@@ -592,10 +595,20 @@ Combobox.displayName = 'Combobox';
|
||||
const StatusMessageWrapper: React.FC<{
|
||||
showStatus: boolean;
|
||||
status: string;
|
||||
isLoading: boolean;
|
||||
children: React.ReactNode;
|
||||
}> = ({ showStatus, status, children }) => {
|
||||
}> = ({ showStatus, status, isLoading, children }) => {
|
||||
if (showStatus) {
|
||||
return <span className={classes.emptyMessage}>{status}</span>;
|
||||
return (
|
||||
<span className={classes.emptyMessage}>
|
||||
{isLoading && (
|
||||
<span className={classes.loadingIndicator}>
|
||||
<LoadingIndicator role='none' />
|
||||
</span>
|
||||
)}
|
||||
{status}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
return children;
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
.wrapper {
|
||||
--diameter: 20px;
|
||||
--padding: 2px;
|
||||
--transition: 0.2s ease-in-out;
|
||||
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
height: calc(var(--diameter) + var(--padding) * 2);
|
||||
}
|
||||
|
||||
.input {
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
@@ -9,10 +19,6 @@
|
||||
}
|
||||
|
||||
.toggle {
|
||||
--diameter: 20px;
|
||||
--padding: 2px;
|
||||
--transition: 0.2s ease-in-out;
|
||||
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
border-radius: 9999px;
|
||||
@@ -68,8 +74,3 @@
|
||||
:global([dir='rtl']) .input:checked + .toggle::before {
|
||||
transform: translateX(calc(-1 * (var(--diameter) - (var(--padding) * 2))));
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
}
|
||||
@@ -31,20 +31,17 @@ ToggleField.displayName = 'ToggleField';
|
||||
|
||||
export const Toggle = forwardRef<HTMLInputElement, Props>(
|
||||
({ className, size, ...otherProps }, ref) => (
|
||||
<span className={classes.wrapper}>
|
||||
<span
|
||||
className={classes.wrapper}
|
||||
style={{ '--diameter': size ? `${size}px` : undefined } as CSSProperties}
|
||||
>
|
||||
<input
|
||||
{...otherProps}
|
||||
type='checkbox'
|
||||
className={classes.input}
|
||||
ref={ref}
|
||||
/>
|
||||
<span
|
||||
className={classNames(classes.toggle, className)}
|
||||
style={
|
||||
{ '--diameter': size ? `${size}px` : undefined } as CSSProperties
|
||||
}
|
||||
hidden
|
||||
/>
|
||||
<span className={classNames(classes.toggle, className)} hidden />
|
||||
</span>
|
||||
),
|
||||
);
|
||||
|
||||
@@ -331,6 +331,10 @@ const TopicField: React.FC = () => {
|
||||
[topic],
|
||||
);
|
||||
|
||||
const isCurrentTopicOnlySuggestion =
|
||||
tags.length === 1 && tags[0]?.id === 'new';
|
||||
const hideTagSuggestions = !tags.length || isCurrentTopicOnlySuggestion;
|
||||
|
||||
return (
|
||||
<ComboboxField
|
||||
required={false}
|
||||
@@ -369,7 +373,7 @@ const TopicField: React.FC = () => {
|
||||
}
|
||||
: undefined
|
||||
}
|
||||
suppressMenu={!tags.length}
|
||||
suppressMenu={hideTagSuggestions}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -7,8 +7,8 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
|
||||
import { NonceProvider } from 'react-select';
|
||||
import AsyncSelect from 'react-select/async';
|
||||
import Toggle from 'react-toggle';
|
||||
|
||||
import { Toggle } from '@/mastodon/components/form_fields/toggle_field';
|
||||
import { injectIntl } from '@/mastodon/components/intl';
|
||||
|
||||
import SettingToggle from '../../notifications/components/setting_toggle';
|
||||
|
||||
@@ -7,8 +7,6 @@ import { useParams, useHistory, Link } from 'react-router-dom';
|
||||
|
||||
import { isFulfilled } from '@reduxjs/toolkit';
|
||||
|
||||
import Toggle from 'react-toggle';
|
||||
|
||||
import ChevronRightIcon from '@/material-icons/400-24px/chevron_right.svg?react';
|
||||
import ListAltIcon from '@/material-icons/400-24px/list_alt.svg?react';
|
||||
import { fetchList } from 'mastodon/actions/lists';
|
||||
@@ -20,7 +18,11 @@ import { Avatar } from 'mastodon/components/avatar';
|
||||
import { AvatarGroup } from 'mastodon/components/avatar_group';
|
||||
import { Column } from 'mastodon/components/column';
|
||||
import { ColumnHeader } from 'mastodon/components/column_header';
|
||||
import { SelectField, TextInputField } from 'mastodon/components/form_fields';
|
||||
import {
|
||||
SelectField,
|
||||
TextInputField,
|
||||
Toggle,
|
||||
} from 'mastodon/components/form_fields';
|
||||
import { Icon } from 'mastodon/components/icon';
|
||||
import { LoadingIndicator } from 'mastodon/components/loading_indicator';
|
||||
import type { List } from 'mastodon/models/list';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { PropsWithChildren } from 'react';
|
||||
import { useCallback } from 'react';
|
||||
|
||||
import Toggle from 'react-toggle';
|
||||
import { Toggle } from '@/mastodon/components/form_fields/toggle_field';
|
||||
|
||||
interface Props {
|
||||
checked: boolean;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { PureComponent } from 'react';
|
||||
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
|
||||
import Toggle from 'react-toggle';
|
||||
import { Toggle } from '@/mastodon/components/form_fields/toggle_field';
|
||||
|
||||
export default class SettingToggle extends PureComponent {
|
||||
|
||||
@@ -27,7 +27,7 @@ export default class SettingToggle extends PureComponent {
|
||||
|
||||
return (
|
||||
<div className='setting-toggle'>
|
||||
<Toggle disabled={disabled} id={id} checked={settings.getIn(settingPath, defaultValue)} onChange={this.onChange} onKeyDown={this.onKeyDown} />
|
||||
<Toggle disabled={disabled} id={id} checked={settings.getIn(settingPath, defaultValue)} onChange={this.onChange} onKeyDown={this.onKeyDown} size={16} />
|
||||
<label htmlFor={id} className='setting-toggle__label'>{label}</label>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -6,8 +6,6 @@ import classNames from 'classnames';
|
||||
import { Helmet } from 'react-helmet';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
|
||||
import Toggle from 'react-toggle';
|
||||
|
||||
import AddPhotoAlternateIcon from '@/material-icons/400-24px/add_photo_alternate.svg?react';
|
||||
import EditIcon from '@/material-icons/400-24px/edit.svg?react';
|
||||
import PersonIcon from '@/material-icons/400-24px/person.svg?react';
|
||||
@@ -16,7 +14,11 @@ import { closeOnboarding } from 'mastodon/actions/onboarding';
|
||||
import { Button } from 'mastodon/components/button';
|
||||
import { Column } from 'mastodon/components/column';
|
||||
import { ColumnHeader } from 'mastodon/components/column_header';
|
||||
import { TextAreaField, TextInputField } from 'mastodon/components/form_fields';
|
||||
import {
|
||||
TextAreaField,
|
||||
TextInputField,
|
||||
Toggle,
|
||||
} from 'mastodon/components/form_fields';
|
||||
import { Icon } from 'mastodon/components/icon';
|
||||
import { LoadingIndicator } from 'mastodon/components/loading_indicator';
|
||||
import { me } from 'mastodon/initial_state';
|
||||
|
||||
@@ -6,8 +6,7 @@ import type { Map } from 'immutable';
|
||||
import { OrderedSet } from 'immutable';
|
||||
import { shallowEqual } from 'react-redux';
|
||||
|
||||
import Toggle from 'react-toggle';
|
||||
|
||||
import { Toggle } from '@/mastodon/components/form_fields/toggle_field';
|
||||
import { fetchAccount } from 'mastodon/actions/accounts';
|
||||
import { Button } from 'mastodon/components/button';
|
||||
import type { Status } from 'mastodon/models/status';
|
||||
|
||||
@@ -13,12 +13,12 @@
|
||||
"about.not_available": "Þessar upplýsingar hafa ekki verið gerðar aðgengilegar á þessum netþjóni.",
|
||||
"about.powered_by": "Dreifhýstur samskiptamiðill keyrður með {mastodon}",
|
||||
"about.rules": "Reglur netþjónsins",
|
||||
"account.account_note_header": "Einkaminnispunktur",
|
||||
"account.account_note_header": "Mínir minnispunktar",
|
||||
"account.activity": "Virkni",
|
||||
"account.add_note": "Bæta við einkaminnispunkti",
|
||||
"account.add_note": "Bæta við persónulegum minnispunkti",
|
||||
"account.add_or_remove_from_list": "Bæta við eða fjarlægja af listum",
|
||||
"account.badges.admin": "Stjóri",
|
||||
"account.badges.blocked": "Lokað á",
|
||||
"account.badges.blocked": "Útilokað",
|
||||
"account.badges.bot": "Yrki",
|
||||
"account.badges.domain_blocked": "Útilokað lén",
|
||||
"account.badges.group": "Hópur",
|
||||
@@ -28,13 +28,13 @@
|
||||
"account.block_domain": "Útiloka lénið {domain}",
|
||||
"account.block_short": "Útiloka",
|
||||
"account.blocked": "Útilokaður",
|
||||
"account.blocking": "Útilokun",
|
||||
"account.blocking": "Útilokað",
|
||||
"account.cancel_follow_request": "Taka fylgjendabeiðni til baka",
|
||||
"account.copy": "Afrita tengil í notandasnið",
|
||||
"account.direct": "Einkaspjall við @{name}",
|
||||
"account.disable_notifications": "Hætta að láta mig vita þegar @{name} sendir inn",
|
||||
"account.domain_blocking": "Útiloka lén",
|
||||
"account.edit_note": "Breyta einkaminnispunkti",
|
||||
"account.domain_blocking": "Útilokað lén",
|
||||
"account.edit_note": "Breyta persónulegum minnispunkti",
|
||||
"account.edit_profile": "Breyta notandasniði",
|
||||
"account.edit_profile_short": "Breyta",
|
||||
"account.enable_notifications": "Láta mig vita þegar @{name} sendir inn",
|
||||
@@ -55,8 +55,8 @@
|
||||
"account.filters.replies_toggle": "Birta svör",
|
||||
"account.follow": "Fylgjast með",
|
||||
"account.follow_back": "Fylgjast með til baka",
|
||||
"account.follow_back_short": "Fylgjast með til baka",
|
||||
"account.follow_request": "Beiðni um að fylgjast með",
|
||||
"account.follow_back_short": "Fylgja líka",
|
||||
"account.follow_request": "Beiðni um að fylgja",
|
||||
"account.follow_request_cancel": "Hætta við beiðni",
|
||||
"account.follow_request_cancel_short": "Hætta við",
|
||||
"account.follow_request_short": "Beiðni",
|
||||
@@ -90,7 +90,7 @@
|
||||
"account.menu.note.description": "Einungis sýnilegt þér",
|
||||
"account.menu.open_original_page": "Skoða á {domain}",
|
||||
"account.menu.remove_follower": "Fjarlægja fylgjanda",
|
||||
"account.menu.report": "Kæra aðgang",
|
||||
"account.menu.report": "Tilkynna aðgang",
|
||||
"account.menu.share": "Deila…",
|
||||
"account.menu.show_reblogs": "Sýna endurbirtingar í tímalínu",
|
||||
"account.menu.unblock": "Aflétta útilokun aðgangs",
|
||||
@@ -102,7 +102,7 @@
|
||||
"account.mute_short": "Þagga niður",
|
||||
"account.muted": "Þaggaður",
|
||||
"account.muting": "Þöggun",
|
||||
"account.mutual": "Þið fylgist með hvor öðrum",
|
||||
"account.mutual": "Þið fylgið hvor öðrum",
|
||||
"account.name.copy": "Afrita kennislóð",
|
||||
"account.name.help.domain": "{domain} er netþjónninn sem hýsir upplýsingasnið um notandann og færslurnar hans.",
|
||||
"account.name.help.domain_self": "{domain} er netþjónninn þinn sem hýsir upplýsingasniðið þitt og færslurnar þínar.",
|
||||
@@ -125,7 +125,7 @@
|
||||
"account.remove_from_followers": "Fjarlægja {name} úr fylgjendum",
|
||||
"account.report": "Kæra @{name}",
|
||||
"account.requested_follow": "{name} hefur beðið um að fylgjast með þér",
|
||||
"account.requests_to_follow_you": "Bað um að fylgjast með þér",
|
||||
"account.requests_to_follow_you": "Bað um að fylgja þér",
|
||||
"account.share": "Deila notandasniði fyrir @{name}",
|
||||
"account.show_reblogs": "Sýna endurbirtingar frá @{name}",
|
||||
"account.statuses_counter": "{count, plural, one {{counter} færsla} other {{counter} færslur}}",
|
||||
@@ -402,7 +402,7 @@
|
||||
"collections.new_collection": "Nýtt safn",
|
||||
"collections.no_collections_yet": "Engin söfn ennþá.",
|
||||
"collections.remove_account": "Fjarlægja",
|
||||
"collections.report_collection": "Kæra þetta safn",
|
||||
"collections.report_collection": "Tilkynna þetta safn",
|
||||
"collections.revoke_collection_inclusion": "Fjarlægja mig úr þessu safni",
|
||||
"collections.revoke_inclusion.confirmation": "Þú varst fjarlægð/ur úr \"{collection}\"",
|
||||
"collections.revoke_inclusion.error": "Upp kom villa, reyndu aftur síðar.",
|
||||
@@ -412,8 +412,8 @@
|
||||
"collections.share_short": "Deila",
|
||||
"collections.suggestions.can_not_add": "Er ekki hægt að bæta við",
|
||||
"collections.suggestions.can_not_add_desc": "Þessir aðgangar gætu hafa skráð sig úr almennri birtingu eða gætu verið á netþjónum sem ekki styðja söfn.",
|
||||
"collections.suggestions.must_follow": "Verður fyrst að fylgjast með",
|
||||
"collections.suggestions.must_follow_desc": "Þessir aðgangar yfirfara allar beiðnir um að fylgjast með. Fylgjendur geta bætt þeim í söfn.",
|
||||
"collections.suggestions.must_follow": "Verður fyrst að fylgja",
|
||||
"collections.suggestions.must_follow_desc": "Þessir aðgangar yfirfara allar beiðnir um að fylgja þeim. Fylgjendur geta bætt þeim í söfn.",
|
||||
"collections.topic_hint": "Bættu við myllumerki sem hjálpar öðrum að skilja aðalefni þessa safns.",
|
||||
"collections.topic_special_chars_hint": "Sérstafir verða fjarlægðir við vistun",
|
||||
"collections.unlisted_collections_description": "Þessi birtast ekki öðrum á notandasíðunni þinni. Þeir sem eru með tengil á þau geta séð þau.",
|
||||
@@ -508,9 +508,9 @@
|
||||
"confirmations.discard_draft.post.title": "Henda drögum að færslunni þinni?",
|
||||
"confirmations.discard_edit_media.confirm": "Henda",
|
||||
"confirmations.discard_edit_media.message": "Þú ert með óvistaðar breytingar á lýsingu myndefnis eða forskoðunar, henda þeim samt?",
|
||||
"confirmations.follow_to_list.confirm": "Fylgjast með og bæta á lista",
|
||||
"confirmations.follow_to_list.message": "Þú þarft að fylgjast með {name} til að bæta viðkomandi á lista.",
|
||||
"confirmations.follow_to_list.title": "Fylgjast með notanda?",
|
||||
"confirmations.follow_to_list.confirm": "Fylgja og bæta á lista",
|
||||
"confirmations.follow_to_list.message": "Þú þarft að fylgja {name} til að bæta viðkomandi á lista.",
|
||||
"confirmations.follow_to_list.title": "Fylgja notanda?",
|
||||
"confirmations.hide_featured_tab.confirm": "Fela flipa",
|
||||
"confirmations.hide_featured_tab.intro": "Þú getur breytt þessu hvenær sem er í <i>Breyta notandasniði > Stillingar notandasniðsflipa</i>.",
|
||||
"confirmations.hide_featured_tab.message": "Þetta mun fela flipann fyrir notendum á {serverName} og öðrum netþjónum sem nota nýjustu útgáfuna af Mastodon. Birting í öðrum viðmótum gæti verið á ýmsan máta.",
|
||||
@@ -536,7 +536,7 @@
|
||||
"confirmations.redraft.message": "Ertu viss um að þú viljir eyða þessari færslu og enduvinna drögin? Eftirlæti og endurbirtingar munu glatast og svör við upprunalegu færslunni munu verða munaðarlaus.",
|
||||
"confirmations.redraft.title": "Eyða og byrja ný drög að færslu?",
|
||||
"confirmations.remove_from_followers.confirm": "Fjarlægja fylgjanda",
|
||||
"confirmations.remove_from_followers.message": "{name} mun hætta að fylgjast með þé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.revoke_collection_inclusion.confirm": "Fjarlægja mig",
|
||||
"confirmations.revoke_collection_inclusion.message": "Þessi aðgerð er varanleg og umsjónaraðili safnsins mun ekki geta bætt þér aftur við síðar.",
|
||||
@@ -547,9 +547,9 @@
|
||||
"confirmations.unblock.confirm": "Aflétta útilokun",
|
||||
"confirmations.unblock.title": "Aflétta útilokun á {name}?",
|
||||
"confirmations.unfollow.confirm": "Hætta að fylgja",
|
||||
"confirmations.unfollow.title": "Hætta að fylgjast með {name}?",
|
||||
"confirmations.unfollow.title": "Hætta að fylgja {name}?",
|
||||
"confirmations.withdraw_request.confirm": "Taka beiðni til baka",
|
||||
"confirmations.withdraw_request.title": "Taka aftur beiðni um að fylgjast með {name}?",
|
||||
"confirmations.withdraw_request.title": "Taka aftur beiðni um að fylgja {name}?",
|
||||
"content_warning.hide": "Fela færslu",
|
||||
"content_warning.show": "Birta samt",
|
||||
"content_warning.show_more": "Sýna meira",
|
||||
@@ -1113,7 +1113,7 @@
|
||||
"report.category.title_account": "notandasnið",
|
||||
"report.category.title_status": "færsla",
|
||||
"report.close": "Lokið",
|
||||
"report.collection_comment": "Hvers vegna viltu kæra þetta safn?",
|
||||
"report.collection_comment": "Afhverju viltu tilkynna þetta safn?",
|
||||
"report.comment.title": "Er eitthvað annað sem þú heldur að við ættum að vita?",
|
||||
"report.forward": "Áframsenda til {target}",
|
||||
"report.forward_hint": "Notandaaðgangurinn er af öðrum vefþjóni. Á einnig að senda nafnlaust afrit af kærunni þangað?",
|
||||
|
||||
@@ -410,6 +410,10 @@
|
||||
"collections.search_accounts_max_reached": "Du har lagt till maximalt antal konton",
|
||||
"collections.sensitive": "Känsligt",
|
||||
"collections.share_short": "Dela",
|
||||
"collections.suggestions.can_not_add": "Kan inte läggas till",
|
||||
"collections.suggestions.can_not_add_desc": "Dessa konton kan ha valt bort upptäckt, eller kan de vara på en server som inte stöder samlingar.",
|
||||
"collections.suggestions.must_follow": "Måste följa först",
|
||||
"collections.suggestions.must_follow_desc": "Dessa konton granskar alla följa förfrågningar. Följare kan lägga till dem i samlingar.",
|
||||
"collections.topic_hint": "Lägg till en hashtagg som hjälper andra att förstå huvudämnet i denna samling.",
|
||||
"collections.topic_special_chars_hint": "Specialtecken kommer att tas bort när du sparar",
|
||||
"collections.unlisted_collections_description": "Dessa visas inte på din profil till andra. Vem som helst med länken kan upptäcka dem.",
|
||||
|
||||
@@ -1122,7 +1122,7 @@ a.name-tag,
|
||||
text-decoration: none;
|
||||
margin-bottom: 10px;
|
||||
|
||||
&:hover {
|
||||
&:where(a):where(:hover, :focus, :active) {
|
||||
color: var(--color-text-brand);
|
||||
}
|
||||
}
|
||||
@@ -1131,14 +1131,6 @@ a.name-tag,
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
a.announcements-list__item__title {
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active {
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
}
|
||||
|
||||
&__action-bar {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
Reference in new issue
Block a user