From 8302fcb45fb4edfe7c00fb21a431c33d7e538568 Mon Sep 17 00:00:00 2001 From: singlexyz Date: Fri, 23 Feb 2024 22:17:08 +0800 Subject: [PATCH] =?UTF-8?q?GPT=20Logo=20=E7=82=B9=E5=87=BB9=E6=AC=A1?= =?UTF-8?q?=E6=9C=89=E5=BD=A9=E8=9B=8B=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/home.module.scss | 7 +++++-- app/components/sidebar.tsx | 29 +++++++++++++++++++++++++++-- package.json | 3 ++- 3 files changed, 34 insertions(+), 5 deletions(-) diff --git a/app/components/home.module.scss b/app/components/home.module.scss index b836d2be..71be45b6 100644 --- a/app/components/home.module.scss +++ b/app/components/home.module.scss @@ -1,4 +1,5 @@ @mixin container { + view-transition-name: panel; background-color: var(--white); border: var(--border-in-light); border-radius: 20px; @@ -205,12 +206,12 @@ cursor: pointer; } -.chat-item:hover > .chat-item-delete { +.chat-item:hover>.chat-item-delete { opacity: 0.5; transform: translateX(-4px); } -.chat-item:hover > .chat-item-delete:hover { +.chat-item:hover>.chat-item-delete:hover { opacity: 1; } @@ -231,10 +232,12 @@ } .narrow-sidebar { + .sidebar-title, .sidebar-sub-title { display: none; } + .sidebar-logo { position: relative; display: flex; diff --git a/app/components/sidebar.tsx b/app/components/sidebar.tsx index 47411394..6d24fbf9 100644 --- a/app/components/sidebar.tsx +++ b/app/components/sidebar.tsx @@ -1,4 +1,4 @@ -import { useEffect, useRef, useMemo } from "react"; +import { useEffect, useRef, useMemo, useState } from "react"; import styles from "./home.module.scss"; @@ -128,6 +128,31 @@ function useDragSideBar() { }; } +function EEIcon() { + // 彩蛋 + const [count, setCount] = useState(0); + + return ( +
setCount((c) => c + 1)}> + + {count >= 9 ? ( +
+ ); +} + export function SideBar(props: { className?: string }) { const chatStore = useChatStore(); @@ -162,7 +187,7 @@ export function SideBar(props: { className?: string }) { Build your own AI assistant. */}
- +
diff --git a/package.json b/package.json index b31d6a90..fa6619a7 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "emoji-picker-react": "^4.5.15", "fuse.js": "^7.0.0", "html-to-image": "^1.11.11", + "katex": "^0.16.9", "mermaid": "^10.6.1", "nanoid": "^5.0.3", "next": "^13.4.9", @@ -64,4 +65,4 @@ "resolutions": { "lint-staged/yaml": "^2.2.2" } -} \ No newline at end of file +}