mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-06-25 23:30:33 +01:00
- spacing: top padding + inter-group gaps so section titles, descriptions and buttons no longer touch (playback buffer, audio/subtitles, music, marlin, kefin, streamystats, storage, hide-libraries) - ListGroup: skip empty section titles - SettingSwitch: cap the native Android switch in a fixed centered box so toggle rows match the other rows and stay put when toggled; iOS unchanged - Appearance: move "Hide libraries" to the end of the list
77 lines
2.5 KiB
TypeScript
77 lines
2.5 KiB
TypeScript
import type React from "react";
|
|
import { useMemo } from "react";
|
|
import { useTranslation } from "react-i18next";
|
|
import { Linking } from "react-native";
|
|
import { SettingSwitch } from "@/components/common/SettingSwitch";
|
|
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")}
|
|
disabled={pluginSettings?.showCustomMenuLinks?.locked}
|
|
onPress={() =>
|
|
Linking.openURL(
|
|
"https://jellyfin.org/docs/general/clients/web-config/#custom-menu-links",
|
|
)
|
|
}
|
|
>
|
|
<SettingSwitch
|
|
value={settings.showCustomMenuLinks}
|
|
disabled={pluginSettings?.showCustomMenuLinks?.locked}
|
|
onValueChange={(value) =>
|
|
updateSettings({ showCustomMenuLinks: value })
|
|
}
|
|
/>
|
|
</ListItem>
|
|
<ListItem
|
|
title={t("home.settings.appearance.merge_next_up_continue_watching")}
|
|
>
|
|
<SettingSwitch
|
|
value={settings.mergeNextUpAndContinueWatching}
|
|
onValueChange={(value) =>
|
|
updateSettings({ mergeNextUpAndContinueWatching: value })
|
|
}
|
|
/>
|
|
</ListItem>
|
|
<ListItem
|
|
title={t("home.settings.appearance.hide_remote_session_button")}
|
|
>
|
|
<SettingSwitch
|
|
value={settings.hideRemoteSessionButton}
|
|
onValueChange={(value) =>
|
|
updateSettings({ hideRemoteSessionButton: value })
|
|
}
|
|
/>
|
|
</ListItem>
|
|
<ListItem
|
|
onPress={() =>
|
|
router.push("/settings/appearance/hide-libraries/page")
|
|
}
|
|
title={t("home.settings.other.hide_libraries")}
|
|
showArrow
|
|
/>
|
|
</ListGroup>
|
|
</DisabledSetting>
|
|
);
|
|
};
|