mirror of
https://github.com/openwrt/luci.git
synced 2026-05-31 02:21:50 +08:00
luci-mod-battstatus: interpolate
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
This commit is contained in:
@@ -37,8 +37,8 @@ return baseclass.extend({
|
||||
info.name = "battery-" + dev.replace(" ", "-");
|
||||
ui.showIndicator(info.name, info.status, null, info.state);
|
||||
if (typeof info.color != 'undefined') {
|
||||
info.element = document.querySelector('[data-indicator="${info.name}"]');
|
||||
info.element.innerHTML = '<span style="color:${info.color}">${info.status}</span>';
|
||||
info.element = document.querySelector(`[data-indicator="${info.name}"]`);
|
||||
info.element.innerHTML = `<span style="color:${info.color}">${info.status}</span>`;
|
||||
}
|
||||
|
||||
devices[dev] = info;
|
||||
|
||||
Reference in New Issue
Block a user