mirror of
https://github.com/streamyfin/streamyfin.git
synced 2025-08-20 18:37:18 +02:00
Screen Orientation Enum + Subtitle Mode
This commit is contained in:
@@ -98,17 +98,17 @@ export const OtherSettings: React.FC = () => {
|
||||
disabled={pluginSettings?.defaultVideoOrientation?.locked || settings.autoRotate}
|
||||
keyExtractor={String}
|
||||
titleExtractor={(item) =>
|
||||
ScreenOrientationEnum[item]
|
||||
t(ScreenOrientationEnum[item])
|
||||
}
|
||||
title={
|
||||
<TouchableOpacity className="flex flex-row items-center justify-between py-3 pl-3">
|
||||
<Text className="mr-1 text-[#8E8D91]">
|
||||
{ScreenOrientationEnum[settings.defaultVideoOrientation]}
|
||||
{t(ScreenOrientationEnum[settings.defaultVideoOrientation])}
|
||||
</Text>
|
||||
<Ionicons name="chevron-expand-sharp" size={18} color="#5A5960"/>
|
||||
</TouchableOpacity>
|
||||
}
|
||||
label="Orientation"
|
||||
label={t("home.settings.other.orientation")}
|
||||
onSelected={(defaultVideoOrientation) =>
|
||||
updateSettings({defaultVideoOrientation})
|
||||
}
|
||||
|
||||
@@ -31,6 +31,14 @@ export const SubtitleToggles: React.FC<Props> = ({ ...props }) => {
|
||||
SubtitlePlaybackMode.None,
|
||||
];
|
||||
|
||||
const subtitleModeKeys = {
|
||||
[SubtitlePlaybackMode.Default]: "home.settings.subtitles.modes.Default",
|
||||
[SubtitlePlaybackMode.Smart]: "home.settings.subtitles.modes.Smart",
|
||||
[SubtitlePlaybackMode.OnlyForced]: "home.settings.subtitles.modes.OnlyForced",
|
||||
[SubtitlePlaybackMode.Always]: "home.settings.subtitles.modes.Always",
|
||||
[SubtitlePlaybackMode.None]: "home.settings.subtitles.modes.None",
|
||||
};
|
||||
|
||||
return (
|
||||
<View {...props}>
|
||||
<ListGroup
|
||||
@@ -77,11 +85,11 @@ export const SubtitleToggles: React.FC<Props> = ({ ...props }) => {
|
||||
data={subtitleModes}
|
||||
disabled={pluginSettings?.subtitleMode?.locked}
|
||||
keyExtractor={String}
|
||||
titleExtractor={String}
|
||||
titleExtractor={(item) => t(subtitleModeKeys[item]) || String(item)}
|
||||
title={
|
||||
<TouchableOpacity className="flex flex-row items-center justify-between py-3 pl-3">
|
||||
<Text className="mr-1 text-[#8E8D91]">
|
||||
{settings?.subtitleMode || t("home.settings.subtitles.loading")}
|
||||
{t(subtitleModeKeys[settings?.subtitleMode]) || t("home.settings.subtitles.loading")}
|
||||
</Text>
|
||||
<Ionicons
|
||||
name="chevron-expand-sharp"
|
||||
|
||||
@@ -102,12 +102,32 @@
|
||||
"subtitle_hint": "Configure subtitle preference.",
|
||||
"none": "None",
|
||||
"language": "Language",
|
||||
"loading": "Loading"
|
||||
"loading": "Loading",
|
||||
"modes": {
|
||||
"Default": "Default",
|
||||
"Smart": "Smart",
|
||||
"Always": "Always",
|
||||
"None": "None",
|
||||
"OnlyForced": "OnlyForced"
|
||||
}
|
||||
},
|
||||
"other": {
|
||||
"other_title": "Other",
|
||||
"auto_rotate": "Auto rotate",
|
||||
"video_orientation": "Video orientation",
|
||||
"orientation": "Orientation",
|
||||
"orientations": {
|
||||
"DEFAULT": "Default",
|
||||
"ALL": "All",
|
||||
"PORTRAIT": "Portrait",
|
||||
"PORTRAIT_UP": "Portrait Up",
|
||||
"PORTRAIT_DOWN": "Portrait Down",
|
||||
"LANDSCAPE": "Landscape",
|
||||
"LANDSCAPE_LEFT": "Landscape Left",
|
||||
"LANDSCAPE_RIGHT": "Landscape Right",
|
||||
"OTHER": "Other",
|
||||
"UNKNOWN": "Unknown"
|
||||
},
|
||||
"safe_area_in_controls": "Safe area in controls",
|
||||
"show_custom_menu_links": "Show Custom Menu Links",
|
||||
"hide_libraries": "Hide Libraries",
|
||||
|
||||
@@ -102,12 +102,32 @@
|
||||
"subtitle_hint": "Configurez les préférences des sous-titres.",
|
||||
"none": "Aucune",
|
||||
"language": "Langage",
|
||||
"loading": "Chargement"
|
||||
"loading": "Chargement",
|
||||
"modes": {
|
||||
"Default": "Par défaut",
|
||||
"Smart": "Intelligent",
|
||||
"Always": "Toujours",
|
||||
"None": "Aucun",
|
||||
"OnlyForced": "Forcés seulement"
|
||||
}
|
||||
},
|
||||
"other": {
|
||||
"other_title": "Autres",
|
||||
"auto_rotate": "Rotation automatique",
|
||||
"video_orientation": "Orientation vidéo",
|
||||
"orientation": "Orientation",
|
||||
"orientations": {
|
||||
"DEFAULT": "Par défaut",
|
||||
"ALL": "Toutes",
|
||||
"PORTRAIT": "Portrait",
|
||||
"PORTRAIT_UP": "Portrait Haut",
|
||||
"PORTRAIT_DOWN": "Portrait Bas",
|
||||
"LANDSCAPE": "Paysage",
|
||||
"LANDSCAPE_LEFT": "Paysage Gauche",
|
||||
"LANDSCAPE_RIGHT": "Paysage Droite",
|
||||
"OTHER": "Autre",
|
||||
"UNKNOWN": "Inconnu"
|
||||
},
|
||||
"safe_area_in_controls": "Zone de sécurité dans les contrôles",
|
||||
"show_custom_menu_links": "Afficher les liens personnalisés",
|
||||
"hide_libraries": "Cacher des bibliothèques",
|
||||
|
||||
@@ -28,16 +28,16 @@ export const ScreenOrientationEnum: Record<
|
||||
ScreenOrientation.OrientationLock,
|
||||
string
|
||||
> = {
|
||||
[ScreenOrientation.OrientationLock.DEFAULT]: "Default",
|
||||
[ScreenOrientation.OrientationLock.ALL]: "All",
|
||||
[ScreenOrientation.OrientationLock.PORTRAIT]: "Portrait",
|
||||
[ScreenOrientation.OrientationLock.PORTRAIT_UP]: "Portrait Up",
|
||||
[ScreenOrientation.OrientationLock.PORTRAIT_DOWN]: "Portrait Down",
|
||||
[ScreenOrientation.OrientationLock.LANDSCAPE]: "Landscape",
|
||||
[ScreenOrientation.OrientationLock.LANDSCAPE_LEFT]: "Landscape Left",
|
||||
[ScreenOrientation.OrientationLock.LANDSCAPE_RIGHT]: "Landscape Right",
|
||||
[ScreenOrientation.OrientationLock.OTHER]: "Other",
|
||||
[ScreenOrientation.OrientationLock.UNKNOWN]: "Unknown",
|
||||
[ScreenOrientation.OrientationLock.DEFAULT]: "home.settings.other.orientations.DEFAULT",
|
||||
[ScreenOrientation.OrientationLock.ALL]: "home.settings.other.orientations.ALL",
|
||||
[ScreenOrientation.OrientationLock.PORTRAIT]: "home.settings.other.orientations.PORTRAIT",
|
||||
[ScreenOrientation.OrientationLock.PORTRAIT_UP]: "home.settings.other.orientations.PORTRAIT_UP",
|
||||
[ScreenOrientation.OrientationLock.PORTRAIT_DOWN]: "home.settings.other.orientations.PORTRAIT_DOWN",
|
||||
[ScreenOrientation.OrientationLock.LANDSCAPE]: "home.settings.other.orientations.LANDSCAPE",
|
||||
[ScreenOrientation.OrientationLock.LANDSCAPE_LEFT]: "home.settings.other.orientations.LANDSCAPE_LEFT",
|
||||
[ScreenOrientation.OrientationLock.LANDSCAPE_RIGHT]: "home.settings.other.orientations.LANDSCAPE_RIGHT",
|
||||
[ScreenOrientation.OrientationLock.OTHER]: "home.settings.other.orientations.OTHER",
|
||||
[ScreenOrientation.OrientationLock.UNKNOWN]: "home.settings.other.orientations.UNKNOWN",
|
||||
};
|
||||
|
||||
export const DownloadOptions: DownloadOption[] = [
|
||||
|
||||
Reference in New Issue
Block a user