chore: update dependencies

This commit is contained in:
Kevin Yue committed 2026-05-06 23:20:58 +08:00
1 parent 6289e1539a
commit 0c3af0d60d
8 files changed
+1198 -1491

No files matched your search

Generated
+395 -783
View File
File diff suppressed because it is too large. Load diff
+15 -15
View File
@@ -11,27 +11,27 @@
"dependencies": {
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.1",
"@mui/icons-material": "^7.3.6",
"@mui/material": "^7.3.6",
"@tauri-apps/api": "^2.9.1",
"react": "^19.2.3",
"react-dom": "^19.2.3"
"@mui/icons-material": "^7.3.10",
"@mui/material": "^7.3.10",
"@tauri-apps/api": "^2.11.0",
"react": "^19.2.5",
"react-dom": "^19.2.5"
},
"devDependencies": {
"@tauri-apps/cli": "^2.9.6",
"@types/node": "^22.19.3",
"@types/react": "^19.2.7",
"@tauri-apps/cli": "^2.11.1",
"@types/node": "^25.6.0",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"@typescript-eslint/eslint-plugin": "^8.50.0",
"@typescript-eslint/parser": "^8.50.0",
"@typescript-eslint/eslint-plugin": "^8.59.2",
"@typescript-eslint/parser": "^8.59.2",
"@vitejs/plugin-react": "^6.0.1",
"eslint": "^9.39.2",
"eslint": "^9.39.4",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^7.0.1",
"prettier": "3.4.2",
"typescript": "^5.9.3",
"vite": "^8.0.1"
"eslint-plugin-react-hooks": "^7.1.1",
"prettier": "3.8.3",
"typescript": "^6.0.3",
"vite": "^8.0.10"
},
"packageManager": "[email protected]"
}
+730 -686
View File
File diff suppressed because it is too large. Load diff
+4 -4
View File
@@ -89,8 +89,8 @@ impl GuiUpdater {
pub async fn update(&self) {
if !cfg!(any(target_arch = "x86_64", target_arch = "aarch64")) {
info!("GUI version is not supported on this architecture.");
return;
info!("GUI version is not supported on this architecture.");
return;
}
info!("Update GUI, version: {}", self.version);
@@ -104,9 +104,9 @@ impl GuiUpdater {
};
let arch = if cfg!(target_arch = "x86_64") {
"x86_64"
"x86_64"
} else {
"aarch64"
"aarch64"
};
let file_url = format!(
+1 -1
View File
@@ -159,7 +159,7 @@ mod signals {
pub async fn handle_signals(vpn_ctx: Arc<VpnTaskContext>, ws_ctx: Arc<WsServerContext>) {
use gpapi::service::event::WsEvent;
use tokio::signal::unix::{signal, Signal, SignalKind};
use tokio::signal::unix::{Signal, SignalKind, signal};
let (mut user_sig1, mut user_sig2) = match || -> anyhow::Result<(Signal, Signal)> {
let user_sig1 = signal(SignalKind::user_defined1())?;
+1 -1
View File
@@ -11,7 +11,7 @@ use openconnect::{find_csd_wrapper, find_vpnc_script};
use serde::de::DeserializeOwned;
use tokio::{
net::TcpListener,
sync::{mpsc, watch, RwLock},
sync::{RwLock, mpsc, watch},
};
use tokio_util::sync::CancellationToken;
+1 -1
View File
@@ -58,7 +58,7 @@ async fn gateway_login_with_options(
// It's possible to get an empty response, log the response headers for debugging
if res.trim().is_empty() {
debug!("Empty gateway login response headers: {:?}", res);
info!("Empty gateway login response headers: {:?}", res);
bail!("Got empty gateway login response");
}
+51
View File
@@ -1,5 +1,6 @@
use std::collections::HashMap;
use std::env;
use std::ffi::OsStr;
use std::io::Write;
use std::path::Path;
@@ -41,6 +42,15 @@ pub fn patch_gui_runtime_env(hidpi: bool) {
// This is to avoid blank screen on some systems
unsafe { std::env::set_var("WEBKIT_DISABLE_COMPOSITING_MODE", "1") };
if is_wayland_session(
env::var_os("WAYLAND_DISPLAY").as_deref(),
env::var("XDG_SESSION_TYPE").ok().as_deref(),
) {
info!("Wayland session detected, enabling Linux WebKit rendering fallbacks");
set_env_if_missing("WEBKIT_DISABLE_DMABUF_RENDERER", "1");
set_env_if_missing("LIBGL_ALWAYS_SOFTWARE", "1");
}
if hidpi {
info!("Setting GDK_SCALE=2 and GDK_DPI_SCALE=0.5");
unsafe {
@@ -49,3 +59,44 @@ pub fn patch_gui_runtime_env(hidpi: bool) {
};
}
}
fn is_wayland_session(wayland_display: Option<&OsStr>, xdg_session_type: Option<&str>) -> bool {
if wayland_display.is_some() {
return true;
}
matches!(xdg_session_type, Some("wayland"))
}
fn set_env_if_missing(key: &str, value: &str) {
if env::var_os(key).is_some() {
return;
}
info!("Setting {}={}", key, value);
unsafe { env::set_var(key, value) };
}
#[cfg(test)]
mod tests {
use std::ffi::OsStr;
use super::is_wayland_session;
#[test]
fn detects_wayland_from_wayland_display() {
assert!(is_wayland_session(Some(OsStr::new("wayland-1")), None));
}
#[test]
fn detects_wayland_from_session_type() {
assert!(is_wayland_session(None, Some("wayland")));
}
#[test]
fn ignores_non_wayland_sessions() {
assert!(!is_wayland_session(None, None));
assert!(!is_wayland_session(None, Some("x11")));
assert!(!is_wayland_session(None, Some("tty")));
}
}