summaryrefslogtreecommitdiff
path: root/web/share/js/kvm/hid.js
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2023-03-19 01:17:31 +0200
committerMaxim Devaev <[email protected]>2023-03-19 02:16:20 +0200
commit84563553b8a2f00bbb4b1559029f77ad225627f4 (patch)
tree6795ccb04bff10d2c2bd09c1ce6381f381727007 /web/share/js/kvm/hid.js
parent097dbc517df4fcfb8d37d958744b1eb1f0e8d8b6 (diff)
fixed msd parts api
Diffstat (limited to 'web/share/js/kvm/hid.js')
-rw-r--r--web/share/js/kvm/hid.js9
1 files changed, 3 insertions, 6 deletions
diff --git a/web/share/js/kvm/hid.js b/web/share/js/kvm/hid.js
index 30cb8690..89a3134c 100644
--- a/web/share/js/kvm/hid.js
+++ b/web/share/js/kvm/hid.js
@@ -198,12 +198,9 @@ export function Hid(__getGeometry, __recorder) {
};
self.setKeymaps = function(state) {
- let selected = tools.storage.get("hid.pak.keymap", state.keymaps["default"]);
- let html = "";
- for (let variant of state.keymaps.available) {
- html += `<option value=${variant} ${variant === selected ? "selected" : ""}>${variant}</option>`;
- }
- $("hid-pak-keymap-selector").innerHTML = html;
+ let el = $("hid-pak-keymap-selector");
+ tools.selector.setValues(el, state.keymaps.available);
+ tools.selector.setSelectedValue(el, tools.storage.get("hid.pak.keymap", state.keymaps["default"]));
};
var __releaseAll = function() {