mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-16 11:23:10 +02:00
Fix backend issues in desktop app (#4995)
# Description of Changes Fixes two distinct but related issues in the backend of the desktop app: - Correctly shows tools as unavaialable when the backend doesn't have the dependencies or has disabled them etc. (same as web version - this primarily didn't work on desktop because the app spawns before the backend is running) - Fixes infinite re-rendering issues caused by the app polling whether the backend is healthy or not
This commit is contained in:
@@ -42,6 +42,7 @@ export interface AppConfig {
|
||||
appVersion?: string;
|
||||
machineType?: string;
|
||||
activeSecurity?: boolean;
|
||||
dependenciesReady?: boolean;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,8 +4,6 @@ export function useBackendHealth(): BackendHealthState {
|
||||
return {
|
||||
status: 'healthy',
|
||||
message: null,
|
||||
isChecking: false,
|
||||
lastChecked: Date.now(),
|
||||
error: null,
|
||||
isHealthy: true,
|
||||
};
|
||||
|
||||
@@ -3,8 +3,6 @@ export type BackendStatus = 'stopped' | 'starting' | 'healthy' | 'unhealthy';
|
||||
export interface BackendHealthState {
|
||||
status: BackendStatus;
|
||||
message?: string | null;
|
||||
lastChecked?: number;
|
||||
isChecking: boolean;
|
||||
error: string | null;
|
||||
isHealthy: boolean;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user