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,3 +1,5 @@
import { t } from "@lingui/core/macro"
import { Trans } from "@lingui/react/macro";
import { useAuth } from "../hooks/useAuth.ts";
import { useFollows } from "../hooks/useFollows.ts";
@@ -29,10 +31,10 @@ export function FollowUserButton(
onClick={() =>
isFollowing ? unfollowUser(targetUserId) : followUser(targetUserId)}
aria-label={isFollowing
? `Unfollow ${targetUsername}`
: `Follow ${targetUsername}`}
? t`Unfollow ${targetUsername}`
: t`Follow ${targetUsername}`}
>
{isFollowing ? "Following" : "Follow"}
{isFollowing ? <Trans>Following</Trans> : <Trans>Follow</Trans>}
</button>
);
}
@@ -57,9 +59,9 @@ export function FollowPlaylistButton(
isFollowing
? unfollowPlaylist(targetPlaylistId)
: followPlaylist(targetPlaylistId)}
aria-label={isFollowing ? "Unfollow playlist" : "Follow playlist"}
aria-label={isFollowing ? t`Unfollow playlist` : t`Follow playlist`}
>
{isFollowing ? "Following" : "Follow"}
{isFollowing ? <Trans>Following</Trans> : <Trans>Follow</Trans>}
</button>
);
}