ITADN

[WIP] Add page zoom adjustments in app settings

#70Pull RequestCopilot 创建于 2025-10-16
C
Copilotcommented
## Implementation Plan: Add Page Zoom Feature to Settings Based on the issue requirements, I need to: - [ ] Define a Rust command `set_zoom` in `src-tauri/src/main.rs` to call `WebView.zoom()` - [ ] Add the command to the Tauri invoke handler - [ ] Update capabilities in `src-tauri/capabilities/main.json` if needed - [ ] Add zoom level to the config store (`src/stores/config.ts` and `src/utils/config.ts`) - [ ] Create a new UI component in settings to display zoom control (only in app mode) - [ ] Add `<NInputNumber>` from Naive UI with range 0.25-5.0 (25%-500%), step 0.5 (50%) - [ ] Add internationalization strings for zoom setting in `src/locales/zh-CN.json` and `src/locales/en.json` - [ ] Hide the feature when not in app mode (tree-shaking) - [ ] Test the implementation The feature should: - Only be available in the standalone app (not web version) - Use NaiveUI's NInputNumber component - Allow values from 25% to 500% with 50% steps - Persist the zoom level in the config - Apply zoom when the app starts and when changed <!-- START COPILOT CODING AGENT SUFFIX --> <details> <summary>Original prompt</summary> > > ---- > > *This section details on the original issue you should resolve* > > <issue_title>独立 App 中允许在设置页调整页面缩放</issue_title> > <issue_description>在 Rust 侧定义命令调用 [`Webview.zoom`](https://docs.rs/wry/0.53.3/wry/struct.WebView.html#method.zoom),Web 侧展示一个 [`<NInputNumber>`](https://www.naiveui.com/zh-CN/os-theme/components/input-number),值域 25%~500%,步长 50%,功能不可用时隐藏,并注意相关的 tree-shaking</issue_description> > > ## Comments on the Issue (you are @copilot in this section) > > <comments> > </comments> > </details> Fixes typed-sigterm/ex-caller#69 <!-- START COPILOT CODING AGENT TIPS --> --- ✨ Let Copilot coding agent [set things up for you](https://github.com/typed-sigterm/ex-caller/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo.
合并状态:未合并 1 条评论