mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 01:00:29 +08:00
refactoring
This commit is contained in:
parent
517e79fd65
commit
007371d30b
@ -484,18 +484,7 @@ export function Switch() {
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<td>Simulate display on inactive port:</td>
|
||||
<td align="right">
|
||||
<div class="switch-box">
|
||||
<input
|
||||
type="checkbox" id="__switch-port-dummy-switch"
|
||||
${pa.video.dummy ? "checked" : ""}
|
||||
/>
|
||||
<label for="__switch-port-dummy-switch">
|
||||
<span class="switch-inner"></span>
|
||||
<span class="switch"></span>
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
<td align="right">${tools.sw.makeItem("__switch-port-dummy-switch", pa.video.dummy)}</td>
|
||||
</tr>
|
||||
</table>
|
||||
`;
|
||||
|
||||
@ -265,6 +265,26 @@ export var tools = new function() {
|
||||
};
|
||||
};
|
||||
|
||||
self.sw = new function() {
|
||||
return {
|
||||
"makeItem": function(id, checked) {
|
||||
id = tools.escape(id);
|
||||
return `
|
||||
<div class="switch-box">
|
||||
<input
|
||||
type="checkbox" id="${id}"
|
||||
${checked ? "checked" : ""}
|
||||
/>
|
||||
<label for="${id}">
|
||||
<span class="switch-inner"></span>
|
||||
<span class="switch"></span>
|
||||
</label>
|
||||
</div>
|
||||
`;
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
self.radio = new function() {
|
||||
return {
|
||||
"makeItem": function(name, title, value) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user