21 lines
506 B
JavaScript
21 lines
506 B
JavaScript
import {App} from "/assets/App.js";
|
|
|
|
(async function () {
|
|
$("#buttons").append(`<button id="sync">Force sync</button>`);
|
|
$("#sync").click(function () {
|
|
|
|
const self = $(this);
|
|
self.prop("disabled", true);
|
|
(async function () {
|
|
try {
|
|
alert(await App.RPC.__invoke("netsync::sync"));
|
|
} finally {
|
|
setTimeout(() => {
|
|
location.reload();
|
|
}, 5000);
|
|
}
|
|
|
|
})();
|
|
|
|
});
|
|
})(); |