mirror of
https://github.com/movie-web/movie-web.git
synced 2024-12-27 09:51:51 +01:00
add pretty language to menu selection
This commit is contained in:
parent
dbb1c19796
commit
e19ac55847
@ -36,6 +36,11 @@ export function SettingsMenu({ id }: { id: string }) {
|
|||||||
t("player.menus.subtitles.unknownLanguage")
|
t("player.menus.subtitles.unknownLanguage")
|
||||||
: undefined;
|
: undefined;
|
||||||
|
|
||||||
|
const selectedAudioLanguagePretty = currentAudioTrack
|
||||||
|
? getPrettyLanguageNameFromLocale(currentAudioTrack.language) ??
|
||||||
|
t("player.menus.subtitles.unknownLanguage")
|
||||||
|
: undefined;
|
||||||
|
|
||||||
const source = usePlayerStore((s) => s.source);
|
const source = usePlayerStore((s) => s.source);
|
||||||
|
|
||||||
const downloadable = source?.type === "file" || source?.type === "hls";
|
const downloadable = source?.type === "file" || source?.type === "hls";
|
||||||
@ -55,7 +60,7 @@ export function SettingsMenu({ id }: { id: string }) {
|
|||||||
{currentAudioTrack && (
|
{currentAudioTrack && (
|
||||||
<Menu.ChevronLink
|
<Menu.ChevronLink
|
||||||
onClick={() => router.navigate("/audio")}
|
onClick={() => router.navigate("/audio")}
|
||||||
rightText={currentAudioTrack ? currentAudioTrack.label : ""}
|
rightText={selectedAudioLanguagePretty ?? undefined}
|
||||||
>
|
>
|
||||||
{t("player.menus.settings.audioItem")}
|
{t("player.menus.settings.audioItem")}
|
||||||
</Menu.ChevronLink>
|
</Menu.ChevronLink>
|
||||||
|
Loading…
Reference in New Issue
Block a user