调整聊天框宽度限制,调整 header 按钮位置
This commit is contained in:
@@ -87,8 +87,8 @@ export const AgentHeader = ({
|
||||
boxShadow: `0 1px 0 ${alpha("#fff", 0.6)} inset`,
|
||||
}}
|
||||
>
|
||||
<Stack direction="row" alignItems="center" spacing={2}>
|
||||
<motion.div whileHover={{ rotate: 10, scale: 1.05 }} whileTap={{ scale: 0.95 }} style={{ display: "flex" }}>
|
||||
<Stack direction="row" alignItems="center" spacing={2} sx={{ minWidth: 0, flex: 1, mr: 2 }}>
|
||||
<motion.div whileHover={{ rotate: 10, scale: 1.05 }} whileTap={{ scale: 0.95 }} style={{ display: "flex", flexShrink: 0 }}>
|
||||
<Box sx={{ position: "relative" }}>
|
||||
<Avatar
|
||||
sx={{
|
||||
@@ -129,9 +129,9 @@ export const AgentHeader = ({
|
||||
/>
|
||||
</Box>
|
||||
</motion.div>
|
||||
<Box sx={{ minWidth: 0 }}>
|
||||
<Box sx={{ minWidth: 0, flex: 1 }}>
|
||||
{isEditingTitle ? (
|
||||
<Stack direction="row" spacing={0.75} alignItems="center" sx={{ width: { xs: "calc(100vw - 256px)", sm: 280 } }}>
|
||||
<Stack direction="row" spacing={0.75} alignItems="center" sx={{ width: "100%" }}>
|
||||
<TextField
|
||||
value={draftTitle}
|
||||
onChange={(event) => setDraftTitle(event.target.value)}
|
||||
@@ -226,7 +226,6 @@ export const AgentHeader = ({
|
||||
overflow: "hidden",
|
||||
textOverflow: "ellipsis",
|
||||
whiteSpace: "nowrap",
|
||||
maxWidth: { xs: "calc(100vw - 256px)", sm: 284 },
|
||||
px: "8px",
|
||||
lineHeight: 1.2,
|
||||
}}
|
||||
@@ -262,7 +261,7 @@ export const AgentHeader = ({
|
||||
</Box>
|
||||
</Stack>
|
||||
|
||||
<Stack direction="row" spacing={1.25} alignItems="center">
|
||||
<Stack direction="row" spacing={1.25} alignItems="center" sx={{ flexShrink: 0 }}>
|
||||
<Tooltip title="新建对话">
|
||||
<motion.div whileHover={{ scale: 1.08 }} whileTap={{ scale: 0.92 }} style={{ display: "flex" }}>
|
||||
<IconButton
|
||||
|
||||
@@ -159,7 +159,7 @@ export const GlobalChatbox: React.FC<Props> = ({ open, onClose }) => {
|
||||
const handleMouseMove = (event: MouseEvent) => {
|
||||
if (!isResizing) return;
|
||||
const newWidth = window.innerWidth - event.clientX;
|
||||
if (newWidth > 360 && newWidth < 1240) {
|
||||
if (newWidth > 360 && newWidth < 800) {
|
||||
setWidth(newWidth);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user