v3: added localization, use global player for uploaded audio/video files

This commit is contained in:
khannurien
2026-04-03 15:29:33 +00:00
parent 378b3ffa46
commit 0ce80398a4
64 changed files with 4248 additions and 941 deletions

View File

@@ -1,4 +1,6 @@
import { useMemo } from "react";
import { t } from "@lingui/core/macro"
import { Trans } from "@lingui/react/macro";
import { DumpCard } from "../../components/DumpCard.tsx";
import { ErrorCard } from "../../components/ErrorCard.tsx";
import { hotScore } from "../../utils/hotScore.ts";
@@ -24,10 +26,10 @@ export function HotFeed(
[dumps],
);
if (loading) return <p className="index-status">Loading</p>;
if (error) return <ErrorCard title="Failed to load" message={error} />;
if (loading) return <p className="index-status"><Trans>Loading</Trans></p>;
if (error) return <ErrorCard title={t`Failed to load`} message={error} />;
if (sorted.length === 0) {
return <p className="index-status">No dumps yet. Be the first!</p>;
return <p className="index-status"><Trans>No dumps yet. Be the first!</Trans></p>;
}
return (
@@ -47,9 +49,9 @@ export function HotFeed(
))}
</ul>
<div ref={sentinelRef} />
{loadingMore && <p className="feed-loading-more">Loading more</p>}
{loadingMore && <p className="feed-loading-more"><Trans>Loading more</Trans></p>}
{!hasMore && sorted.length > 0 && (
<p className="feed-end">You've reached the end.</p>
<p className="feed-end"><Trans>You've reached the end.</Trans></p>
)}
</>
);