Added "terminated" and "other" events to "server-status", fixed icon

This commit is contained in:
Ryan Butler
2022-04-26 22:11:06 -04:00
parent ae881565e8
commit ffda9f6b2e
3 changed files with 6 additions and 3 deletions

1
.gitattributes vendored
View File

@@ -1 +0,0 @@
* text eol=lf

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 80 KiB

View File

@@ -79,12 +79,16 @@ fn main() {
CommandEvent::Stderr(s) => ("stderr", s),
CommandEvent::Stdout(s) => ("stdout", s),
CommandEvent::Error(s) => ("error", s),
_ => continue,
CommandEvent::Terminated(s) => ("terminated", format!("{s:?}")),
_ => ("other", "".to_string()),
};
app_handle
.emit_all("server-stdio", emit_me)
.emit_all("server-status", emit_me)
.expect("Failed to emit");
}
app_handle
.emit_all("server-status", ("other", "receiver cancelled"))
.expect("Failed to emit");
});
}
Ok(())