()
| 933 | } |
| 934 | |
| 935 | async function loadState() { |
| 936 | try { |
| 937 | const r = await fetch("/state" + tokenQuery); |
| 938 | state = await r.json(); |
| 939 | render(); |
| 940 | } catch (e) { |
| 941 | toast("Failed to load state"); |
| 942 | } |
| 943 | } |
| 944 | |
| 945 | async function doAction(kind, payload) { |
| 946 | if (kind === "refresh") { toast("Refreshing…"); await loadState(); return; } |
no test coverage detected