replace all window.prompt() with kiri.ui.prompt() for electron. open electron links in os browser

This commit is contained in:
Stewart Allen 2024-06-17 15:21:50 -04:00
commit 995b338946
6 changed files with 86 additions and 56 deletions

View file

@ -1688,12 +1688,13 @@ function createPopOp(type, map) {
const { divid, noteid } = op.note;
const div = $(divid);
if (div) div.onclick = () => {
let note = op.x = prompt('Edit Note for Operation', poppedRec.note || '');
if (note !== undefined && note !== null) {
$(noteid).innerText = poppedRec.note = note;
API.conf.save();
}
func.opRender();
API.uc.prompt('Edit Note for Operation', poppedRec.note || '').then(note => {
if (note !== undefined && note !== null) {
poppedRec.note = op.x = note;
API.conf.save();
}
func.opRender();
});
};
const note = $(noteid);
if (note) note.innerText = poppedRec.note || '';