From b835de7d6d09229452262e738b90c54fae7bf6d6 Mon Sep 17 00:00:00 2001 From: Jari Kolehmainen Date: Thu, 29 Apr 2021 11:22:30 +0300 Subject: [PATCH] show entity source on tooltip + use it for color Signed-off-by: Jari Kolehmainen --- src/renderer/components/hotbar/hotbar-icon.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/components/hotbar/hotbar-icon.tsx b/src/renderer/components/hotbar/hotbar-icon.tsx index 87699d2cfc..5bc6489c8c 100644 --- a/src/renderer/components/hotbar/hotbar-icon.tsx +++ b/src/renderer/components/hotbar/hotbar-icon.tsx @@ -116,7 +116,7 @@ export class HotbarIcon extends React.Component { generateAvatarStyle(entity: CatalogEntity): React.CSSProperties { 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 { return (
- {entity.metadata.name} + {entity.metadata.name} ({entity.metadata.source || "local"})