From e0600f5d5012cf0eadf74b42d298f07e2d52d692 Mon Sep 17 00:00:00 2001 From: yuantao Date: Tue, 16 Sep 2025 13:05:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E6=95=B4=E4=BD=93?= =?UTF-8?q?=E9=A3=8E=E6=A0=BC=E7=BB=9F=E4=B8=80=E5=8C=96=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.tsx | 12 +++++++----- src/components/Header.tsx | 4 ++-- src/components/HistoryPanel.tsx | 24 ++++++++++++------------ src/components/ImageCanvas.tsx | 16 ++++++++-------- src/components/PromptComposer.tsx | 20 ++++++++++---------- src/index.css | 15 +++++++++++++++ tailwind.config.js | 9 +++++++++ 7 files changed, 63 insertions(+), 37 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index c8b97b1..4b1064d 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -54,21 +54,23 @@ function AppContent() { return (
-
+
-
+
-
+
- +
+ +
-
+
diff --git a/src/components/Header.tsx b/src/components/Header.tsx index 25f6624..2cceb8e 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -8,7 +8,7 @@ export const Header: React.FC = () => { return ( <> -
+
🍌
@@ -23,7 +23,7 @@ export const Header: React.FC = () => { variant="ghost" size="icon" onClick={() => setShowInfoModal(true)} - className="h-7 w-7 text-gray-500 hover:text-gray-700 hover:bg-gray-100" + className="h-7 w-7 text-gray-500 hover:text-gray-700 hover:bg-gray-100 rounded-full card" > diff --git a/src/components/HistoryPanel.tsx b/src/components/HistoryPanel.tsx index b954d55..0ff77a6 100644 --- a/src/components/HistoryPanel.tsx +++ b/src/components/HistoryPanel.tsx @@ -93,7 +93,7 @@ export const HistoryPanel: React.FC = () => { variant="ghost" size="icon" onClick={() => setShowHistory(!showHistory)} - className="h-6 w-6" + className="h-6 w-6 rounded-full card" title="隐藏历史面板" > × @@ -104,7 +104,7 @@ export const HistoryPanel: React.FC = () => { @@ -324,7 +324,7 @@ export const ImageCanvas: React.FC = () => { variant="ghost" size="sm" onClick={() => handleZoom(0.1)} - className="h-8 w-8 p-0 text-gray-600 hover:text-gray-900 hover:bg-gray-100" + className="h-8 w-8 p-0 text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded-full card" > @@ -332,7 +332,7 @@ export const ImageCanvas: React.FC = () => { variant="ghost" size="sm" onClick={handleReset} - className="h-8 w-8 p-0 text-gray-600 hover:text-gray-900 hover:bg-gray-100" + className="h-8 w-8 p-0 text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded-full card" > @@ -341,7 +341,7 @@ export const ImageCanvas: React.FC = () => { variant="ghost" size="sm" onClick={handleDownload} - className="h-8 w-8 p-0 text-gray-600 hover:text-gray-900 hover:bg-gray-100" + className="h-8 w-8 p-0 text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded-full card" > diff --git a/src/components/PromptComposer.tsx b/src/components/PromptComposer.tsx index be89a82..fcfe8c6 100644 --- a/src/components/PromptComposer.tsx +++ b/src/components/PromptComposer.tsx @@ -138,10 +138,10 @@ export const PromptComposer: React.FC = () => { if (!showPromptPanel) { return ( -
+
@@ -173,7 +173,7 @@ export const PromptComposer: React.FC = () => { variant="ghost" size="icon" onClick={() => setShowPromptPanel(false)} - className="h-6 w-6 text-gray-400 hover:text-gray-600 hover:bg-gray-100" + className="h-6 w-6 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-full card" title="隐藏面板" > @@ -255,7 +255,7 @@ export const PromptComposer: React.FC = () => { variant="outline" size="sm" onClick={() => fileInputRef.current?.click()} - className="mt-1" + className="mt-1 card" disabled={ (selectedTool === 'generate' && uploadedImages.length >= 2) || (selectedTool === 'edit' && editReferenceImages.length >= 2) @@ -335,7 +335,7 @@ export const PromptComposer: React.FC = () => {
@@ -423,7 +423,7 @@ export const PromptComposer: React.FC = () => { variant="outline" size="sm" onClick={() => setShowClearConfirm(false)} - className="flex-1 h-8 text-xs border-gray-200" + className="flex-1 h-8 text-xs border-gray-200 card" > 取消 diff --git a/src/index.css b/src/index.css index 7c05186..4f59f89 100644 --- a/src/index.css +++ b/src/index.css @@ -97,4 +97,19 @@ body { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; transition-duration: 200ms; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); +} + +/* Card styles */ +.card { + @apply bg-white rounded-xl shadow-card border border-gray-100 overflow-hidden; + backdrop-filter: blur(10px); + -webkit-backdrop-filter: blur(10px); +} + +.card-hover { + @apply shadow-card-hover; +} + +.card-lg { + @apply shadow-card-lg; } \ No newline at end of file diff --git a/tailwind.config.js b/tailwind.config.js index ebcf6ec..e2210ee 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -50,6 +50,15 @@ export default { '100': '25rem', '112': '28rem', }, + boxShadow: { + 'card': '0 4px 12px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.05)', + 'card-hover': '0 6px 16px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05)', + 'card-lg': '0 10px 25px rgba(0, 0, 0, 0.1), 0 5px 10px rgba(0, 0, 0, 0.05)', + 'inner': 'inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)', + }, + backdropBlur: { + 'xs': '2px', + } }, }, plugins: [],