-
Notifications
You must be signed in to change notification settings - Fork 705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add unhealthy icon reminder #665
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
💵 To receive payouts, sign up on Algora, link your Github account and connect with Stripe. |
The icon will be marked as failed when the screenpipe status is unhealthy. The failed icon is "screenpipe-app-tauri/src-tauri/icons/screenpipe-logo-tray-failed.png" @louis030195 |
@@ -45,6 +46,18 @@ export function useHealthCheck() { | |||
throw new Error(`http error! status: ${response.status}`); | |||
} | |||
const data: HealthCheckResponse = await response.json(); | |||
console.log(data); | |||
if(data.status=="unhealthy"){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you use linter
pub fn set_tray_health_icon(app_handle: tauri::AppHandle<tauri::Wry>) { | ||
|
||
if let Some(main_tray) = app_handle.tray_by_id("screenpipe_main") { | ||
let _ =main_tray.set_icon(Some(tauri::image::Image::from_path("icons/screenpipe-logo-tray-black.png").unwrap())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same, use linter
@ToSeven nice! any way you can make the icon looks like something is broken? this does not indicate it currently |
how about this icon? @louis030195 |
yeah this is good! |
3eea5e2 |
how to test? atm icon does not change The icon will be in failed status when you kill the screenpipe backend process. Actually, the icon will change as soon as the health check is deemed unhealthy. @louis030195 |
@ToSeven this did not work, backend was down but it was showing the update icon for some reason ( |
I cannot successfully compile Screenpipe on Windows. I tested this feature when I committed this PR, and it worked well. I am waiting for a stable version to figure out the true reason. @louis030195 |
@ToSeven tested again and indeed it works are you on windows? i noticed on windows the background is sometimes black and sometimes white so need to handle this (maybe) but on macos it's always black background so icon border hsould be white any chance you can at least make icon white for macos? i added $50 to the bounty then we can merge |
Okay, I will commit a new PR. |
/approve @ToSeven okay merging, can you send pr for the white one plz? can do macos only for the white icon border if you want (no idea how to detect the color of windows) |
@louis030195: The claim has been successfully added to reward-all. You can visit your dashboard to complete the payment. |
app crashes now :( only happens in |
// if (data.status == "unhealthy") {
// try {
// await invoke("set_tray_unhealth_icon");
// } catch (error) {
// console.error("set unhealthy icon:", error);
// }
// } else {
// await invoke("set_tray_health_icon");
// console.log("set healthy icon:");
// } this fix the crash.. |
app is down |
Today I test this code on Windows, and it works well. Did this error happen on the Mac platform? |
I am on windows, and I do not notice your situation. (> i noticed on windows the background is sometimes black and sometimes white so need to handle this (maybe) @louis030195 |
yes its macos |
/claim #471