public/script/controller.js
// indicates whether the dialog was manually requested by the user.
indicates whether the dialog was manually requested by the user.
indicates whether the dialog was manually requested by the user .
async displayConfiguration(manual) {
        const { rooms } = await this.#connection.send({ command: 'environment-rooms' });
        if (this.#dialogs.notConnected.open)
            this.#dialogs.notConnected.close();
        this.toggleInterface( false);
        if (!this.#room || !rooms.includes(this.#room) || manual)
            this.#room = await this.selectRoom(rooms);
        const { services } = await this.#connection.send({
            command: 'environment-services',
            room: this.#room,
        });
        while (this.#container.firstChild)
            this.#container.removeChild(this.#container.firstChild);
        this.toggleInterface( true);
        this.#bindings = [];
        for (const service of services)
            await this.initializeService(service);
    }
async displayConfiguration ( manual ) { const { rooms } = await this . #connection . send ( { command : 'environment-rooms' } ) ; if ( this . #dialogs . notConnected . open ) this . #dialogs . notConnected . close ( ) ; this . toggleInterface ( false ) ; if ( ! this . #room || ! rooms . includes ( this . #room ) || manual ) this . #room = await this . selectRoom ( rooms ) ; const { services } = await this . #connection . send ( { command : 'environment-services' , room : this . #room , } ) ; while ( this . #container . firstChild ) this . #container . removeChild ( this . #container . firstChild ) ; this . toggleInterface ( true ) ; this . #bindings = [ ] ; for ( const service of services ) await this . initializeService ( service ) ; }
indicates whether the dialog was manually requested by the user.
indicates whether the dialog was manually requested by the user .
// (1) Close the connection dialog if it's open, as we are now connected, as well as the // user interface which shouldn't be visible during this operation. /* enabled= */ // (2) Require the user to select a valid room which this controller is responsible for. // (3) Fetch the list of services that exist for that room. // (4) Clear the list of displayed services, and add each of the services to the container // after clearing all services that are already being displayed, if any. /* enabled= */