Merge commit '2beab34ca405a0beb3ea9f5ab684779dc2eb6374' into glitch-soc/merge-upstream

This commit is contained in:
Claire committed 2025-01-29 12:05:09 +01:00
commit 844ae90dad
17 files changed
+103 -88

No files matched your search

@@ -1,9 +1,10 @@
import { useCallback } from 'react';
import { useCallback, useState } from 'react';
import { useIntl, defineMessages } from 'react-intl';
import MoreHorizIcon from '@/material-icons/400-24px/more_horiz.svg?react';
import { Icon } from 'mastodon/components/icon';
import { LoadingIndicator } from 'mastodon/components/loading_indicator';
const messages = defineMessages({
load_more: { id: 'status.load_more', defaultMessage: 'Load more' },
@@ -17,10 +18,12 @@ interface Props<T> {
export const LoadGap = <T,>({ disabled, param, onClick }: Props<T>) => {
const intl = useIntl();
const [loading, setLoading] = useState(false);
const handleClick = useCallback(() => {
setLoading(true);
onClick(param);
}, [param, onClick]);
}, [setLoading, param, onClick]);
return (
<button
@@ -28,8 +31,13 @@ export const LoadGap = <T,>({ disabled, param, onClick }: Props<T>) => {
disabled={disabled}
onClick={handleClick}
aria-label={intl.formatMessage(messages.load_more)}
title={intl.formatMessage(messages.load_more)}
>
<Icon id='ellipsis-h' icon={MoreHorizIcon} />
{loading ? (
<LoadingIndicator />
) : (
<Icon id='ellipsis-h' icon={MoreHorizIcon} />
)}
</button>
);
};
@@ -333,7 +333,7 @@ class Status extends ImmutablePureComponent {
const { onToggleHidden } = this.props;
const status = this._properStatus();
if (status.get('matched_filters')) {
if (this.props.status.get('matched_filters')) {
const expandedBecauseOfCW = !status.get('hidden') || status.get('spoiler_text').length === 0;
const expandedBecauseOfFilter = this.state.showDespiteFilter;
@@ -73,4 +73,4 @@ const guessLanguage = (text) => {
export const debouncedGuess = debounce((text, setGuess) => {
setGuess(guessLanguage(text));
}, 500, { leading: true, trailing: true });
}, 500, { maxWait: 1500, leading: true, trailing: true });
+4
View File
@@ -86,6 +86,9 @@
"alert.unexpected.message": "Vyskytla sa nečakaná chyba.",
"alert.unexpected.title": "Ups!",
"alt_text_badge.title": "Alternatívny popis",
"alt_text_modal.add_text_from_image": "Pridaj text z obrázka",
"alt_text_modal.cancel": "Zrušiť",
"alt_text_modal.done": "Hotovo",
"announcement.announcement": "Oznámenie",
"annual_report.summary.archetype.oracle": "Veštec",
"annual_report.summary.followers.followers": "sledovatelia",
@@ -378,6 +381,7 @@
"ignore_notifications_modal.not_followers_title": "Nevšímať si oznámenia od ľudí, ktorí ťa nenasledujú?",
"ignore_notifications_modal.not_following_title": "Nevšímať si oznámenia od ľudí, ktorých nenasleduješ?",
"ignore_notifications_modal.private_mentions_title": "Nevšímať si oznámenia o nevyžiadaných súkromných spomínaniach?",
"info_button.label": "Pomoc",
"interaction_modal.action.favourite": "Pre pokračovanie si musíš obľúbiť zo svojho účtu.",
"interaction_modal.action.follow": "Pre pokračovanie musíš nasledovať zo svojho účtu.",
"interaction_modal.action.reply": "Pre pokračovanie musíš odpovedať s tvojho účtu.",
+14 -5
View File
@@ -4028,23 +4028,27 @@ a.status-card {
}
.load-more {
display: block;
display: flex;
align-items: center;
justify-content: center;
color: $dark-text-color;
background-color: transparent;
border: 0;
font-size: inherit;
text-align: center;
line-height: inherit;
margin: 0;
width: 100%;
padding: 15px;
box-sizing: border-box;
width: 100%;
clear: both;
text-decoration: none;
&:hover {
background: var(--on-surface-color);
}
.icon {
width: 22px;
height: 22px;
}
}
.load-gap {
@@ -4421,6 +4425,7 @@ a.status-card {
justify-content: center;
}
.load-more .loading-indicator,
.button .loading-indicator {
position: static;
transform: none;
@@ -4432,6 +4437,10 @@ a.status-card {
}
}
.load-more .loading-indicator .circular-progress {
color: lighten($ui-base-color, 26%);
}
.circular-progress {
color: lighten($ui-base-color, 26%);
animation: 1.4s linear 0s infinite normal none running simple-rotate;