Merge commit '1960aac90b16fce1ec620ac990aa931efcf04700' into glitch-soc/merge-upstream
This commit is contained in:
@@ -38,6 +38,7 @@ class Item extends PureComponent {
|
||||
|
||||
state = {
|
||||
loaded: false,
|
||||
error: false,
|
||||
};
|
||||
|
||||
handleMouseEnter = (e) => {
|
||||
@@ -81,6 +82,10 @@ class Item extends PureComponent {
|
||||
this.setState({ loaded: true });
|
||||
};
|
||||
|
||||
handleImageError = () => {
|
||||
this.setState({ error: true });
|
||||
};
|
||||
|
||||
render () {
|
||||
const { attachment, lang, index, size, standalone, displayWidth, visible } = this.props;
|
||||
|
||||
@@ -148,6 +153,7 @@ class Item extends PureComponent {
|
||||
lang={lang}
|
||||
style={{ objectPosition: `${x}% ${y}%` }}
|
||||
onLoad={this.handleImageLoad}
|
||||
onError={this.handleImageError}
|
||||
/>
|
||||
</a>
|
||||
);
|
||||
@@ -183,7 +189,7 @@ class Item extends PureComponent {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={classNames('media-gallery__item', { standalone, 'media-gallery__item--tall': height === 100, 'media-gallery__item--wide': width === 100 })} key={attachment.get('id')}>
|
||||
<div className={classNames('media-gallery__item', { standalone, 'media-gallery__item--error': this.state.error, 'media-gallery__item--tall': height === 100, 'media-gallery__item--wide': width === 100 })} key={attachment.get('id')}>
|
||||
<Blurhash
|
||||
hash={attachment.get('blurhash')}
|
||||
dummy={!useBlurhash}
|
||||
|
||||
@@ -101,10 +101,10 @@ class AccountNote extends ImmutablePureComponent {
|
||||
if (e.keyCode === 13 && (e.ctrlKey || e.metaKey)) {
|
||||
e.preventDefault();
|
||||
|
||||
this._save();
|
||||
|
||||
if (this.textarea) {
|
||||
this.textarea.blur();
|
||||
} else {
|
||||
this._save();
|
||||
}
|
||||
} else if (e.keyCode === 27) {
|
||||
e.preventDefault();
|
||||
|
||||
@@ -26,11 +26,16 @@ export const MediaItem: React.FC<{
|
||||
displayMedia === 'show_all',
|
||||
);
|
||||
const [loaded, setLoaded] = useState(false);
|
||||
const [error, setError] = useState(false);
|
||||
|
||||
const handleImageLoad = useCallback(() => {
|
||||
setLoaded(true);
|
||||
}, [setLoaded]);
|
||||
|
||||
const handleImageError = useCallback(() => {
|
||||
setError(true);
|
||||
}, [setError]);
|
||||
|
||||
const handleMouseEnter = useCallback(
|
||||
(e: React.MouseEvent<HTMLVideoElement>) => {
|
||||
if (e.target instanceof HTMLVideoElement) {
|
||||
@@ -98,6 +103,7 @@ export const MediaItem: React.FC<{
|
||||
alt={description}
|
||||
lang={lang}
|
||||
onLoad={handleImageLoad}
|
||||
onError={handleImageError}
|
||||
/>
|
||||
|
||||
<div className='media-gallery__item__overlay media-gallery__item__overlay--corner'>
|
||||
@@ -118,6 +124,7 @@ export const MediaItem: React.FC<{
|
||||
lang={lang}
|
||||
style={{ objectPosition: `${x}% ${y}%` }}
|
||||
onLoad={handleImageLoad}
|
||||
onError={handleImageError}
|
||||
/>
|
||||
);
|
||||
} else if (['video', 'gifv'].includes(type)) {
|
||||
@@ -173,7 +180,11 @@ export const MediaItem: React.FC<{
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='media-gallery__item media-gallery__item--square'>
|
||||
<div
|
||||
className={classNames('media-gallery__item media-gallery__item--square', {
|
||||
'media-gallery__item--error': error,
|
||||
})}
|
||||
>
|
||||
<Blurhash
|
||||
hash={blurhash}
|
||||
className={classNames('media-gallery__preview', {
|
||||
|
||||
@@ -513,9 +513,9 @@
|
||||
"loading_indicator.label": "Načítání…",
|
||||
"media_gallery.hide": "Skrýt",
|
||||
"moved_to_account_banner.text": "Váš účet {disabledAccount} je momentálně deaktivován, protože jste se přesunul/a na {movedToAccount}.",
|
||||
"mute_modal.hide_from_notifications": "Skrýt z notifikací",
|
||||
"mute_modal.hide_from_notifications": "Skrýt z oznámení",
|
||||
"mute_modal.hide_options": "Skrýt možnosti",
|
||||
"mute_modal.indefinite": "Dokud je neodkryju",
|
||||
"mute_modal.indefinite": "Dokud je neodeberu ze ztišených",
|
||||
"mute_modal.show_options": "Zobrazit možnosti",
|
||||
"mute_modal.they_can_mention_and_follow": "Mohou vás zmínit a sledovat, ale neuvidíte je.",
|
||||
"mute_modal.they_wont_know": "Nebudou vědět, že byli skryti.",
|
||||
@@ -524,7 +524,7 @@
|
||||
"mute_modal.you_wont_see_posts": "Stále budou moci vidět vaše příspěvky, ale vy jejich neuvidíte.",
|
||||
"navigation_bar.about": "O aplikaci",
|
||||
"navigation_bar.administration": "Administrace",
|
||||
"navigation_bar.advanced_interface": "Otevřít pokročilé webové rozhraní",
|
||||
"navigation_bar.advanced_interface": "Otevřít v pokročilém webovém rozhraní",
|
||||
"navigation_bar.blocks": "Blokovaní uživatelé",
|
||||
"navigation_bar.bookmarks": "Záložky",
|
||||
"navigation_bar.community_timeline": "Místní časová osa",
|
||||
@@ -553,13 +553,13 @@
|
||||
"notification.admin.report": "Uživatel {name} nahlásil {target}",
|
||||
"notification.admin.report_account": "{name} nahlásil {count, plural, one {jeden příspěvek} few {# příspěvky} many {# příspěvků} other {# příspěvků}} od {target} za {category}",
|
||||
"notification.admin.report_account_other": "{name} nahlásil {count, plural, one {jeden příspěvek} few {# příspěvky} many {# příspěvků} other {# příspěvků}} od {target}",
|
||||
"notification.admin.report_statuses": "{name} nahlásil {target} za {category}",
|
||||
"notification.admin.report_statuses_other": "{name} nahlásil {target}",
|
||||
"notification.admin.report_statuses": "{name} nahlásili {target} za {category}",
|
||||
"notification.admin.report_statuses_other": "{name} nahlásili {target}",
|
||||
"notification.admin.sign_up": "Uživatel {name} se zaregistroval",
|
||||
"notification.admin.sign_up.name_and_others": "{name} a {count, plural, one {# další} few {# další} many {# dalších} other {# dalších}} se zaregistrovali",
|
||||
"notification.annual_report.message": "Váš #Wrapstodon {year} na Vás čeká! Podívejte se, jak vypadal tento Váš rok na Mastodonu!",
|
||||
"notification.annual_report.view": "Zobrazit #Wrapstodon",
|
||||
"notification.favourite": "Uživatel {name} si oblíbil váš příspěvek",
|
||||
"notification.favourite": "{name} si oblíbil*a váš příspěvek",
|
||||
"notification.favourite.name_and_others_with_link": "{name} a {count, plural, one {<a># další</a> si oblíbil} few {<a># další</a> si oblíbili} other {<a># dalších</a> si oblíbilo}} Váš příspěvek",
|
||||
"notification.favourite_pm": "{name} si oblíbil vaši soukromou zmínku",
|
||||
"notification.favourite_pm.name_and_others_with_link": "{name} a {count, plural, one {<a># další</a> si oblíbil} few {<a># další</a> si oblíbili} other {<a># dalších</a> si oblíbilo}} Vaši soukromou zmínku",
|
||||
@@ -578,7 +578,7 @@
|
||||
"notification.moderation_warning.action_delete_statuses": "Některé z vašich příspěvků byly odstraněny.",
|
||||
"notification.moderation_warning.action_disable": "Váš účet je zablokován.",
|
||||
"notification.moderation_warning.action_mark_statuses_as_sensitive": "Některé z vašich příspěvků byly označeny jako citlivé.",
|
||||
"notification.moderation_warning.action_none": "Váš účet obdržel moderační varování.",
|
||||
"notification.moderation_warning.action_none": "Váš účet obdržel varování od moderátorů.",
|
||||
"notification.moderation_warning.action_sensitive": "Vaše příspěvky budou od nynějška označeny jako citlivé.",
|
||||
"notification.moderation_warning.action_silence": "Váš účet byl omezen.",
|
||||
"notification.moderation_warning.action_suspend": "Váš účet byl pozastaven.",
|
||||
@@ -610,7 +610,7 @@
|
||||
"notification_requests.maximize": "Maximalizovat",
|
||||
"notification_requests.minimize_banner": "Minimalizovat banner filtrovaných oznámení",
|
||||
"notification_requests.notifications_from": "Oznámení od {name}",
|
||||
"notification_requests.title": "Vyfiltrovaná oznámení",
|
||||
"notification_requests.title": "Filtrovaná oznámení",
|
||||
"notification_requests.view": "Zobrazit oznámení",
|
||||
"notifications.clear": "Vyčistit oznámení",
|
||||
"notifications.clear_confirmation": "Opravdu chcete trvale smazat všechna vaše oznámení?",
|
||||
@@ -773,7 +773,7 @@
|
||||
"report_notification.categories.spam": "Spam",
|
||||
"report_notification.categories.spam_sentence": "spam",
|
||||
"report_notification.categories.violation": "Porušení pravidla",
|
||||
"report_notification.categories.violation_sentence": "porušení pravidla",
|
||||
"report_notification.categories.violation_sentence": "porušení pravidel",
|
||||
"report_notification.open": "Otevřít hlášení",
|
||||
"search.no_recent_searches": "Žádná nedávná vyhledávání",
|
||||
"search.placeholder": "Hledat",
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
"account.featured_tags.last_status_never": "Aucune publication",
|
||||
"account.featured_tags.title": "Hashtags inclus de {name}",
|
||||
"account.follow": "Suivre",
|
||||
"account.follow_back": "S'abonner en retour",
|
||||
"account.follow_back": "Suivre en retour",
|
||||
"account.followers": "abonné·e·s",
|
||||
"account.followers.empty": "Personne ne suit ce compte pour l'instant.",
|
||||
"account.followers_counter": "{count, plural, one {{counter} abonné·e} other {{counter} abonné·e·s}}",
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"about.contact": "Contact :",
|
||||
"about.disclaimer": "Mastodon est un logiciel libre, open-source et une marque déposée de Mastodon gGmbH.",
|
||||
"about.domain_blocks.no_reason_available": "Raison non disponible",
|
||||
"about.domain_blocks.preamble": "Mastodon vous permet généralement de visualiser le contenu et d'interagir avec les utilisateur⋅rice⋅s de n'importe quel autre serveur dans le fédiverse. Voici les exceptions qui ont été faites sur ce serveur en particulier.",
|
||||
"about.domain_blocks.preamble": "Mastodon vous permet généralement de visualiser le contenu et d'interagir avec les utilisateur⋅rices de n'importe quel autre serveur dans le fédivers. Voici les exceptions qui ont été faites sur ce serveur-là.",
|
||||
"about.domain_blocks.silenced.explanation": "Vous ne verrez généralement pas les profils et le contenu de ce serveur, à moins que vous ne les recherchiez explicitement ou que vous ne choisissiez de les suivre.",
|
||||
"about.domain_blocks.silenced.title": "Limité",
|
||||
"about.domain_blocks.suspended.explanation": "Aucune donnée de ce serveur ne sera traitée, enregistrée ou échangée, rendant impossible toute interaction ou communication avec les comptes de ce serveur.",
|
||||
@@ -19,7 +19,7 @@
|
||||
"account.block_domain": "Bloquer le domaine {domain}",
|
||||
"account.block_short": "Bloquer",
|
||||
"account.blocked": "Bloqué·e",
|
||||
"account.cancel_follow_request": "Annuler le suivi",
|
||||
"account.cancel_follow_request": "Annuler l'abonnement",
|
||||
"account.copy": "Copier le lien vers le profil",
|
||||
"account.direct": "Mention privée @{name}",
|
||||
"account.disable_notifications": "Ne plus me notifier quand @{name} publie quelque chose",
|
||||
@@ -31,18 +31,18 @@
|
||||
"account.featured_tags.last_status_never": "Aucun message",
|
||||
"account.featured_tags.title": "Les hashtags en vedette de {name}",
|
||||
"account.follow": "Suivre",
|
||||
"account.follow_back": "S'abonner en retour",
|
||||
"account.follow_back": "Suivre en retour",
|
||||
"account.followers": "Abonné·e·s",
|
||||
"account.followers.empty": "Personne ne suit cet·te utilisateur·rice pour l’instant.",
|
||||
"account.followers_counter": "{count, plural, one {{counter} abonné·e} other {{counter} abonné·e·s}}",
|
||||
"account.following": "Abonnements",
|
||||
"account.following_counter": "{count, plural, one {{counter} abonnement} other {{counter} abonnements}}",
|
||||
"account.follows.empty": "Cet·te utilisateur·rice ne suit personne pour l’instant.",
|
||||
"account.go_to_profile": "Aller au profil",
|
||||
"account.go_to_profile": "Voir le profil",
|
||||
"account.hide_reblogs": "Masquer les partages de @{name}",
|
||||
"account.in_memoriam": "En mémoire de.",
|
||||
"account.joined_short": "Ici depuis",
|
||||
"account.languages": "Changer les langues abonnées",
|
||||
"account.languages": "Modifier les langues d'abonnements",
|
||||
"account.link_verified_on": "La propriété de ce lien a été vérifiée le {date}",
|
||||
"account.locked_info": "Ce compte est privé. Son ou sa propriétaire approuve manuellement qui peut le suivre.",
|
||||
"account.media": "Médias",
|
||||
|
||||
@@ -6902,6 +6902,10 @@ a.status-card {
|
||||
filter: var(--overlay-icon-shadow);
|
||||
}
|
||||
}
|
||||
|
||||
&--error img {
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.media-gallery__item-thumbnail {
|
||||
|
||||
Reference in New Issue
Block a user