From 29cb79abfd80c1b759be97bd238b682c76187afa Mon Sep 17 00:00:00 2001 From: Misaka_Company Date: Wed, 4 Mar 2026 16:06:00 +0800 Subject: [PATCH] style: improve UI layout and styling - Increase default window width from 900 to 1200 - Beautify clear button in OrderNumberInput with icon and hover effects - Simplify ExtractorPage layout by removing collapsible sidebar - Center settings form controls horizontally in SettingsPage --- src/main/index.ts | 2 +- .../src/components/OrderNumberInput.tsx | 4 +- src/renderer/src/pages/ExtractorPage.tsx | 53 ++++++------------- src/renderer/src/pages/SettingsPage.tsx | 12 ++--- 4 files changed, 27 insertions(+), 44 deletions(-) diff --git a/src/main/index.ts b/src/main/index.ts index 464db75..653dfd0 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -15,7 +15,7 @@ dotenv.config({ path: resolve(__dirname, '../../.env') }) function createWindow(): void { // Create the browser window. const mainWindow = new BrowserWindow({ - width: 900, + width: 1200, height: 670, show: false, autoHideMenuBar: true, diff --git a/src/renderer/src/components/OrderNumberInput.tsx b/src/renderer/src/components/OrderNumberInput.tsx index ec243a9..74a90c8 100644 --- a/src/renderer/src/components/OrderNumberInput.tsx +++ b/src/renderer/src/components/OrderNumberInput.tsx @@ -1,4 +1,5 @@ import React, { useState, useEffect } from 'react' +import { X } from 'lucide-react' interface OrderNumberInputProps { value: string @@ -114,8 +115,9 @@ const OrderNumberInput: React.FC = ({ diff --git a/src/renderer/src/pages/ExtractorPage.tsx b/src/renderer/src/pages/ExtractorPage.tsx index 821c9b5..fdb840b 100644 --- a/src/renderer/src/pages/ExtractorPage.tsx +++ b/src/renderer/src/pages/ExtractorPage.tsx @@ -1,5 +1,5 @@ import React, { useState, useEffect, useRef } from 'react' -import { Download, Play, Terminal, PanelLeftClose, PanelLeft } from 'lucide-react' +import { Download, Play, Terminal } from 'lucide-react' import OrderNumberInput from '../components/OrderNumberInput' interface ExtractorProgress { @@ -38,7 +38,6 @@ const ExtractorPage: React.FC = () => { const [progress, setProgress] = useState(null) const [error, setError] = useState(null) const [logs, setLogs] = useState([]) - const [sidebarCollapsed, setSidebarCollapsed] = useState(false) const logsEndRef = useRef(null) useEffect(() => { @@ -124,40 +123,22 @@ const ExtractorPage: React.FC = () => { return (
- {!sidebarCollapsed && ( - - )} - - +
diff --git a/src/renderer/src/pages/SettingsPage.tsx b/src/renderer/src/pages/SettingsPage.tsx index d0b014f..77eb600 100644 --- a/src/renderer/src/pages/SettingsPage.tsx +++ b/src/renderer/src/pages/SettingsPage.tsx @@ -94,7 +94,7 @@ const SettingsPage: React.FC = () => { } return ( -
+
{message && (
{
)} -
+

@@ -114,8 +114,8 @@ const SettingsPage: React.FC = () => {

-
-
+
+
@@ -128,7 +128,7 @@ const SettingsPage: React.FC = () => { />
-
+
-
+