[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:
Kevin Nadro
2025-05-08 14:41:29 -05:00
committed by GitHub
parent e960d4d8a4
commit e2fd3948f5
7 changed files with 443 additions and 120 deletions

View File

@ -66,7 +66,14 @@ function ProjectCard({
const imageData = await window.electron.readFile(projectImagePath)
const blob = new Blob([imageData], { type: 'image/png' })
const imageUrl = URL.createObjectURL(blob)
setImageUrl(imageUrl)
if (blob.size > 0) {
/**
* Off chance that a thumbnail.png is cancelled writing and ends up writing 0 bytes
* We do not want to load a 0 byte image
*/
setImageUrl(imageUrl)
}
}
}