verify QR paste JSON and allow non-JSON pastes

This commit is contained in:
LenAnderson
2024-07-18 19:47:35 -04:00
parent 896d43ade7
commit 03eb04e8f9
2 changed files with 25 additions and 6 deletions

View File

@ -121,7 +121,7 @@ export class SettingsUi {
});
this.dom.querySelector('#qr--set-paste').addEventListener('click', async()=>{
const text = await navigator.clipboard.readText();
this.currentQrSet.addQuickReply(JSON.parse(text));
this.currentQrSet.addQuickReplyFromText(text);
});
this.dom.querySelector('#qr--set-importQr').addEventListener('click', async()=>{
const inp = document.createElement('input'); {