This commit is contained in:
retoor 2026-08-16 04:01:17 +02:00
parent 8db0efff29
commit 62910b0726
3 changed files with 6 additions and 0 deletions

View File

@ -27,6 +27,7 @@ export class GameFarm {
async load() { async load() {
try { try {
const data = await Http.getJson(this.stateUrl); const data = await Http.getJson(this.stateUrl);
if (window.app && window.app.dialog && window.app.dialog.isOpen) return;
this.render(data.farm); this.render(data.farm);
} catch (error) { } catch (error) {
return; return;

View File

@ -119,6 +119,7 @@ export class ModalManager {
e.preventDefault(); e.preventDefault();
e.stopImmediatePropagation(); e.stopImmediatePropagation();
const proceed = () => { const proceed = () => {
if (!el.isConnected) return;
el.dataset.confirmed = "1"; el.dataset.confirmed = "1";
el.click(); el.click();
}; };

View File

@ -86,6 +86,10 @@ export class AppDialog extends Component {
}); });
} }
get isOpen() {
return this.overlay.classList.contains("visible");
}
open(mode, options) { open(mode, options) {
const opts = options || {}; const opts = options || {};
this.mode = mode; this.mode = mode;