2025-08-11 17:44:01 +08:00
|
|
|
// ota 是否连接成功,修改成对应的样式
|
2025-11-16 01:26:10 +08:00
|
|
|
export function otaStatusStyle(flan) {
|
2026-01-12 11:00:50 +08:00
|
|
|
const otaStatusElement = document.getElementById('otaStatus');
|
|
|
|
|
if (otaStatusElement) {
|
|
|
|
|
if (flan) {
|
|
|
|
|
otaStatusElement.textContent = 'OTA已连接';
|
|
|
|
|
otaStatusElement.style.color = 'green';
|
|
|
|
|
} else {
|
|
|
|
|
otaStatusElement.textContent = 'OTA未连接';
|
|
|
|
|
otaStatusElement.style.color = 'red';
|
|
|
|
|
}
|
2025-08-11 17:44:01 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-08-11 18:04:01 +08:00
|
|
|
// 更新Opus库状态显示
|
|
|
|
|
export function updateScriptStatus(message, type) {
|
|
|
|
|
const statusElement = document.getElementById('scriptStatus');
|
|
|
|
|
if (statusElement) {
|
|
|
|
|
statusElement.textContent = message;
|
|
|
|
|
statusElement.className = `script-status ${type}`;
|
|
|
|
|
statusElement.style.display = 'block';
|
|
|
|
|
statusElement.style.width = 'auto';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|