From 58e58df3744f2318353447b5405ff0c405b53924 Mon Sep 17 00:00:00 2001 From: lzt404 <2596933790@qq.com> Date: Wed, 26 Aug 2026 01:15:41 +0800 Subject: [PATCH] fix(usage): align table width and reduce default window size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - stretch the usage table to match card width - set the default window size to 1280 × 800 - migrate the legacy default window dimensions - add coverage for window size migration --- src-tauri/src/core_config/settings.rs | 13 ++++++++++++- src-tauri/src/main.rs | 6 ++++-- src-tauri/src/tests/app_settings.rs | 17 +++++++++++++++-- src-tauri/tauri.conf.json | 4 ++-- src/pages/UsageRecordsPage.tsx | 5 ++++- src/styles.css | 6 ++++++ 6 files changed, 43 insertions(+), 8 deletions(-) diff --git a/src-tauri/src/core_config/settings.rs b/src-tauri/src/core_config/settings.rs index 3ace3d2..2fcf2ad 100644 --- a/src-tauri/src/core_config/settings.rs +++ b/src-tauri/src/core_config/settings.rs @@ -1584,7 +1584,18 @@ pub(crate) fn sanitize_gui_config(config: &mut GuiConfigFile) -> Result - +
{visibleColumns.map((col) => ( diff --git a/src/styles.css b/src/styles.css index a50ad0c..4b1dbaa 100644 --- a/src/styles.css +++ b/src/styles.css @@ -6617,8 +6617,12 @@ textarea:focus-visible { .usage-records-page { display: grid; + width: 100%; + max-width: 100%; + min-width: 0; gap: 12px; align-content: start; + justify-items: stretch; } .usage-topbar { @@ -7199,6 +7203,8 @@ textarea:focus-visible { /* Events Tab (请求明细) */ .usage-events-panel { display: flex; + width: 100%; + max-width: 100%; min-height: 0; padding: 0; flex-direction: column;