fix: add sync subscription webui and check credential web ui

This commit is contained in:
2025-06-08 00:36:59 +08:00
parent 946d4e8c2c
commit d2aab7369d
46 changed files with 1120 additions and 195 deletions

View File

@@ -9,3 +9,5 @@ quirks_path = { workspace = true }
snafu = { workspace = true }
anyhow = { workspace = true }
bytes = { workspace = true }
serde = { workspace = true }
serde_with = { workspace = true }

View File

@@ -1,3 +1,5 @@
pub mod errors;
pub mod loose;
pub use errors::OptDynErr;
pub use loose::BooleanLike;

View File

@@ -0,0 +1,19 @@
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum BooleanLike {
Boolean(bool),
String(String),
Number(i32),
}
impl BooleanLike {
pub fn as_bool(&self) -> bool {
match self {
BooleanLike::Boolean(b) => *b,
BooleanLike::String(s) => s.to_lowercase() == "true",
BooleanLike::Number(n) => *n != 0,
}
}
}