mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-31 18:11:54 +08:00
pikvm/pikvm#803: Ability to use LEDs in GPIO title
This commit is contained in:
@@ -72,7 +72,16 @@ export function Gpio(__recorder) {
|
||||
self.setModel = function(model) {
|
||||
tools.feature.setEnabled($("gpio-dropdown"), model.view.table.length);
|
||||
if (model.view.table.length) {
|
||||
$("gpio-menu-button").innerHTML = `${model.view.header.title}`;
|
||||
let title = [];
|
||||
let last_is_label = false;
|
||||
for (let item of model.view.header.title) {
|
||||
if (last_is_label && item.type === "label") {
|
||||
title.push("<span></span>");
|
||||
}
|
||||
last_is_label = (item.type === "label");
|
||||
title.push(__createItem(item));
|
||||
}
|
||||
$("gpio-menu-button").innerHTML = title.join(" ");
|
||||
}
|
||||
|
||||
let content = "<table class=\"kv\">";
|
||||
|
||||
Reference in New Issue
Block a user