~/hooky

hooky/command/public/glue.js -rw-r--r-- 891 B
c1f59a62 — Arthur Melton can get the data sent 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
23
24
25
26
const invoke = window.__TAURI__.invoke

export async function invokeGen(features, payload, sendTo) {
  document.getElementById("GenCover").style.display = "block";
  document.getElementById("setup").style.display = "none";
  await invoke("gen",
               {features : features, payload : payload, sendTo : sendTo});
  document.getElementById("GenCover").style.display = "none";
  document.getElementById("dashboard").style.display = "block";
}

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;
}