(address: string)
| 426 | } |
| 427 | |
| 428 | public toggleCustomServer(address: string): CustomServer[] { |
| 429 | const server = this.customServers.find(s => s.address === address); |
| 430 | if (server) { |
| 431 | server.enabled = !server.enabled; |
| 432 | this.saveCustomServersToStorage(); |
| 433 | |
| 434 | if (server.enabled && server.status === 'online') { |
| 435 | this.addServer(address); |
| 436 | } else { |
| 437 | this.removeServer(address); |
| 438 | } |
| 439 | } |
| 440 | |
| 441 | return [...this.customServers]; |
| 442 | } |
| 443 | |
| 444 | public updateCustomServerStatus(address: string, status: 'online' | 'offline'): CustomServer[] { |
| 445 | const server = this.customServers.find(s => s.address === address); |
no test coverage detected