Skip to content

Commit 5debdb4

Browse files
PmmlabsPmmlabs
andauthored
fix(ui): add "never" i18n string, fix "Favorite" tooltip (#965)
* fix(ui): add "never" i18n string, fix "Favorite" tooltip * format * format --------- Co-authored-by: Pmmlabs <[email protected]>
1 parent 0570438 commit 5debdb4

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

packages/web/public/i18n/locales/en/nodes.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@
4747
"direct": "Direct",
4848
"away": "away",
4949
"viaMqtt": ", via MQTT"
50+
},
51+
"lastHeardStatus": {
52+
"never": "Never"
5053
}
5154
},
5255

packages/web/src/components/UI/Avatar.tsx

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
Tooltip,
55
TooltipArrow,
66
TooltipContent,
7+
TooltipPortal,
78
TooltipProvider,
89
TooltipTrigger,
910
} from "@components/UI/Tooltip.tsx";
@@ -78,10 +79,12 @@ export const Avatar = ({
7879
}}
7980
/>
8081
</TooltipTrigger>
81-
<TooltipContent className="bg-slate-800 dark:bg-slate-600 text-white px-4 py-1 rounded text-xs">
82-
{t("nodeDetail.favorite.label", { ns: "nodes" })}
83-
<TooltipArrow className="fill-slate-800 dark:fill-slate-600" />
84-
</TooltipContent>
82+
<TooltipPortal>
83+
<TooltipContent className="bg-slate-800 dark:bg-slate-600 text-white px-4 py-1 rounded text-xs">
84+
{t("nodeDetail.favorite.label", { ns: "nodes" })}
85+
<TooltipArrow className="fill-slate-800 dark:fill-slate-600" />
86+
</TooltipContent>
87+
</TooltipPortal>
8588
</Tooltip>
8689
</TooltipProvider>
8790
) : null}
@@ -94,10 +97,12 @@ export const Avatar = ({
9497
aria-hidden="true"
9598
/>
9699
</TooltipTrigger>
97-
<TooltipContent className="bg-slate-800 dark:bg-slate-600 text-white px-4 py-1 rounded text-xs">
98-
{t("nodeDetail.error.label", { ns: "nodes" })}
99-
<TooltipArrow className="fill-slate-800 dark:fill-slate-600" />
100-
</TooltipContent>
100+
<TooltipPortal>
101+
<TooltipContent className="bg-slate-800 dark:bg-slate-600 text-white px-4 py-1 rounded text-xs">
102+
{t("nodeDetail.error.label", { ns: "nodes" })}
103+
<TooltipArrow className="fill-slate-800 dark:fill-slate-600" />
104+
</TooltipContent>
105+
</TooltipPortal>
101106
</Tooltip>
102107
</TooltipProvider>
103108
) : null}

0 commit comments

Comments
 (0)