* ⚡️大幅提升UIGF导入速度 (#225)
* Initial plan
* perf: optimize gacha import with batch transactions and reduced UI delays
- Wrap DB inserts in transactions (batches of 500) for mergeUIGF/mergeUIGF4
- Pre-transform all data before batch insert loop
- Pass timeout: 0 to showLoading.update in progress callbacks
- Remove 1500ms snackbar delay in cleanGachaRecords
- Reduce per-item loading update delay in refreshGachaPool
Co-authored-by: Mikachu2333 <63829496+Mikachu2333@users.noreply.github.com>
* fix: increment progress counter per item instead of per batch for accurate progress display
Co-authored-by: Mikachu2333 <63829496+Mikachu2333@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Mikachu2333 <63829496+Mikachu2333@users.noreply.github.com>
* Initial plan
* feat: calculate window size based on resolution/scaling with baseline check and centering
- resizeWindow: add baseline check (1920x1080@150%), clamp to screen bounds
- setWindowPos: ensure window fits on screen and always center
- App.vue: use setWindowPos instead of manual positioning, center on deep link show
- tray.rs: center window when showing from system tray
Co-authored-by: Mikachu2333 <63829496+Mikachu2333@users.noreply.github.com>
* fix: address code review - add zero guard and use setWindowPos consistently
Co-authored-by: Mikachu2333 <63829496+Mikachu2333@users.noreply.github.com>
* refactor: address review feedback - move baseline to setWindowPos, revert tray.rs
- tray.rs: reverted, center() removed as redundant
- TGWindow.ts: baseline check moved to setWindowPos, resizeWindow restored as fallback
- App.vue: needResize=false → setWindowPos, else → center; deep link reverted;
handleResizeListen true path unchanged, setWindowPos moved inside else
Co-authored-by: Mikachu2333 <63829496+Mikachu2333@users.noreply.github.com>
* refactor: use needResize judgment condition (targetZoom/scaleFactor/textScale) in setWindowPos
Replace the simple curSize > screen.size overflow check with the same
condition used by resizeWindow(): targetZoom < 1, which considers
scaleFactor and textScale. Falls back to resizeWindow() when below
baseline or when targetZoom < 1.
Co-authored-by: Mikachu2333 <63829496+Mikachu2333@users.noreply.github.com>
* 🚸 调整尺寸判断
* 🚸 处理溢出
* 🚸 优化处理
* 🚸 移除冗余scale处理
* 🎨 CodeStyle
---------
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Mikachu2333 <63829496+Mikachu2333@users.noreply.github.com>
Co-authored-by: BTMuli <bt-muli@outlook.com>
* Initial plan
* Add system tray icon feature with show/quit menu
Co-authored-by: BTMuli <72692909+BTMuli@users.noreply.github.com>
* Apply Rust code formatting
Co-authored-by: BTMuli <72692909+BTMuli@users.noreply.github.com>
* Address code review feedback: improve documentation and reduce duplication
Co-authored-by: BTMuli <72692909+BTMuli@users.noreply.github.com>
* Make tray behavior configurable - add closeToTray setting
- Add closeToTray setting in app store (default: false)
- Add UI toggle in PageConfig.vue for "关闭到托盘" setting
- Modify window close handler to emit event instead of always hiding
- Add hide_main_window and quit_app commands in backend
- Frontend listens for close event and respects user preference
- When closeToTray is enabled, window minimizes to tray on close
- When disabled, application quits on close (original behavior)
Co-authored-by: BTMuli <72692909+BTMuli@users.noreply.github.com>
* Remove duplicate SUB_WINDOW_LABELS constant - use shared constant from lib.rs
Co-authored-by: BTMuli <72692909+BTMuli@users.noreply.github.com>
* Fix tray icon issues: remove duplicate tray, add icon loading, close sub-windows on hide
1. Remove duplicate tray icon: Removed trayIcon config from tauri.conf.json (was creating 2 trays)
2. Add proper icon loading: Use image crate to decode PNG and create RGBA icon data
3. Close sub-windows when hiding: Modified hide_main_window to close all sub-windows before hiding
4. Sync with master branch: Merged latest commit c8fe03c
Co-authored-by: BTMuli <72692909+BTMuli@users.noreply.github.com>
* Address code review: remove anyhow, add separator, improve comments
1. Remove anyhow dependency - Use Tauri's InvalidIcon error instead
2. Add menu separator between "显示窗口" and "退出应用"
3. Add comment explaining image crate necessity (Tauri Image only accepts raw RGBA)
4. Keep HTTPS URLs with note about SSH preference for local development
5. Image crate remains necessary as Tauri doesn't provide PNG decoding
Co-authored-by: BTMuli <72692909+BTMuli@users.noreply.github.com>
* Revert to SSH URLs for plugin dependencies as requested
Changed all tauri-plugin git URLs from HTTPS to SSH format.
Project CI has SSH configuration, so SSH is the preferred method.
Co-authored-by: BTMuli <72692909+BTMuli@users.noreply.github.com>
* Use storeToRefs for closeToTray property
Changed closeToTray access to use storeToRefs in both App.vue and PageConfig.vue
for better reactivity and consistency with other store properties.
Co-authored-by: BTMuli <72692909+BTMuli@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: BTMuli <72692909+BTMuli@users.noreply.github.com>