Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

add unhealthy icon reminder #665

wants to merge 3 commits into from

Conversation

ToSeven
Copy link
Contributor

@ToSeven ToSeven commented Nov 11, 2024

/claim #471

Copy link

vercel bot commented Nov 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
screenpipe ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 15, 2024 9:19am

@algora-pbc algora-pbc bot mentioned this pull request Nov 11, 2024
Copy link

algora-pbc bot commented Nov 11, 2024

💵 To receive payouts, sign up on Algora, link your Github account and connect with Stripe.

@ToSeven
Copy link
Contributor Author

ToSeven commented Nov 11, 2024

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"){
Copy link
Collaborator

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()));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same, use linter

@louis030195
Copy link
Collaborator

@ToSeven nice!

any way you can make the icon looks like something is broken?

this does not indicate it currently

Screenshot 2024-11-11 at 8 35 20 AM

@ToSeven
Copy link
Contributor Author

ToSeven commented Nov 14, 2024

@ToSeven nice!

any way you can make the icon looks like something is broken?

this does not indicate it currently

Screenshot 2024-11-11 at 8 35 20 AM

how about this icon? @louis030195
image

@louis030195
Copy link
Collaborator

@ToSeven nice!
any way you can make the icon looks like something is broken?
this does not indicate it currently
Screenshot 2024-11-11 at 8 35 20 AM

how about this icon? @louis030195 image

yeah this is good!

@ToSeven
Copy link
Contributor Author

ToSeven commented Nov 18, 2024

3eea5e2
I have changed my code according to what you advised. @louis030195

@louis030195
Copy link
Collaborator

Screenshot 2024-11-18 at 9 32 21 AM

how to test? atm icon does not change

@ToSeven
Copy link
Contributor Author

ToSeven commented Nov 20, 2024

Screenshot 2024-11-18 at 9 32 21 AM 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

@louis030195
Copy link
Collaborator

@ToSeven this did not work, backend was down but it was showing the update icon for some reason (bun tauri dev)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants