diff --git a/server/go/web/ws_handlers.go b/server/go/web/ws_handlers.go index b24afa7..7b39254 100644 --- a/server/go/web/ws_handlers.go +++ b/server/go/web/ws_handlers.go @@ -1806,7 +1806,9 @@ func (h *wsHub) handleSetDeviceRemark(c *wsClient, raw []byte) { "reason": reason, "error": msg, }) - c.queue(mustJSON(map[string]any{"cmd": replyCmd, "ok": false, "msg": msg})) + // id lets the page drop a late reply meant for a dialog it has since + // closed and replaced with another device's. + c.queue(mustJSON(map[string]any{"cmd": replyCmd, "ok": false, "id": id, "msg": msg})) } // An unparsable payload (e.g. a non-string remark) must be rejected, not // treated as an empty remark: empty clears the label. @@ -1877,7 +1879,9 @@ func (h *wsHub) handleSetDeviceGroup(c *wsClient, raw []byte) { "reason": reason, "error": msg, }) - c.queue(mustJSON(map[string]any{"cmd": replyCmd, "ok": false, "msg": msg})) + // id lets the page drop a late reply meant for a dialog it has since + // closed and replaced with another device's. + c.queue(mustJSON(map[string]any{"cmd": replyCmd, "ok": false, "id": id, "msg": msg})) } if err := json.Unmarshal(raw, &in); err != nil { fail("Invalid request", "invalid_request") diff --git a/server/web/index.html b/server/web/index.html index e033650..497613a 100644 --- a/server/web/index.html +++ b/server/web/index.html @@ -725,6 +725,8 @@ margin-top: 1px; } .card-menu-item.term .card-menu-icon { color: #4caf50; } + .card-menu-item.edit .card-menu-icon { color: #4dabf7; } + .card-menu-item.group .card-menu-icon { color: #b197fc; } .card-menu-item.bind .card-menu-icon { color: #e67e22; } .card-menu-item.transfer .card-menu-icon { color: #d68910; } .card-menu-item.del .card-menu-icon { color: #e74c3c; } @@ -2193,7 +2195,7 @@ -