(address: string)
| 407 | } |
| 408 | |
| 409 | public toggleCustomServer(address: string): CustomServer[] { |
| 410 | const server = this.customServers.find(s => s.address === address); |
| 411 | if (server) { |
| 412 | server.enabled = !server.enabled; |
| 413 | this.saveCustomServersToStorage(); |
| 414 | |
| 415 | if (server.enabled && server.status === 'online') { |
| 416 | this.addServer(address); |
| 417 | } else { |
| 418 | this.removeServer(address); |
| 419 | } |
| 420 | } |
| 421 | |
| 422 | return [...this.customServers]; |
| 423 | } |
| 424 | |
| 425 | public updateCustomServerStatus(address: string, status: 'online' | 'offline'): CustomServer[] { |
| 426 | const server = this.customServers.find(s => s.address === address); |
no test coverage detected