import {App} from "/assets/App.js"; (async function () { $("#buttons").append(``); $("#restart-bind").click(function () { const self = $(this); self.prop("disabled", true); (async function () { try { alert(await App.RPC.__invoke("named::restart")); } finally { setTimeout(() => { self.prop("disabled", false); }, 5000); } })(); }); })();