refactor 1

This commit is contained in:
Julian Freeman
2026-04-18 15:55:03 -04:00
parent fe86431899
commit 2aaa330c9a
19 changed files with 1031 additions and 640 deletions

View File

@@ -0,0 +1,65 @@
use serde::{Deserialize, Serialize};
use crate::winget::{PostInstallStep, Software};
#[derive(Clone, Serialize, Deserialize)]
pub struct AppSettings {
pub repo_url: String,
}
impl Default for AppSettings {
fn default() -> Self {
Self {
repo_url: "https://karlblue.github.io/winget-repo".to_string(),
}
}
}
#[derive(Clone, Serialize, Deserialize)]
pub struct EssentialsRepo {
pub version: String,
pub essentials: Vec<Software>,
}
#[derive(Clone, Serialize, Deserialize)]
pub struct InstallTask {
pub id: String,
pub version: Option<String>,
#[serde(default)]
pub use_manifest: bool,
pub manifest_url: Option<String>,
#[serde(default = "default_true")]
pub enable_post_install: bool,
}
fn default_true() -> bool {
true
}
#[derive(Clone, Serialize)]
pub struct LogPayload {
pub id: String,
pub timestamp: String,
pub command: String,
pub output: String,
pub status: String,
}
#[derive(Clone, Serialize, Deserialize)]
pub struct SyncEssentialsResult {
pub status: String,
pub message: String,
}
#[derive(Clone, Serialize)]
pub struct InstallProgress {
pub id: String,
pub status: String,
pub progress: f32,
}
#[derive(Clone)]
pub struct ResolvedPostInstall {
pub software: Software,
pub steps: Vec<PostInstallStep>,
}