fix: fallback to user email when username is unset (#237)

This commit is contained in:
Gabe Cook
2025-06-05 22:06:38 -05:00
committed by GitHub
parent 2f316176c8
commit a298686d6b
2 changed files with 5 additions and 3 deletions
@@ -63,7 +63,9 @@ export default function MachineRow({
>
{node.givenName}
</p>
<p className="text-sm opacity-50">{node.user.name}</p>
<p className="text-sm opacity-50">
{node.user.name ?? node.user.email}
</p>
<div className="flex gap-1 flex-wrap mt-1.5">
{mapTagsToComponents(node, uiTags)}
{node.validTags.map((tag) => (
+2 -2
View File
@@ -109,7 +109,7 @@ export default function Page() {
</span>
<div className="flex items-center gap-x-2.5 mt-1">
<UserCircle />
{node.user.name}
{node.user.name ?? node.user.email}
</div>
</div>
<div className="p-2 pl-4">
@@ -254,7 +254,7 @@ export default function Page() {
className="w-full max-w-full grid grid-cols-1 lg:grid-cols-2 gap-y-2 sm:gap-x-12"
>
<div className="flex flex-col gap-1">
<Attribute name="Creator" value={node.user.name} />
<Attribute name="Creator" value={node.user.name ?? node.user.email} />
<Attribute name="Machine name" value={node.givenName} />
<Attribute
tooltip="OS hostname is published by the machines operating system and is used as the default name for the machine."