more refactor

This commit is contained in:
Kevin Yue
2023-11-13 10:05:06 +08:00
parent 0b4829a610
commit bf2d327687
20 changed files with 965 additions and 64 deletions

View File

@@ -12,11 +12,12 @@ rust-version = "1.59"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[build-dependencies]
tauri-build = { version = "1.3", features = [] }
tauri-build = { version = "1.4.0", features = [] }
[dependencies]
gpcommon = { path = "../../gpcommon" }
tauri = { version = "1.3", features = ["fs-write-file", "http-all", "os-all", "process-exit", "shell-open", "window-all", "window-data-url"] }
gpauth = { path = "../../gpauth" }
tauri = { version = "1.4.0", features = ["fs-write-file", "http-all", "os-all", "process-exit", "shell-open", "window-all", "window-data-url"] }
tauri-plugin-log = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1", features = [
"colored",
] }

View File

@@ -147,7 +147,7 @@ fn build_window(app_handle: &AppHandle, ua: &str) -> tauri::Result<Window> {
.title("GlobalProtect Login")
.inner_size(600.0, 500.0)
.min_inner_size(370.0, 600.0)
.user_agent(ua)
.user_agent("PAN GlobalProtect")
.always_on_top(true)
.focused(true)
.center()

View File

@@ -0,0 +1,10 @@
#[derive(thiserror::Error, Debug)]
#[non_exhaustive]
pub(crate) enum Error {
#[error("Failed to encrypt data. {0}")]
Encrypt(String),
#[error("Failed to decrypt data. {0}")]
Decrypt(String),
#[error(transparent)]
Other(#[from] anyhow::Error),
}