Commit Graph

23 Commits

  • edition 2024 (#4702)
    * feat: update Cargo.toml for 2024 edition and optimize release profiles
    
    * feat: refactor environment variable settings for Linux and improve code organization
    
    * Refactor conditional statements to use `&&` for improved readability
    
    - Updated multiple files to combine nested `if let` statements using `&&` for better clarity and conciseness.
    - This change enhances the readability of the code by reducing indentation levels and making the conditions more straightforward.
    - Affected files include: media_unlock_checker.rs, profile.rs, clash.rs, profiles.rs, async_proxy_query.rs, core.rs, handle.rs, hotkey.rs, service.rs, timer.rs, tray/mod.rs, merge.rs, seq.rs, config.rs, proxy.rs, window.rs, general.rs, dirs.rs, i18n.rs, init.rs, network.rs, and window.rs in the resolve module.
    
    * refactor: streamline conditional checks using `&&` for improved readability
    
    * fix: update release profile settings for panic behavior and optimization
    
    * fix: adjust optimization level in Cargo.toml and reorder imports in lightweight.rs
  • feat: update Cargo.toml for 2024 edition and optimize release profiles (#4681)
    * feat: update Cargo.toml for 2024 edition and optimize release profiles
    
    * feat: refactor environment variable settings for Linux and improve code organization
    
    * Refactor conditional statements to use `&&` for improved readability
    
    - Updated multiple files to combine nested `if let` statements using `&&` for better clarity and conciseness.
    - This change enhances the readability of the code by reducing indentation levels and making the conditions more straightforward.
    - Affected files include: media_unlock_checker.rs, profile.rs, clash.rs, profiles.rs, async_proxy_query.rs, core.rs, handle.rs, hotkey.rs, service.rs, timer.rs, tray/mod.rs, merge.rs, seq.rs, config.rs, proxy.rs, window.rs, general.rs, dirs.rs, i18n.rs, init.rs, network.rs, and window.rs in the resolve module.
    
    * refactor: streamline conditional checks using `&&` for improved readability
  • refactor: migrate from serde_yaml to serde_yaml_ng for improved YAML handling (#4568)
    * refactor: migrate from serde_yaml to serde_yaml_ng for improved YAML handling
    
    * refactor: format code for better readability in DNS configuration
  • fix: clippy errors with new config (#4428)
    * refactor: improve code quality with clippy fixes and standardized logging
    
    - Replace dangerous unwrap()/expect() calls with proper error handling
    - Standardize logging from log:: to logging\! macro with Type:: classifications
    - Fix app handle panics with graceful fallback patterns
    - Improve error resilience across 35+ modules without breaking functionality
    - Reduce clippy warnings from 300+ to 0 in main library code
    
    * chore: update Cargo.toml configuration
    
    * refactor: resolve all clippy warnings
    - Fix Arc clone warnings using explicit Arc::clone syntax across 9 files
    - Add #[allow(clippy::expect_used)] to test functions for appropriate expect usage
    - Remove no-effect statements from debug code cleanup
    - Apply clippy auto-fixes for dbg\! macro removals and path statements
    - Achieve zero clippy warnings on all targets with -D warnings flag
    
    * chore: update Cargo.toml clippy configuration
    
    * refactor: simplify macOS job configuration and improve caching
    
    * refactor: remove unnecessary async/await from service and proxy functions
    
    * refactor: streamline pnpm installation in CI configuration
    
    * refactor: simplify error handling and remove unnecessary else statements
    
    * refactor: replace async/await with synchronous locks for core management
    
    * refactor: add workflow_dispatch trigger to clippy job
    
    * refactor: convert async functions to synchronous for service management
    
    * refactor: convert async functions to synchronous for UWP tool invocation
    
    * fix: change wrong logging
    
    * refactor: convert proxy restoration functions to async
    
    * Revert "refactor: convert proxy restoration functions to async"
    
    This reverts commit b82f5d250b.
    
    * refactor: update proxy restoration functions to return Result types
    
    * fix: handle errors during proxy restoration and update async function signatures
    
    * fix: handle errors during proxy restoration and update async function signatures
    
    * refactor: update restore_pac_proxy and restore_sys_proxy functions to async
    
    * fix: convert restore_pac_proxy and restore_sys_proxy functions to async
    
    * fix: await restore_sys_proxy calls in proxy restoration logic
    
    * fix: suppress clippy warnings for unused async functions in proxy restoration
    
    * fix: suppress clippy warnings for unused async functions in proxy restoration
  • fix: manage setup Mutex crash (#3995)
    * Revert "Revert "refactor: Replace std::sync::Mutex with parking_lot::Mutex for improved performance and consistency in multiple files" (#3990)"
    
    This reverts commit 667844aa12.
    
    * refactor: Manage lightweight state in the app setup and clean up unused proxy client code
    
    * refactor: Move macOS-specific Manager import under conditional compilation
  • Add cors (#3909)
    * add external `cors` control panel
    
    * optimize format
    
    * fix-script.rs
    
    * fix-service.rs
    
    * fix-rs
    
    async_proxy_query.rs
    
    event_driven_proxy.rs
    
    service_ipc.rs
    
    service.rs
    
    sysopt.rs
    
    * lower the prettier version number to 3.5.3
    
    * Revert "lower the prettier version number to 3.5.3"
    
    This reverts commit 0f1c3dfa8a.
    
    * fix: prttier erros
    
    * add developer environment detection and controlled the display of development environment URL
    
    * submit required
    
    * fix-external-controller-cors
    
    * use the custom component ToggleButton to ensure a uniform button style
    
    * fix-tsx
    
    hotkey-viewer.tsx
    
    external-controller-cors.tsx
    
    * fix-bug_report.yml
    
    * remove the annoying title
    
    * fix-write overload problem
    
    * Individual button settings
    
    * fix-setting-clash.tsx
    
    ---------
    
    Co-authored-by: Tunglies <77394545+Tunglies@users.noreply.github.com>
    Co-authored-by: Tunglies <tunglies.dev@outlook.com>
  • fix : js script escape error issue introduced #3751 (#3759)
    * refactoring fix js script is too strict
    
    * fix:format
    
    ---------
    
    Co-authored-by: Ahao <108321411+xuanyuan0408@users.noreply.github.com>
  • fix the JS script error when escaping special characters to prevent special airport names from causing the script to fail to work (#3717)
    * fix the JS script error
    
    * update logs
    
    * remove unused references
    
    * update logs
    
    * fix special escape test
    
    * optimize:unescape of special characters in JS strings
    
    * fix unaligned annotations
    
    ---------
    
    Co-authored-by: Ahao <108321411+xuanyuan0408@users.noreply.github.com>
  • refactor: use Box to store large config objects and add memory usage tests
    - Refactored config-related structs to use Box for storing large objects (e.g., IRuntime, IProfiles, PrfItem) to reduce stack memory usage and improve performance.
    - Updated related methods and assignments to handle Boxed types correctly.
    - Added and improved unit tests to compare memory usage between Boxed and non-Boxed config objects, demonstrating the memory efficiency of Box.
    - Test output now shows the size difference between stack-allocated and heap-allocated (Box) config objects.