web: moved clipboard to own file

This commit is contained in:
Maxim Devaev
2025-05-17 14:41:55 +03:00
parent 18122eff82
commit 1195a9e3be
4 changed files with 82 additions and 46 deletions

View File

@@ -26,6 +26,7 @@
import {ROOT_PREFIX} from "../vars.js";
import {tools, $} from "../tools.js";
import {wm} from "../wm.js";
import {clipboard} from "./clipboard.js";
export function Switch() {
@@ -234,7 +235,7 @@ export function Switch() {
if (edid_id && __state && __state.edids) {
let data = __state.edids.all[edid_id].data;
data = data.replace(/(.{32})/g, "$1\n");
wm.copyTextToClipboard(data);
clipboard.setText(data);
}
};