diff --git a/frontend/src/components/tools/fullscreen/CompactToolItem.tsx b/frontend/src/components/tools/fullscreen/CompactToolItem.tsx index a49900099..f0e0981b6 100644 --- a/frontend/src/components/tools/fullscreen/CompactToolItem.tsx +++ b/frontend/src/components/tools/fullscreen/CompactToolItem.tsx @@ -3,6 +3,7 @@ import { ActionIcon, Text } from '@mantine/core'; import { useTranslation } from 'react-i18next'; import { Tooltip } from '../../shared/Tooltip'; import HotkeyDisplay from '../../hotkeys/HotkeyDisplay'; +import FavoriteStar from '../toolPicker/FavoriteStar'; import { ToolRegistryEntry, getSubcategoryColor } from '../../../data/toolsTaxonomy'; import { getIconBackground, getIconStyle, getItemClasses, useToolMeta } from './shared'; @@ -60,21 +61,13 @@ const CompactToolItem: React.FC = ({ id, tool, isSelected, {!disabled && ( - { e.stopPropagation(); toggleFavorite(); }} - className="tool-panel__fullscreen-star-compact" - aria-label={isFav ? t('toolPanel.fullscreen.unfavorite', 'Remove from favourites') : t('toolPanel.fullscreen.favorite', 'Add to favourites')} - > - {/* Star icons kept inline to avoid new dependency here */} - {isFav ? ( - star - ) : ( - star_border - )} - +
+ +
)} ); diff --git a/frontend/src/components/tools/fullscreen/DetailedToolItem.tsx b/frontend/src/components/tools/fullscreen/DetailedToolItem.tsx index ea1e766b4..9065c3d7f 100644 --- a/frontend/src/components/tools/fullscreen/DetailedToolItem.tsx +++ b/frontend/src/components/tools/fullscreen/DetailedToolItem.tsx @@ -2,6 +2,7 @@ import React from 'react'; import { ActionIcon, Text } from '@mantine/core'; import { useTranslation } from 'react-i18next'; import HotkeyDisplay from '../../hotkeys/HotkeyDisplay'; +import FavoriteStar from '../toolPicker/FavoriteStar'; import { ToolRegistryEntry, getSubcategoryColor } from '../../../data/toolsTaxonomy'; import { getIconBackground, getIconStyle, getItemClasses, useToolMeta } from './shared'; @@ -70,21 +71,13 @@ const DetailedToolItem: React.FC = ({ id, tool, isSelecte )} {!disabled && ( - { e.stopPropagation(); toggleFavorite(); }} - className="tool-panel__fullscreen-star" - aria-label={isFav ? t('toolPanel.fullscreen.unfavorite', 'Remove from favourites') : t('toolPanel.fullscreen.favorite', 'Add to favourites')} - > - {/* Star icons kept inline to avoid new dependency here */} - {isFav ? ( - star - ) : ( - star_border - )} - +
+ +
)} );