perf: eliminate theme switch lag by suppressing CSS transitions

Disable all CSS transitions/animations during theme toggle so color
changes apply instantly instead of animating over 150ms. Also cache
Tauri window module import and set color-scheme for native UI elements.
This commit is contained in:
t8y2
2026-05-13 16:04:35 +08:00
parent 70becfd74f
commit b4d1f4b04e
6 changed files with 63 additions and 18 deletions
+1
View File
@@ -17,6 +17,7 @@ const AGENT_TYPES: &[(&str, &str)] = &[
("vastbase", "Vastbase"),
("goldendb", "GoldenDB"),
("oracle", "Oracle"),
("oracle-10g", "Oracle 10g"),
("h2", "H2"),
("snowflake", "Snowflake"),
("trino", "Trino (Presto)"),
+2 -1
View File
@@ -127,6 +127,7 @@ pub async fn test_connection(state: State<'_, Arc<AppState>>, config: Connection
.agent_manager
.call_daemon::<serde_json::Value>(
&config.db_type,
config.driver_profile.as_deref(),
"test_connection",
serde_json::json!({
"host": host,
@@ -238,7 +239,7 @@ pub async fn connect_db(state: State<'_, Arc<AppState>>, config: ConnectionConfi
| DatabaseType::Kylin
| DatabaseType::Sundb
| DatabaseType::Gaussdb => {
let mut client = state.agent_manager.spawn(&db_config.db_type).await?;
let mut client = state.agent_manager.spawn(&db_config.db_type, db_config.driver_profile.as_deref()).await?;
client
.call::<serde_json::Value>(
"connect",