Files
xiaozhi-esp32-server/main/xiaozhi-server/test/js/ui/dom-helper.js
T
2026-01-20 09:16:45 +08:00

26 lines
840 B
JavaScript

// ota 是否连接成功,修改成对应的样式
export function otaStatusStyle(flan) {
const otaStatusElement = document.getElementById('otaStatus');
if (otaStatusElement) {
if (flan) {
otaStatusElement.textContent = 'OTA已连接';
otaStatusElement.style.color = 'green';
} else {
otaStatusElement.textContent = 'OTA未连接';
otaStatusElement.style.color = 'red';
}
}
}
// 更新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';
}
}