Update
This commit is contained in:
parent
8db0efff29
commit
62910b0726
@ -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;
|
||||||
|
|||||||
@ -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();
|
||||||
};
|
};
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user