Keep the conversation header's meta on one line with the workspace
This commit is contained in:
@@ -5,9 +5,9 @@ import { twMerge } from "tailwind-merge";
|
|||||||
import profileImageUrls from "@/src/utils/profile-image-urls";
|
import profileImageUrls from "@/src/utils/profile-image-urls";
|
||||||
|
|
||||||
const WorkspaceAvatarSizes = {
|
const WorkspaceAvatarSizes = {
|
||||||
xs: { box: "size-[18px] rounded-[4px]", icon: 12 },
|
xs: { box: "size-[18px] min-w-[18px] rounded-[4px]", icon: 12 },
|
||||||
sm: { box: "size-8 rounded-default-sm", icon: 16 },
|
sm: { box: "size-8 min-w-8 rounded-default-sm", icon: 16 },
|
||||||
lg: { box: "size-14 rounded-default", icon: 24 },
|
lg: { box: "size-14 min-w-14 rounded-default", icon: 24 },
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
|||||||
@@ -57,19 +57,23 @@ export default function ConversationHeader({
|
|||||||
{bot.name}
|
{bot.name}
|
||||||
</H1>
|
</H1>
|
||||||
|
|
||||||
|
<Row className="flex-nowrap w-full">
|
||||||
{workspace?.id ? (
|
{workspace?.id ? (
|
||||||
<Row className="min-w-0 w-full gap-2! flex-nowrap">
|
<Row className="min-w-0 gap-2! flex-nowrap">
|
||||||
<WorkspaceAvatar
|
<WorkspaceAvatar
|
||||||
image_media_id={workspace.image_media_id}
|
image_media_id={workspace.image_media_id}
|
||||||
size="xs"
|
size="xs"
|
||||||
/>
|
/>
|
||||||
<Span size="smaller" className="truncate">
|
<Span
|
||||||
|
size="smaller"
|
||||||
|
className="truncate hidden xl:block"
|
||||||
|
>
|
||||||
{workspace.name || "Workspace"}
|
{workspace.name || "Workspace"}
|
||||||
</Span>
|
</Span>
|
||||||
</Row>
|
</Row>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
<Row className="min-w-0 w-full gap-x-1! md:gap-x-3! gap-y-0! flex-nowrap">
|
<Row className="min-w-0 gap-x-1! md:gap-x-3! gap-y-0! flex-nowrap grow">
|
||||||
<HeaderMetaItem
|
<HeaderMetaItem
|
||||||
icon={CpuAi}
|
icon={CpuAi}
|
||||||
label="Model"
|
label="Model"
|
||||||
@@ -87,6 +91,7 @@ export default function ConversationHeader({
|
|||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
</Row>
|
</Row>
|
||||||
|
</Row>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|
||||||
<Row className="ml-auto shrink-0 flex-nowrap justify-end">
|
<Row className="ml-auto shrink-0 flex-nowrap justify-end">
|
||||||
|
|||||||
@@ -26,14 +26,14 @@ export default function HeaderMetaItem({
|
|||||||
return (
|
return (
|
||||||
<Row
|
<Row
|
||||||
title={`${label}: ${text}`}
|
title={`${label}: ${text}`}
|
||||||
className="min-w-0 shrink gap-1.5! flex-nowrap text-[13px] leading-[18px] text-ink-secondary"
|
className="min-w-0 grow overflow-hidden gap-1.5! flex-nowrap text-[13px] leading-[18px] text-ink-secondary"
|
||||||
>
|
>
|
||||||
{Icon ? (
|
{Icon ? (
|
||||||
<Icon size={13} aria-label={label} className="shrink-0" />
|
<Icon size={13} aria-label={label} className="shrink-0" />
|
||||||
) : image ? (
|
) : image ? (
|
||||||
image
|
image
|
||||||
) : null}
|
) : null}
|
||||||
<Span className="truncate">{text}</Span>
|
<Span className="min-w-0 grow truncate">{text}</Span>
|
||||||
</Row>
|
</Row>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user