mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-01-15 23:59:08 +00:00
Some checks failed
🏗️ Build Apps / 🤖 Build Android APK (Phone) (push) Has been cancelled
🏗️ Build Apps / 🤖 Build Android APK (TV) (push) Has been cancelled
🏗️ Build Apps / 🍎 Build iOS IPA (Phone) (push) Has been cancelled
🔒 Lockfile Consistency Check / 🔍 Check bun.lock and package.json consistency (push) Has been cancelled
🛡️ CodeQL Analysis / 🔎 Analyze with CodeQL (actions) (push) Has been cancelled
🛡️ CodeQL Analysis / 🔎 Analyze with CodeQL (javascript-typescript) (push) Has been cancelled
🏷️🔀Merge Conflict Labeler / 🏷️ Labeling Merge Conflicts (push) Has been cancelled
🚦 Security & Quality Gate / 📝 Validate PR Title (push) Has been cancelled
🚦 Security & Quality Gate / 🔍 Vulnerable Dependencies (push) Has been cancelled
🚦 Security & Quality Gate / 🚑 Expo Doctor Check (push) Has been cancelled
🚦 Security & Quality Gate / 🔍 Lint & Test (check) (push) Has been cancelled
🚦 Security & Quality Gate / 🔍 Lint & Test (format) (push) Has been cancelled
🚦 Security & Quality Gate / 🔍 Lint & Test (lint) (push) Has been cancelled
🚦 Security & Quality Gate / 🔍 Lint & Test (typecheck) (push) Has been cancelled
🌐 Translation Sync / sync-translations (push) Has been cancelled
64 lines
2.1 KiB
TypeScript
64 lines
2.1 KiB
TypeScript
import { useRouter } from "expo-router";
|
|
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 { 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")}
|
|
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.other.show_large_home_carousel")}>
|
|
<Switch
|
|
value={settings.showLargeHomeCarousel}
|
|
onValueChange={(value) =>
|
|
updateSettings({ showLargeHomeCarousel: value })
|
|
}
|
|
/>
|
|
</ListItem>
|
|
<ListItem
|
|
onPress={() =>
|
|
router.push("/settings/appearance/hide-libraries/page")
|
|
}
|
|
title={t("home.settings.other.hide_libraries")}
|
|
showArrow
|
|
/>
|
|
</ListGroup>
|
|
</DisabledSetting>
|
|
);
|
|
};
|