From 8bc6ddbca8e1e668358701d6294567996b166394 Mon Sep 17 00:00:00 2001 From: t0ng7u Date: Sun, 20 Jul 2025 18:30:42 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20refactor(playground):=20migrate?= =?UTF-8?q?=20inline=20styles=20to=20TailwindCSS=20v3=20classes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace all inline style objects with TailwindCSS utility classes - Convert Layout and Layout.Sider component styles to responsive classes - Simplify conditional styling logic using template literals - Maintain existing responsive design and functionality - Improve code readability and maintainability Changes include: - Layout: height/background styles → h-full bg-transparent - Sider: complex style object → conditional className with mobile/desktop variants - Debug panel overlay: inline styles → utility classes (fixed, z-[1000], etc.) - Remove redundant style props while preserving visual consistency --- .../components/playground/FloatingButtons.js | 2 +- web/src/pages/Playground/index.js | 44 +++++-------------- 2 files changed, 12 insertions(+), 34 deletions(-) diff --git a/web/src/components/playground/FloatingButtons.js b/web/src/components/playground/FloatingButtons.js index 539c53b3..87a3b0b5 100644 --- a/web/src/components/playground/FloatingButtons.js +++ b/web/src/components/playground/FloatingButtons.js @@ -80,7 +80,7 @@ const FloatingButtons = ({ ? 'linear-gradient(to right, #e11d48, #be123c)' : 'linear-gradient(to right, #4f46e5, #6366f1)', }} - className="lg:hidden !rounded-full !p-0" + className="lg:hidden" /> )} diff --git a/web/src/pages/Playground/index.js b/web/src/pages/Playground/index.js index 88ebc538..f31cefb7 100644 --- a/web/src/pages/Playground/index.js +++ b/web/src/pages/Playground/index.js @@ -371,28 +371,18 @@ const Playground = () => { }, [setMessage, saveMessagesImmediately]); return ( -
- +
+ {(showSettings || !isMobile) && ( { )} -
+
{ {/* 调试面板 - 移动端覆盖层 */} {showDebugPanel && isMobile && ( -
+