diff --git a/app/login/page.tsx b/app/login/page.tsx new file mode 100644 index 0000000..d53c8b7 --- /dev/null +++ b/app/login/page.tsx @@ -0,0 +1,5 @@ +import Login from "@/components/pages/login"; + +export default function LoginPage() { + return ; +} \ No newline at end of file diff --git a/components/ai-suggestion-bar.tsx b/components/ai-suggestion-bar.tsx index b09d31f..fdfd3a7 100644 --- a/components/ai-suggestion-bar.tsx +++ b/components/ai-suggestion-bar.tsx @@ -1,6 +1,7 @@ import { useState, useRef, useEffect } from 'react'; import { motion, AnimatePresence } from 'framer-motion'; -import { Sparkles, Send, X, Lightbulb } from 'lucide-react'; +import { Sparkles, Send, X, Lightbulb, ChevronUp } from 'lucide-react'; +import { GlassIconButton } from "@/components/ui/glass-icon-button"; interface AISuggestionBarProps { suggestions: string[]; @@ -18,6 +19,7 @@ export function AISuggestionBar({ const [inputText, setInputText] = useState(''); const [isFocused, setIsFocused] = useState(false); const [showSuggestions, setShowSuggestions] = useState(false); + const [isCollapsed, setIsCollapsed] = useState(false); const inputRef = useRef(null); // 自动调整输入框高度 @@ -47,37 +49,99 @@ export function AISuggestionBar({ } }; + // 切换折叠状态 + const toggleCollapse = () => { + setIsCollapsed(!isCollapsed); + if (isCollapsed) { + // 展开时自动显示建议 + setShowSuggestions(true); + } + }; + return ( + {/* 折叠/展开按钮 */} +
+ + + +
+
{/* 智能预设词条 */} - {showSuggestions && ( + {showSuggestions && !isCollapsed && ( -
- + + + + 智能预设词条 -
+
{suggestions.map((suggestion, index) => ( {/* 输入区域 */} -
+ isCollapsed && toggleCollapse()} + >