blob: bc5d8a780ff0152e2873f6aeaec0e059505dcbbd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
import ListServers from './login/listServers';
import CreateServer from './login/createServer';
import Login from './login/login';
/**
* Manages commands related to the login page
*/
export default class LoginCommands {
/**
* Initializes the login commands
* @param {Interface} iface Interface for inter-object communication
*/
constructor(iface) {
this.iface = iface;
this.cmds = [];
this.registerCommands();
}
/**
* Registers all the available commands
*/
registerCommands() {
this.cmds.push(new ListServers(this.iface));
this.cmds.push(new CreateServer(this.iface));
this.cmds.push(new Login(this.iface));
}
/**
* Destroys all attached commands
*/
destroy() {
for (let cmd of this.cmds) {
cmd.destroy();
}
}
}
|