feat: misc improvements

This commit is contained in:
2025-03-18 23:27:17 +00:00
parent fe1a32f31b
commit 1191cdd95c
15 changed files with 264 additions and 68 deletions

View File

@ -20,7 +20,6 @@ pub struct Package {
pub namespace: String,
pub name: String,
pub description: String,
pub icon: String,
pub loc: Option<Local>,
pub rmt: Option<Remote>
}
@ -50,6 +49,7 @@ pub struct Local {
pub path: PathBuf,
pub dependencies: BTreeSet<PkgKey>,
pub status: Status,
pub icon: String,
}
#[derive(Clone, Serialize, Deserialize)]
@ -58,6 +58,7 @@ pub struct Remote {
pub version: String,
pub package_url: String,
pub download_url: String,
pub icon: String,
pub deprecated: bool,
pub nsfw: bool,
pub categories: Vec<String>,
@ -76,11 +77,11 @@ impl Package {
namespace: p.owner,
name: v.name,
description: v.description,
icon: v.icon,
loc: None,
rmt: Some(Remote {
package_url: p.package_url,
download_url: v.download_url,
icon: v.icon,
deprecated: p.is_deprecated,
nsfw: p.has_nsfw_content,
version: v.version_number,
@ -107,10 +108,10 @@ impl Package {
namespace: Self::dir_to_namespace(&dir)?,
name: mft.name.clone(),
description: mft.description.clone(),
icon,
loc: Some(Local {
version: mft.version_number,
path: dir.to_owned(),
icon,
status,
dependencies
}),