~/hooky

hooky/command/public/glue.js -rw-r--r-- 642 B
335dec98 — Arthur Melton command controller 2 years ago
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
const invoke = window.__TAURI__.invoke

export async function invokeGen(features, payload, sendTo) {
  return await invoke(
      "gen", {features : features, payload : payload, sendTo : sendTo});
}

export async function isOn(
    id) { return await document.getElementById(id).checked;}

export async function setPayload() {
  document.getElementById("payload").value =
      await window.__TAURI__.dialog.open();
}

export async function
getPayload() { return document.getElementById("payload").value;}

export async function getIp() {
  return document.getElementById("ip").value + ":" +
         document.getElementById("port").value;
}