Skip to content

Commit

Permalink
feat: add page transition mode and duration options
Browse files Browse the repository at this point in the history
  • Loading branch information
keiko233 authored Dec 3, 2023
2 parents 0057842 + 83b9660 commit 23ffae1
Show file tree
Hide file tree
Showing 22 changed files with 443 additions and 264 deletions.
7 changes: 7 additions & 0 deletions backend/tauri/src/config/verge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ pub struct IVerge {
/// show memory info (only for Clash Meta)
pub enable_memory_usage: Option<bool>,

/// page transition animation, default is `slide`
pub page_transition_animation: Option<String>,

/// clash tun mode
pub enable_tun_mode: Option<bool>,

Expand Down Expand Up @@ -108,6 +111,8 @@ pub struct IVergeTheme {

pub font_family: Option<String>,
pub css_injection: Option<String>,

pub page_transition_duration: Option<f64>,
}

impl IVerge {
Expand Down Expand Up @@ -145,6 +150,7 @@ impl IVerge {
auto_close_connection: Some(true),
enable_builtin_enhanced: Some(true),
enable_clash_fields: Some(true),
page_transition_animation: Some("slide".into()),
..Self::default()
}
}
Expand All @@ -171,6 +177,7 @@ impl IVerge {
patch!(theme_blur);
patch!(traffic_graph);
patch!(enable_memory_usage);
patch!(page_transition_animation);

patch!(enable_tun_mode);
patch!(enable_service_mode);
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"ahooks": "^3.7.2",
"axios": "^1.1.3",
"dayjs": "1.11.5",
"framer-motion": "10.16.12",
"i18next": "^22.0.4",
"lodash-es": "^4.17.21",
"monaco-editor": "^0.34.1",
Expand Down Expand Up @@ -117,7 +118,7 @@
"stylelint-order": "6.0.3",
"stylelint-scss": "5.3.1",
"tsx": "4.5.0",
"typescript": "^4.7.4",
"typescript": "^5.3.2",
"vite": "^4.5.0",
"vite-plugin-monaco-editor": "^1.1.0",
"vite-plugin-svgr": "^4.1.0"
Expand Down
Loading

0 comments on commit 23ffae1

Please sign in to comment.