From ec0e7256cbf5c7d8cfad9a387d0c163408187839 Mon Sep 17 00:00:00 2001 From: jeffvli Date: Tue, 6 May 2025 18:23:14 -0700 Subject: [PATCH] fix set rating click on context menu (#900) - star rating icon overriddes the pointer click event --- .../context-menu/context-menu-provider.tsx | 54 +++++++------------ 1 file changed, 18 insertions(+), 36 deletions(-) diff --git a/src/renderer/features/context-menu/context-menu-provider.tsx b/src/renderer/features/context-menu/context-menu-provider.tsx index 9a9065a3..b80bc9fc 100644 --- a/src/renderer/features/context-menu/context-menu-provider.tsx +++ b/src/renderer/features/context-menu/context-menu-provider.tsx @@ -97,6 +97,18 @@ const JELLYFIN_IGNORED_MENU_ITEMS: ContextMenuItemType[] = ['setRating', 'shareI const utils = isElectron() ? window.electron.utils : null; +function RatingIcon({ rating }: { rating: number }) { + return ( + + ); +} + export interface ContextMenuProviderProps { children: ReactNode; } @@ -835,62 +847,32 @@ export const ContextMenuProvider = ({ children }: ContextMenuProviderProps) => { children: [ { id: 'zeroStar', - label: ( - - ), + label: , onClick: () => handleUpdateRating(0), }, { id: 'oneStar', - label: ( - - ), + label: , onClick: () => handleUpdateRating(1), }, { id: 'twoStar', - label: ( - - ), + label: , onClick: () => handleUpdateRating(2), }, { id: 'threeStar', - label: ( - - ), + label: , onClick: () => handleUpdateRating(3), }, { id: 'fourStar', - label: ( - - ), + label: , onClick: () => handleUpdateRating(4), }, { id: 'fiveStar', - label: ( - - ), + label: , onClick: () => handleUpdateRating(5), }, ],