yaoshiu / pretty-der6y

Hachimi hachimi hachimi~
GNU Affero General Public License v3.0
4 stars 5 forks source link

Code Refactoring and Enhancements #36

Closed yaoshiu closed 1 month ago

yaoshiu commented 1 month ago

Overview:

This pull request focuses on refactoring the existing code for consistency and maintainability, particularly around component definitions and security features in the project. The following are the key changes introduced in this PR:

Key Changes:

  1. Refactor of Component Functions:

    • Converted several components from arrow functions to standard function declarations. This provides consistency across the codebase and makes debugging more straightforward.
    • Components affected include:
      • Button
      • DatePicker
      • Icon
      • Input
      • LeafletMap
      • Log, Logs, LoggerProvider
      • Popover
      • Scrollbar
      • Skeleton, Background
      • Slider
      • TimePicker
      • TittleBar
      • Uploader
      • TwoColumn
  2. Security Improvements:

    • Removed the test_encrypt2 function from the security.rs file, which included a large hardcoded JSON payload. This test was redundant and added unnecessary complexity.
  3. Enhancements for Tauri Configuration:

    • Updated Cargo.toml to enable the macos-private-api feature in Tauri.
    • Updated tauri.conf.json to support transparency in macOS windows ("transparent": true) and added $schema to leverage schema validation for Tauri configurations.
  4. Style Improvements:

    • Added minor layout improvements, such as adding the class "md:rounded-xl overflow-hidden" to the App component for better design on larger screens.
  5. Updated Dependencies:

    • Tauri version remains 2.0.0-rc but now includes the macos-private-api feature.

Testing:

Removed Test:

Notes: