From 9cd55cf5447ec127c8c1a8edd60e684c0c320900 Mon Sep 17 00:00:00 2001 From: Fredrik Burmester Date: Sat, 3 Jan 2026 17:56:31 +0100 Subject: [PATCH] feat: setting to hide the item page header session button --- components/ItemContent.tsx | 22 +++++++++++++++------- components/settings/AppearanceSettings.tsx | 10 ++++++++++ translations/en.json | 3 ++- utils/atoms/settings.ts | 4 ++++ 4 files changed, 31 insertions(+), 8 deletions(-) diff --git a/components/ItemContent.tsx b/components/ItemContent.tsx index 42160372..5fe9da58 100644 --- a/components/ItemContent.tsx +++ b/components/ItemContent.tsx @@ -116,9 +116,10 @@ export const ItemContent: React.FC = React.memo( {!Platform.isTV && ( )} - {user?.Policy?.IsAdministrator && ( - - )} + {user?.Policy?.IsAdministrator && + !settings.hideRemoteSessionButton && ( + + )} @@ -134,9 +135,10 @@ export const ItemContent: React.FC = React.memo( {!Platform.isTV && ( )} - {user?.Policy?.IsAdministrator && ( - - )} + {user?.Policy?.IsAdministrator && + !settings.hideRemoteSessionButton && ( + + )} @@ -147,7 +149,13 @@ export const ItemContent: React.FC = React.memo( )), }); } - }, [item, navigation, user, itemWithSources]); + }, [ + item, + navigation, + user, + itemWithSources, + settings.hideRemoteSessionButton, + ]); useEffect(() => { if (item) { diff --git a/components/settings/AppearanceSettings.tsx b/components/settings/AppearanceSettings.tsx index f8ff8470..d4cb5523 100644 --- a/components/settings/AppearanceSettings.tsx +++ b/components/settings/AppearanceSettings.tsx @@ -67,6 +67,16 @@ export const AppearanceSettings: React.FC = () => { title={t("home.settings.other.hide_libraries")} showArrow /> + + + updateSettings({ hideRemoteSessionButton: value }) + } + /> + ); diff --git a/translations/en.json b/translations/en.json index 5b0fc7f9..583cfe0b 100644 --- a/translations/en.json +++ b/translations/en.json @@ -81,7 +81,8 @@ }, "appearance": { "title": "Appearance", - "merge_next_up_continue_watching": "Merge Continue Watching & Next Up" + "merge_next_up_continue_watching": "Merge Continue Watching & Next Up", + "hide_remote_session_button": "Hide Remote Session Button" }, "user_info": { "user_info_title": "User Info", diff --git a/utils/atoms/settings.ts b/utils/atoms/settings.ts index 3c1c229a..314e5a26 100644 --- a/utils/atoms/settings.ts +++ b/utils/atoms/settings.ts @@ -194,6 +194,8 @@ export type Settings = { mergeNextUpAndContinueWatching: boolean; // iOS video player selection videoPlayerIOS: VideoPlayerIOS; + // Appearance + hideRemoteSessionButton: boolean; }; export interface Lockable { @@ -268,6 +270,8 @@ export const defaultValues: Settings = { mergeNextUpAndContinueWatching: false, // iOS video player selection - default to VLC videoPlayerIOS: VideoPlayerIOS.VLC, + // Appearance + hideRemoteSessionButton: false, }; const loadSettings = (): Partial => {