mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-03-16 06:36:32 +03:00
fix lint errors
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -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 });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user