mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Show entity source on tooltip + use it for color (#2669)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
78c77a169a
commit
c057f3fc20
@ -116,7 +116,7 @@ export class HotbarIcon extends React.Component<Props> {
|
|||||||
|
|
||||||
generateAvatarStyle(entity: CatalogEntity): React.CSSProperties {
|
generateAvatarStyle(entity: CatalogEntity): React.CSSProperties {
|
||||||
return {
|
return {
|
||||||
"backgroundColor": randomColor({ seed: entity.metadata.name, luminosity: "dark" })
|
"backgroundColor": randomColor({ seed: `${entity.metadata.name}-${entity.metadata.source}`, luminosity: "dark" })
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -138,7 +138,7 @@ export class HotbarIcon extends React.Component<Props> {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={className}>
|
<div className={className}>
|
||||||
<Tooltip targetId={entityIconId}>{entity.metadata.name}</Tooltip>
|
<Tooltip targetId={entityIconId}>{entity.metadata.name} ({entity.metadata.source || "local"})</Tooltip>
|
||||||
<Avatar
|
<Avatar
|
||||||
{...elemProps}
|
{...elemProps}
|
||||||
id={entityIconId}
|
id={entityIconId}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user