CloseAllModals closes all open modals with cancelled result This is called when the FE requests a resync (page refresh or new client)
()
| 476 | // CloseAllModals closes all open modals with cancelled result |
| 477 | // This is called when the FE requests a resync (page refresh or new client) |
| 478 | func (c *ClientImpl) CloseAllModals() { |
| 479 | c.OpenModalsLock.Lock() |
| 480 | modalIds := make([]string, 0, len(c.OpenModals)) |
| 481 | for modalId := range c.OpenModals { |
| 482 | modalIds = append(modalIds, modalId) |
| 483 | } |
| 484 | c.OpenModalsLock.Unlock() |
| 485 | |
| 486 | for _, modalId := range modalIds { |
| 487 | c.CloseModal(modalId, false) |
| 488 | } |
| 489 | } |
| 490 | |
| 491 | func (c *ClientImpl) DeclareSecret(name string, desc string, optional bool) { |
| 492 | c.SecretsLock.Lock() |
no test coverage detected