|
|
@ -84,49 +84,57 @@ const Icon = ({iconRecord, verticalIconPlugin, contextMenuAction, theme}: IconPr |
|
|
|
} |
|
|
|
} |
|
|
|
}, []) |
|
|
|
}, []) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const stylePC = iconRecord.active ? 'flex-start' : 'center' |
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<> |
|
|
|
<> |
|
|
|
<CustomTooltip |
|
|
|
<div className='d-flex py-1' style={{width: 'auto', placeContent: stylePC}}>
|
|
|
|
placement={name === 'settings' ? 'right' : name === 'search' ? 'top' : name === 'udapp' ? 'bottom' : 'top'} |
|
|
|
{iconRecord.active && <div |
|
|
|
tooltipText={title} |
|
|
|
className='pt-1 bg-primary' |
|
|
|
delay={{show: 1000, hide: 0}} |
|
|
|
style={{width: "6px", height: "36px", position: 'relative', borderRadius: '24%'}} |
|
|
|
> |
|
|
|
></div>} |
|
|
|
<div |
|
|
|
<CustomTooltip |
|
|
|
className={`remixui_icon m-2 pt-1`} |
|
|
|
placement={name === 'settings' ? 'right' : name === 'search' ? 'top' : name === 'udapp' ? 'bottom' : 'top'} |
|
|
|
onClick={() => { |
|
|
|
tooltipText={title} |
|
|
|
;(verticalIconPlugin as any).toggle(name) |
|
|
|
delay={{show: 1000, hide: 0}} |
|
|
|
}} |
|
|
|
|
|
|
|
{...{plugin: name}} |
|
|
|
|
|
|
|
onContextMenu={(e: any) => { |
|
|
|
|
|
|
|
e.preventDefault() |
|
|
|
|
|
|
|
e.stopPropagation() |
|
|
|
|
|
|
|
handleContextMenu(e) |
|
|
|
|
|
|
|
}} |
|
|
|
|
|
|
|
data-id={`verticalIconsKind${name}`} |
|
|
|
|
|
|
|
id={`verticalIconsKind${name}`} |
|
|
|
|
|
|
|
ref={iconRef} |
|
|
|
|
|
|
|
> |
|
|
|
> |
|
|
|
<img |
|
|
|
<div |
|
|
|
data-id={iconRecord.active ? `selected` : ''} |
|
|
|
className={`remixui_icon m-0 pt-1`} |
|
|
|
className={`${theme === 'dark' ? 'invert' : ''} ${theme} remixui_image ${iconRecord.active ? `selected-${theme}` : ''}`} |
|
|
|
onClick={() => { |
|
|
|
src={icon} |
|
|
|
;(verticalIconPlugin as any).toggle(name) |
|
|
|
alt={name} |
|
|
|
}} |
|
|
|
|
|
|
|
{...{plugin: name}} |
|
|
|
|
|
|
|
onContextMenu={(e: any) => { |
|
|
|
|
|
|
|
e.preventDefault() |
|
|
|
|
|
|
|
e.stopPropagation() |
|
|
|
|
|
|
|
handleContextMenu(e) |
|
|
|
|
|
|
|
}} |
|
|
|
|
|
|
|
data-id={`verticalIconsKind${name}`} |
|
|
|
|
|
|
|
id={`verticalIconsKind${name}`} |
|
|
|
|
|
|
|
ref={iconRef} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<img |
|
|
|
|
|
|
|
data-id={iconRecord.active ? `selected` : ''} |
|
|
|
|
|
|
|
className={`${theme === 'dark' ? 'invert' : ''} ${theme} remixui_image ${iconRecord.active ? `selected-${theme}` : ''}`} |
|
|
|
|
|
|
|
src={icon} |
|
|
|
|
|
|
|
alt={name} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
<Badge badgeStatus={badgeStatus} /> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</CustomTooltip> |
|
|
|
|
|
|
|
{showContext ? ( |
|
|
|
|
|
|
|
<VerticalIconsContextMenu |
|
|
|
|
|
|
|
pageX={pageX} |
|
|
|
|
|
|
|
pageY={pageY} |
|
|
|
|
|
|
|
links={links} |
|
|
|
|
|
|
|
profileName={name} |
|
|
|
|
|
|
|
hideContextMenu={closeContextMenu} |
|
|
|
|
|
|
|
canBeDeactivated={canDeactivate} |
|
|
|
|
|
|
|
verticalIconPlugin={verticalIconPlugin} |
|
|
|
|
|
|
|
contextMenuAction={contextMenuAction} |
|
|
|
/> |
|
|
|
/> |
|
|
|
<Badge badgeStatus={badgeStatus} /> |
|
|
|
) : null} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</CustomTooltip> |
|
|
|
|
|
|
|
{showContext ? ( |
|
|
|
|
|
|
|
<VerticalIconsContextMenu |
|
|
|
|
|
|
|
pageX={pageX} |
|
|
|
|
|
|
|
pageY={pageY} |
|
|
|
|
|
|
|
links={links} |
|
|
|
|
|
|
|
profileName={name} |
|
|
|
|
|
|
|
hideContextMenu={closeContextMenu} |
|
|
|
|
|
|
|
canBeDeactivated={canDeactivate} |
|
|
|
|
|
|
|
verticalIconPlugin={verticalIconPlugin} |
|
|
|
|
|
|
|
contextMenuAction={contextMenuAction} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
) : null} |
|
|
|
|
|
|
|
</> |
|
|
|
</> |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|