add the pop-up to the entry manager

This commit is contained in:
buzz-lightsnack-2007 2024-04-27 23:35:27 +08:00
parent b7b19fed6f
commit a6e7941bcc

View file

@ -3,19 +3,18 @@
import Tabs from "/scripts/GUI/tabs.js"; import Tabs from "/scripts/GUI/tabs.js";
import Window from "/scripts/GUI/window.js"; import Window from "/scripts/GUI/window.js";
import MenuEntry from "./menu.js"; import MenuEntry from "./menu.js";
import ManagedSidebar from "./sidebar.js"; import ManagedPopup from "./popup.js";
import IconIndicator from "./icons.js"; import IconIndicator from "./icons.js";
import check from "/scripts/external/check.js"; import check from "/scripts/external/check.js";
import {read} from "/scripts/secretariat.js";
export default class EntryManager { export default class EntryManager {
constructor () { constructor () {
// Initialize the entries. // Initialize the entries.
this.instances = {}; this.instances = {};
this.instances.popup = new ManagedPopup();
this.instances.menu = new MenuEntry(); this.instances.menu = new MenuEntry();
// Initialize the managed sidebar to be called.
ManagedSidebar.manage();
// Add the action listeners. // Add the action listeners.
this.#listen(); this.#listen();
} }
@ -43,6 +42,7 @@ export default class EntryManager {
enable () { enable () {
this.instances.menu.enable(); this.instances.menu.enable();
IconIndicator.enable(); IconIndicator.enable();
this.instances.popup.enable();
} }
/* /*
@ -50,6 +50,7 @@ export default class EntryManager {
*/ */
disable () { disable () {
this.instances.menu.disable(); this.instances.menu.disable();
this.instances.popup.disable();
IconIndicator.disable(); IconIndicator.disable();
} }
} }