You've already forked AstralRinth
forked from didirus/AstralRinth
Profile mods page (#119)
* Finish profile mods page * commit missing * finish pr * Run lint
This commit is contained in:
@@ -355,7 +355,7 @@ pub async fn infer_data_from_files(
|
||||
return_projects.insert(
|
||||
path,
|
||||
Project {
|
||||
disabled: false,
|
||||
disabled: file_name.ends_with(".disabled"),
|
||||
metadata: ProjectMetadata::Modrinth {
|
||||
project: Box::new(project.clone()),
|
||||
version: Box::new(version.clone()),
|
||||
@@ -364,9 +364,17 @@ pub async fn infer_data_from_files(
|
||||
.filter(|x| x.team_id == project.team)
|
||||
.cloned()
|
||||
.collect::<Vec<_>>(),
|
||||
update_version: update_versions
|
||||
.get(&hash)
|
||||
.map(|val| Box::new(val.clone())),
|
||||
update_version: if let Some(value) =
|
||||
update_versions.get(&hash)
|
||||
{
|
||||
if value.id != version.id {
|
||||
Some(Box::new(value.clone()))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
} else {
|
||||
None
|
||||
},
|
||||
incompatible: !version.loaders.contains(
|
||||
&profile
|
||||
.metadata
|
||||
@@ -404,7 +412,7 @@ pub async fn infer_data_from_files(
|
||||
path.clone(),
|
||||
Project {
|
||||
sha512: hash,
|
||||
disabled: path.ends_with(".disabled"),
|
||||
disabled: file_name.ends_with(".disabled"),
|
||||
metadata: ProjectMetadata::Unknown,
|
||||
file_name,
|
||||
},
|
||||
@@ -458,7 +466,7 @@ pub async fn infer_data_from_files(
|
||||
path.clone(),
|
||||
Project {
|
||||
sha512: hash,
|
||||
disabled: path.ends_with(".disabled"),
|
||||
disabled: file_name.ends_with(".disabled"),
|
||||
file_name,
|
||||
metadata: ProjectMetadata::Inferred {
|
||||
title: Some(
|
||||
@@ -524,7 +532,7 @@ pub async fn infer_data_from_files(
|
||||
path.clone(),
|
||||
Project {
|
||||
sha512: hash,
|
||||
disabled: path.ends_with(".disabled"),
|
||||
disabled: file_name.ends_with(".disabled"),
|
||||
file_name,
|
||||
metadata: ProjectMetadata::Inferred {
|
||||
title: Some(if pack.name.is_empty() {
|
||||
@@ -589,7 +597,7 @@ pub async fn infer_data_from_files(
|
||||
path.clone(),
|
||||
Project {
|
||||
sha512: hash,
|
||||
disabled: path.ends_with(".disabled"),
|
||||
disabled: file_name.ends_with(".disabled"),
|
||||
file_name,
|
||||
metadata: ProjectMetadata::Inferred {
|
||||
title: Some(pack.name.unwrap_or(pack.id)),
|
||||
@@ -654,7 +662,7 @@ pub async fn infer_data_from_files(
|
||||
path.clone(),
|
||||
Project {
|
||||
sha512: hash,
|
||||
disabled: path.ends_with(".disabled"),
|
||||
disabled: file_name.ends_with(".disabled"),
|
||||
file_name,
|
||||
metadata: ProjectMetadata::Inferred {
|
||||
title: Some(
|
||||
@@ -719,7 +727,7 @@ pub async fn infer_data_from_files(
|
||||
path.clone(),
|
||||
Project {
|
||||
sha512: hash,
|
||||
disabled: path.ends_with(".disabled"),
|
||||
disabled: file_name.ends_with(".disabled"),
|
||||
file_name,
|
||||
metadata: ProjectMetadata::Inferred {
|
||||
title: None,
|
||||
@@ -739,7 +747,7 @@ pub async fn infer_data_from_files(
|
||||
path.clone(),
|
||||
Project {
|
||||
sha512: hash,
|
||||
disabled: path.ends_with(".disabled"),
|
||||
disabled: file_name.ends_with(".disabled"),
|
||||
file_name,
|
||||
metadata: ProjectMetadata::Unknown,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user