Implemented right-click menu to remove or download loot (files/screenshots).

This commit is contained in:
Jakob Friedl
2025-10-09 16:25:05 +02:00
parent 3259040daa
commit 504d15fa4d
10 changed files with 177 additions and 58 deletions

View File

@@ -102,6 +102,14 @@ proc websocketHandler(ws: WebSocket, event: WebSocketEvent, message: Message) {.
if payload.len() != 0:
cq.client.sendAgentPayload(payload)
of CLIENT_LOOT_REMOVE:
if not cq.dbDeleteLootById(event.data["lootId"].getStr()):
cq.client.sendEventlogItem(LOG_ERROR, "Failed to delete loot.")
of CLIENT_LOOT_SYNC:
let path = cq.dbGetLootById(event.data["lootId"].getStr()).path
cq.client.sendLootSync(path, readFile(path))
else: discard
of ErrorEvent: