Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update from main #1043

Open
wants to merge 20 commits into
base: production
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
133 changes: 67 additions & 66 deletions README.md

Large diffs are not rendered by default.

452 changes: 275 additions & 177 deletions package-lock.json

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@
"readme:i18n-volunteers": "node scripts/update-i18n-volunteers-readme.js"
},
"dependencies": {
"@formatjs/intl-localematcher": "~0.5.10",
"@formatjs/intl-segmenter": "~11.7.8",
"@formatjs/intl-localematcher": "~0.6.0",
"@formatjs/intl-segmenter": "~11.7.9",
"@formkit/auto-animate": "~0.8.2",
"@github/text-expander-element": "~2.8.0",
"@github/text-expander-element": "~2.9.1",
"@iconify-icons/mingcute": "~1.2.9",
"@justinribeiro/lite-youtube": "~1.6.0",
"@lingui/detect-locale": "~5.1.2",
"@lingui/macro": "~5.1.2",
"@lingui/react": "~5.1.2",
"@justinribeiro/lite-youtube": "~1.7.1",
"@lingui/detect-locale": "~5.2.0",
"@lingui/macro": "~5.2.0",
"@lingui/react": "~5.2.0",
"@szhsin/react-menu": "~4.3.0",
"chroma-js": "~3.1.2",
"compare-versions": "~6.1.1",
"fast-blurhash": "~1.1.4",
"fast-equals": "~5.2.2",
"fuse.js": "~7.0.0",
"fuse.js": "~7.1.0",
"html-prettify": "~1.0.7",
"idb-keyval": "~6.2.1",
"intl-locale-textinfo-polyfill": "~2.1.1",
Expand All @@ -55,21 +55,21 @@
"use-debounce": "~10.0.4",
"use-long-press": "~3.2.0",
"use-resize-observer": "~9.1.0",
"valtio": "2.1.2"
"valtio": "2.1.3"
},
"devDependencies": {
"@ianvs/prettier-plugin-sort-imports": "~4.4.1",
"@lingui/cli": "~5.1.2",
"@lingui/vite-plugin": "~5.1.2",
"@preact/preset-vite": "~2.10.0",
"@lingui/cli": "~5.2.0",
"@lingui/vite-plugin": "~5.2.0",
"@preact/preset-vite": "~2.10.1",
"babel-plugin-macros": "~3.1.0",
"postcss": "~8.5.1",
"postcss": "~8.5.2",
"postcss-dark-theme-class": "~1.3.0",
"postcss-preset-env": "~10.1.3",
"prettier": "3.4.2",
"prettier": "3.5.0",
"sonda": "~0.7.1",
"twitter-text": "~3.1.0",
"vite": "~6.0.11",
"vite": "~6.1.0",
"vite-plugin-generate-file": "~0.2.0",
"vite-plugin-html-config": "~2.0.2",
"vite-plugin-pwa": "~0.21.1",
Expand Down
Binary file modified public/favicon.ico
Binary file not shown.
4 changes: 2 additions & 2 deletions src/components/compose.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ const MENTION_RE = new RegExp(

// AI-generated, all other regexes are too complicated
const HASHTAG_RE = new RegExp(
`(^|[^=\\/\\w])(#[a-z0-9_]+([a-z0-9_.]+[a-z0-9_]+)?)(?![\\/\\w])`,
'ig',
`(^|[^=\\/\\w])(#[\\p{L}\\p{N}_]+([\\p{L}\\p{N}_.]+[\\p{L}\\p{N}_]+)?)(?![\\/\\w])`,
'iug',
);

// https://github.com/mastodon/mastodon/blob/23e32a4b3031d1da8b911e0145d61b4dd47c4f96/app/models/custom_emoji.rb#L31
Expand Down
21 changes: 18 additions & 3 deletions src/components/media.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useLingui } from '@lingui/react/macro';
import { Trans, useLingui } from '@lingui/react/macro';
import { getBlurHashAverageColor } from 'fast-blurhash';
import { Fragment } from 'preact';
import { memo } from 'preact/compat';
Expand Down Expand Up @@ -165,9 +165,12 @@ function Media({
onUpdate,
};

const [mediaLoadError, setMediaLoadError] = useState(false);

const Parent = useMemo(
() => (to ? (props) => <Link to={to} {...props} /> : 'div'),
[to],
() =>
to && !mediaLoadError ? (props) => <Link to={to} {...props} /> : 'div',
[to, mediaLoadError],
);

const remoteMediaURLObj = remoteMediaURL ? getURLObj(remoteMediaURL) : null;
Expand Down Expand Up @@ -392,6 +395,8 @@ function Media({
const { src } = e.target;
if (src === mediaURL && mediaURL !== remoteMediaURL) {
e.target.src = remoteMediaURL;
} else {
setMediaLoadError(true);
}
}}
/>
Expand All @@ -401,6 +406,16 @@ function Media({
</>
)}
</Parent>
{mediaLoadError && (
<div>
<a href={remoteUrl} class="button plain6 small" target="_blank">
<Icon icon="external" />{' '}
<span>
<Trans>Open file</Trans>
</span>
</a>
</div>
)}
</Figure>
);
} else if (type === 'gifv' || type === 'video' || isVideoMaybe) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/timeline.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import NavMenu from './nav-menu';
import Status from './status';

const scrollIntoViewOptions = {
block: 'nearest',
block: 'start',
inline: 'center',
behavior: 'smooth',
};
Expand Down
8 changes: 4 additions & 4 deletions src/data/catalogs.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"code": "de-DE",
"nativeName": "Deutsch",
"name": "German",
"completion": 89
"completion": 94
},
{
"code": "eo-UY",
Expand Down Expand Up @@ -87,7 +87,7 @@
"code": "kab",
"nativeName": "Taqbaylit",
"name": "Kabyle",
"completion": 93
"completion": 92
},
{
"code": "ko-KR",
Expand All @@ -105,7 +105,7 @@
"code": "nb-NO",
"nativeName": "norsk bokmål",
"name": "Norwegian Bokmål",
"completion": 47
"completion": 50
},
{
"code": "nl-NL",
Expand All @@ -117,7 +117,7 @@
"code": "pl-PL",
"nativeName": "polski",
"name": "Polish",
"completion": 9
"completion": 47
},
{
"code": "pt-BR",
Expand Down
Loading
Loading