* fixes

* prettier

* more bugs

* changes

* more fixes

* prettier, fmt, clippy

* fix regressed error

* println, console.log

* fix imports

---------

Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
Co-authored-by: Jai A <jaiagr+gpg@pm.me>
This commit is contained in:
Wyatt Verchere
2023-08-04 20:33:50 -07:00
committed by GitHub
parent 6a76811bed
commit a35dd67b77
27 changed files with 357 additions and 100 deletions

View File

@@ -303,7 +303,10 @@ impl Profile {
let profile = crate::api::profile::get(&path, None).await?;
if let Some(profile) = profile {
emit_warning(&format!("Profile {} has crashed! Visit the logs page to see a crash report.", profile.metadata.name)).await?;
// Hide warning if profile is not yet installed
if profile.install_stage == ProfileInstallStage::Installed {
emit_warning(&format!("Profile {} has crashed! Visit the logs page to see a crash report.", profile.metadata.name)).await?;
}
}
Ok::<(), crate::Error>(())
@@ -354,7 +357,7 @@ impl Profile {
}
emit_profile(
profile.uuid,
profile.get_profile_full_path().await?,
&profile_path_id,
&profile.metadata.name,
ProfilePayloadType::Synced,
)
@@ -856,7 +859,7 @@ impl Profiles {
pub async fn insert(&mut self, profile: Profile) -> crate::Result<&Self> {
emit_profile(
profile.uuid,
profile.get_profile_full_path().await?,
&profile.profile_id(),
&profile.metadata.name,
ProfilePayloadType::Added,
)
@@ -943,7 +946,7 @@ impl Profiles {
// if path exists in the state but no longer in the filesystem, remove it from the state list
emit_profile(
profile.uuid,
profile.get_profile_full_path().await?,
&profile_path_id,
&profile.metadata.name,
ProfilePayloadType::Removed,
)