fix lint errors

This commit is contained in:
proddy
2026-02-15 14:15:55 +01:00
parent 59aa63db0f
commit 35e2954b8b
2 changed files with 11 additions and 13 deletions

View File

@@ -60,18 +60,16 @@ const SystemMonitor = () => {
const { statusMessage, isUploading, progressValue } = useMemo(() => { const { statusMessage, isUploading, progressValue } = useMemo(() => {
const status = data?.status; const status = data?.status;
let message = ''; const message =
if (status && status >= SystemStatusCodes.SYSTEM_STATUS_UPLOADING) { status && status >= SystemStatusCodes.SYSTEM_STATUS_UPLOADING
message = LL.WAIT_FIRMWARE(); ? LL.WAIT_FIRMWARE()
} else if (status === SystemStatusCodes.SYSTEM_STATUS_PENDING_RESTART) { : status === SystemStatusCodes.SYSTEM_STATUS_PENDING_RESTART
message = LL.APPLICATION_RESTARTING(); ? LL.APPLICATION_RESTARTING()
} else if (status === SystemStatusCodes.SYSTEM_STATUS_NORMAL) { : status === SystemStatusCodes.SYSTEM_STATUS_NORMAL
message = LL.RESTARTING_PRE(); ? LL.RESTARTING_PRE()
} else if (status === SystemStatusCodes.SYSTEM_STATUS_ERROR_UPLOAD) { : status === SystemStatusCodes.SYSTEM_STATUS_ERROR_UPLOAD
message = 'Upload Failed'; ? 'Upload Failed'
} else { : LL.RESTARTING_POST();
message = LL.RESTARTING_POST();
}
const uploading = const uploading =
status !== undefined && status >= SystemStatusCodes.SYSTEM_STATUS_UPLOADING; status !== undefined && status >= SystemStatusCodes.SYSTEM_STATUS_UPLOADING;

View File

@@ -23,6 +23,6 @@ export const saveFile = (
}, 100); }, 100);
} catch (error) { } catch (error) {
console.error('Failed to save file:', error); console.error('Failed to save file:', error);
throw new Error(`Unable to save file: ${filename}${extension}`); throw new Error(`Unable to save file: ${filename}${extension}`, { cause: error });
} }
}; };