mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-07-17 18:03:01 +01:00
Some checks are pending
🏗️ Build Apps / 🤖 Build Android APK (Phone) (push) Waiting to run
🏗️ Build Apps / 🤖 Build Android APK (TV) (push) Waiting to run
🏗️ Build Apps / 🍎 Build iOS IPA (Phone) (push) Waiting to run
🏗️ Build Apps / 🍎 Build iOS IPA (Phone - Unsigned) (push) Waiting to run
🏗️ Build Apps / 🍎 Build tvOS IPA (push) Waiting to run
🏗️ Build Apps / 🍎 Build tvOS IPA (Unsigned) (push) Waiting to run
🔒 Lockfile Consistency Check / 🔍 Check bun.lock and package.json consistency (push) Waiting to run
🛡️ CodeQL Analysis / 🔎 Analyze with CodeQL (actions) (push) Waiting to run
🛡️ CodeQL Analysis / 🔎 Analyze with CodeQL (javascript-typescript) (push) Waiting to run
🏷️🔀Merge Conflict Labeler / 🏷️ Labeling Merge Conflicts (push) Waiting to run
🌐 Translation Sync / sync-translations (push) Waiting to run
🚦 Security & Quality Gate / 🔍 Vulnerable Dependencies (push) Waiting to run
🚦 Security & Quality Gate / 🚑 Expo Doctor Check (push) Waiting to run
🚦 Security & Quality Gate / 🔍 Lint & Test (check) (push) Waiting to run
🚦 Security & Quality Gate / 🔍 Lint & Test (format) (push) Waiting to run
🚦 Security & Quality Gate / 🔍 Lint & Test (i18n:check) (push) Waiting to run
🚦 Security & Quality Gate / 🔍 Lint & Test (lint) (push) Waiting to run
🚦 Security & Quality Gate / 🔍 Lint & Test (typecheck) (push) Waiting to run
🛡️ Trivy Security Scan / 🔎 Filesystem scan (push) Waiting to run
97 lines
3.2 KiB
TypeScript
97 lines
3.2 KiB
TypeScript
import type React from "react";
|
|
import { useMemo } from "react";
|
|
import { useTranslation } from "react-i18next";
|
|
import { Linking, Switch } from "react-native";
|
|
import DisabledSetting from "@/components/settings/DisabledSetting";
|
|
import useRouter from "@/hooks/useAppRouter";
|
|
import { useSettings } from "@/utils/atoms/settings";
|
|
import { ListGroup } from "../list/ListGroup";
|
|
import { ListItem } from "../list/ListItem";
|
|
|
|
export const AppearanceSettings: React.FC = () => {
|
|
const router = useRouter();
|
|
const { settings, updateSettings, pluginSettings } = useSettings();
|
|
const { t } = useTranslation();
|
|
|
|
const disabled = useMemo(
|
|
() =>
|
|
pluginSettings?.showCustomMenuLinks?.locked === true &&
|
|
pluginSettings?.hiddenLibraries?.locked === true,
|
|
[pluginSettings],
|
|
);
|
|
|
|
if (!settings) return null;
|
|
|
|
return (
|
|
<DisabledSetting disabled={disabled}>
|
|
<ListGroup title={t("home.settings.appearance.title")} className=''>
|
|
<ListItem
|
|
title={t("home.settings.other.show_custom_menu_links")}
|
|
subtitle={t("home.settings.other.show_custom_menu_links_hint")}
|
|
disabled={pluginSettings?.showCustomMenuLinks?.locked}
|
|
onPress={() =>
|
|
Linking.openURL(
|
|
"https://jellyfin.org/docs/general/clients/web-config/#custom-menu-links",
|
|
)
|
|
}
|
|
>
|
|
<Switch
|
|
value={settings.showCustomMenuLinks}
|
|
disabled={pluginSettings?.showCustomMenuLinks?.locked}
|
|
onValueChange={(value) =>
|
|
updateSettings({ showCustomMenuLinks: value })
|
|
}
|
|
/>
|
|
</ListItem>
|
|
<ListItem
|
|
title={t("home.settings.appearance.merge_next_up_continue_watching")}
|
|
subtitle={t(
|
|
"home.settings.appearance.merge_next_up_continue_watching_hint",
|
|
)}
|
|
>
|
|
<Switch
|
|
value={settings.mergeNextUpAndContinueWatching}
|
|
onValueChange={(value) =>
|
|
updateSettings({ mergeNextUpAndContinueWatching: value })
|
|
}
|
|
/>
|
|
</ListItem>
|
|
<ListItem
|
|
title={t("home.settings.appearance.use_episode_images_next_up")}
|
|
subtitle={t(
|
|
"home.settings.appearance.use_episode_images_next_up_hint",
|
|
)}
|
|
>
|
|
<Switch
|
|
value={settings.useEpisodeImagesForNextUp}
|
|
onValueChange={(value) =>
|
|
updateSettings({ useEpisodeImagesForNextUp: value })
|
|
}
|
|
/>
|
|
</ListItem>
|
|
<ListItem
|
|
onPress={() =>
|
|
router.push("/settings/appearance/hide-libraries/page")
|
|
}
|
|
title={t("home.settings.other.hide_libraries")}
|
|
subtitle={t("home.settings.other.select_libraries_you_want_to_hide")}
|
|
showArrow
|
|
/>
|
|
<ListItem
|
|
title={t("home.settings.appearance.hide_remote_session_button")}
|
|
subtitle={t(
|
|
"home.settings.appearance.hide_remote_session_button_hint",
|
|
)}
|
|
>
|
|
<Switch
|
|
value={settings.hideRemoteSessionButton}
|
|
onValueChange={(value) =>
|
|
updateSettings({ hideRemoteSessionButton: value })
|
|
}
|
|
/>
|
|
</ListItem>
|
|
</ListGroup>
|
|
</DisabledSetting>
|
|
);
|
|
};
|