diff --git a/ivette/src/renderer/Laboratory.tsx b/ivette/src/renderer/Laboratory.tsx index 7c3287e930d1661e717073d10ac1081dd9bdbc87..30b0f3ed72c2ff3a9a140cc395372c53d92d12c2 100644 --- a/ivette/src/renderer/Laboratory.tsx +++ b/ivette/src/renderer/Laboratory.tsx @@ -379,12 +379,16 @@ function CustomViews(props: CustomViewsProps): JSX.Element { setLocal({ current: newCurrent, shapes }); }; + const onView = (action: string) => + isCurrent ? `${action} View` : `${action} View (${view.label})`; + const hasRename = !edited && isCustom; + Dome.popupMenu([ - { label: 'Rename View', display: (!edited && isCustom), onClick: RENAME }, + { label: onView('Rename'), display: hasRename, onClick: RENAME }, { label: 'Restore Default', display: isCurrent, onClick: DEFAULT }, - { label: 'Duplicate View', onClick: DUPLICATE }, + { label: onView('Duplicate'), onClick: DUPLICATE }, 'separator', - { label: 'Remove View', display: isCustom, onClick: REMOVE }, + { label: onView('Remove'), display: isCustom, onClick: REMOVE }, ]); };