Pass pakeConfig to web

This commit is contained in:
Tw93
2024-05-09 15:32:16 +08:00
parent 7bcaeb6d7e
commit 161ec7f247
5 changed files with 25 additions and 21 deletions

View File

@@ -1,6 +1,6 @@
use serde::Deserialize;
use serde::{Deserialize, Serialize};
#[derive(Debug, Deserialize)]
#[derive(Debug, Serialize, Deserialize)]
pub struct WindowConfig {
pub url: String,
pub transparent: bool,
@@ -10,9 +10,10 @@ pub struct WindowConfig {
pub resizable: bool,
pub url_type: String,
pub always_on_top: bool,
pub disabled_web_shortcuts: bool,
}
#[derive(Debug, Deserialize)]
#[derive(Debug, Serialize, Deserialize)]
pub struct PlatformSpecific<T> {
pub macos: T,
pub linux: T,
@@ -44,7 +45,7 @@ where
pub type UserAgent = PlatformSpecific<String>;
pub type FunctionON = PlatformSpecific<bool>;
#[derive(Debug, Deserialize)]
#[derive(Debug, Serialize, Deserialize)]
pub struct PakeConfig {
pub windows: Vec<WindowConfig>,
pub user_agent: UserAgent,