Merge commit 'e8270e2807727e1cf6a47a40442b3038c5bca858' into glitch-soc/merge-upstream

Conflicts:
- `.eslintrc.js`:
  Upstream moved it to `eslint.config.mjs`.
  Ported the glitch-soc changes there.
- `yarn.lock`:
  Upstream updated dependencies close to glitch-soc-only dependencies.
  Ported upstream's changes.
This commit is contained in:
Claire committed 2025-04-01 20:59:34 +02:00
commit e0406fcf02
38 files changed
+1227 -963

No files matched your search

@@ -9,48 +9,39 @@ import { reduceMotion } from 'mastodon/initial_state';
interface UploadProgressProps {
active: boolean;
progress: number;
isProcessing: boolean;
isProcessing?: boolean;
}
export const UploadProgress: React.FC<UploadProgressProps> = ({
active,
progress,
isProcessing,
isProcessing = false,
}) => {
const styles = useSpring({
from: { width: '0%' },
to: { width: `${progress}%` },
reset: true,
immediate: reduceMotion,
immediate: reduceMotion || !active, // If this is not active, update the UI immediately.
});
if (!active) {
return null;
}
let message;
if (isProcessing) {
message = (
<FormattedMessage
id='upload_progress.processing'
defaultMessage='Processing…'
/>
);
} else {
message = (
<FormattedMessage
id='upload_progress.label'
defaultMessage='Uploading…'
/>
);
}
return (
<div className='upload-progress'>
<Icon id='upload' icon={UploadFileIcon} />
<div className='upload-progress__message'>
{message}
{isProcessing ? (
<FormattedMessage
id='upload_progress.processing'
defaultMessage='Processing…'
/>
) : (
<FormattedMessage
id='upload_progress.label'
defaultMessage='Uploading…'
/>
)}
<div className='upload-progress__backdrop'>
<animated.div className='upload-progress__tracker' style={styles} />