mirror of
https://github.com/vercel/eve.git
synced 2026-09-20 05:35:39 +08:00
Fix Web Chat header control overlap (#2703)
Signed-off-by: Timo Lins <me@timo.sh>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"eve": patch
|
||||
---
|
||||
|
||||
Generated Sign in with Vercel Web Chat starters now place the account control at the top-left, opposite the new-chat action, with a smaller profile image.
|
||||
+9
-5
@@ -116,14 +116,14 @@ export function AccountControl({
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="fixed top-3 right-3 z-10">
|
||||
<div className="fixed top-3 left-4 z-30 flex h-8 items-center">
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button
|
||||
aria-label={`Open account menu for ${name}`}
|
||||
className="size-9 cursor-pointer overflow-hidden rounded-full p-0"
|
||||
size="icon"
|
||||
variant="outline"
|
||||
className="relative size-7 cursor-pointer overflow-hidden rounded-full p-0"
|
||||
size="icon-sm"
|
||||
variant="ghost"
|
||||
>
|
||||
{image && !imageFailed ? (
|
||||
<img
|
||||
@@ -137,9 +137,13 @@ export function AccountControl({
|
||||
{initials}
|
||||
</span>
|
||||
)}
|
||||
<span
|
||||
aria-hidden="true"
|
||||
className="pointer-events-none absolute inset-0 rounded-full border border-black/20 dark:border-white/25"
|
||||
/>
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent align="end" className="w-64">
|
||||
<DropdownMenuContent align="start" className="w-64">
|
||||
<div className="min-w-0 px-2 py-1.5 text-sm">
|
||||
<span className="block truncate font-medium leading-5" title={name}>
|
||||
{name}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -362,7 +362,6 @@ describe("ensureChannel", () => {
|
||||
join(projectRoot, "app/_components/web-chat-auth.tsx"),
|
||||
"utf8",
|
||||
);
|
||||
expect(accountSource).toContain('className="size-9 cursor-pointer');
|
||||
expect(accountSource).toContain("Continue with Vercel");
|
||||
expect(accountSource).toContain('viewBox="0 0 24 20"');
|
||||
expect(accountSource).toContain('viewBox="0 0 169 53"');
|
||||
|
||||
Reference in New Issue
Block a user