refactoring

This commit is contained in:
Maxim Devaev
2025-06-03 03:38:23 +03:00
parent 517e79fd65
commit 007371d30b
2 changed files with 21 additions and 12 deletions

View File

@@ -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) {