Feat: always_on_top CLI Setting (#2715)
* feat: always_on_top cli setting * revision: add user message for configuring settings
This commit is contained in:
1 parent
e42b71b1ba
commit
810f8bbfb8
5 files changed
+74
-13
No files matched your search
@@ -89,6 +89,9 @@ pub struct DioxusConfig {
|
||||
#[serde(default)]
|
||||
pub web: WebConfig,
|
||||
|
||||
#[serde(default)]
|
||||
pub desktop: DesktopConfig,
|
||||
|
||||
#[serde(default)]
|
||||
pub bundle: BundleConfig,
|
||||
}
|
||||
@@ -129,6 +132,7 @@ impl Default for DioxusConfig {
|
||||
pre_compress: true,
|
||||
wasm_opt: Default::default(),
|
||||
},
|
||||
desktop: DesktopConfig::default(),
|
||||
bundle: BundleConfig {
|
||||
identifier: Some(format!("io.github.{name}")),
|
||||
publisher: Some(name),
|
||||
@@ -206,6 +210,22 @@ impl Default for WebConfig {
|
||||
}
|
||||
}
|
||||
|
||||
/// Represents configuration items for the desktop platform.
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct DesktopConfig {
|
||||
/// Describes whether a debug-mode desktop app should be always-on-top.
|
||||
#[serde(default)]
|
||||
pub always_on_top: bool,
|
||||
}
|
||||
|
||||
impl Default for DesktopConfig {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
always_on_top: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// The wasm-opt configuration
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
|
||||
pub struct WasmOptConfig {
|
||||
|
||||
Reference in new issue
Block a user