[Feature] Create assembly samples from home page (#6747)
* fix: how? * fix: 0 byte thumbnail png loading bug * fix: adding navigate to single file back * fix: cargo fmt * fix: sorting files to match manifest and unit test * fix: restoring back to main * fix: cargo fmt * fix: ope, I forgot I deleted some code that renamed single files to the samples name to track easier within the file tree * fix: ope * Update src/lib/commandBarConfigs/applicationCommandConfig.ts Co-authored-by: Frank Noirot <frank@zoo.dev> * fix: unique name for project, ope * fix: filtered samples for web and skeleton create a sample command * fix: Create A Sample specifically desktop home page instead of overloading the add to file * fix: hiding source * fix: gotcha on add to file with existing project default args and assemblies --------- Co-authored-by: Frank Noirot <frank@zoo.dev>
This commit is contained in:
@ -220,6 +220,7 @@ struct KclMetadata {
|
||||
multiple_files: bool,
|
||||
title: String,
|
||||
description: String,
|
||||
files: Vec<String>,
|
||||
}
|
||||
|
||||
// Function to read and parse .kcl files
|
||||
@ -263,12 +264,16 @@ fn get_kcl_metadata(project_path: &Path, files: &[String]) -> Option<KclMetadata
|
||||
primary_kcl_file.clone()
|
||||
};
|
||||
|
||||
let mut files = files.to_vec();
|
||||
files.sort();
|
||||
|
||||
Some(KclMetadata {
|
||||
file: primary_kcl_file,
|
||||
path_from_project_directory_to_first_file: path_from_project_dir,
|
||||
multiple_files: files.len() > 1,
|
||||
title,
|
||||
description,
|
||||
files,
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user