config hash to clipboard
#98
This copies the hash of a success config upload in vbot to clipboard.
- displayInfoBox(tr("Succesful config upload"), tr("Config %s has been uploaded.\n%s", config, data["message"]))
+ local regex = ': (.*)'
+ local re = regexMatch(data["message"], regex)[1]
+ if #re ~= 0 then
+ g_window.setClipboardText(re[2])
+ end
+ displayInfoBox(tr("Succesful config upload"), tr("Config %s has been uploaded.\n%s", config, data["message"] .. (#re ~= 0 and '\n\n' .. re[2] ..' copied to clipboard')))
- remove | + add
29 May 2022