Skip to content

Commit

Permalink
fix: account formatting when no user name
Browse files Browse the repository at this point in the history
  • Loading branch information
setchy committed Jun 8, 2024
1 parent 730f158 commit 665d7a5
Show file tree
Hide file tree
Showing 2 changed files with 244 additions and 221 deletions.
69 changes: 37 additions & 32 deletions src/routes/Accounts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,39 +92,44 @@ export const AccountsRoute: FC = () => {
className="flex justify-between items-center bg-gray-100 dark:bg-gray-900 rounded-md p-1 mb-4"
>
<div className="ml-2 text-xs">
<button
type="button"
className="cursor-pointer font-semibold mb-1 text-sm"
title="Open Profile"
onClick={() => openProfile(account)}
>
@{account.user.login}
<span
hidden={!account.user?.name}
className="pl-1 font-medium text-xs italic"
<div>
<button
type="button"
className="cursor-pointer font-semibold mb-1 text-sm"
title="Open Profile"
onClick={() => openProfile(account)}
>
- {account.user?.name}
</span>
</button>

<button
type="button"
className="cursor-pointer mb-1 ml-1 align-middle"
title="Open Host"
onClick={() => openHost(account.hostname)}
>
<PlatformIcon type={account.platform} size={12} />
{account.platform} - {account.hostname}
</button>
<button
type="button"
className="cursor-pointer ml-1 align-middle"
title="Open Developer Settings"
onClick={() => openDeveloperSettings(account)}
>
<AuthMethodIcon type={account.method} size={12} />
{account.method}
</button>
@{account.user.login}
<span
hidden={!account.user?.name}
className="pl-1 font-medium text-xs italic"
>
- {account.user?.name}
</span>
</button>
</div>
<div>
<button
type="button"
className="cursor-pointer mb-1 ml-1 align-middle"
title="Open Host"
onClick={() => openHost(account.hostname)}
>
<PlatformIcon type={account.platform} size={12} />
{account.platform} - {account.hostname}
</button>
</div>
<div>
<button
type="button"
className="cursor-pointer ml-1 align-middle"
title="Open Developer Settings"
onClick={() => openDeveloperSettings(account)}
>
<AuthMethodIcon type={account.method} size={12} />
{account.method}
</button>
</div>
</div>
<div>
<button
Expand Down
Loading

0 comments on commit 665d7a5

Please sign in to comment.