mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
unblocking infinite cycle
This commit is contained in:
parent
299252b650
commit
d746d707b5
@ -90,7 +90,7 @@ function showDialog() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
reload();
|
setTimeout(reload, 100);
|
||||||
|
|
||||||
$(document).bind('keydown', 'ctrl+e', e => {
|
$(document).bind('keydown', 'ctrl+e', e => {
|
||||||
showDialog();
|
showDialog();
|
||||||
|
@ -62,18 +62,6 @@ async function call(method, url, data) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (utils.isElectron()) {
|
|
||||||
const ipc = require('electron').ipcRenderer;
|
|
||||||
|
|
||||||
ipc.on('server-response', (event, arg) => {
|
|
||||||
console.log(utils.now(), "Response #" + arg.requestId + ": " + arg.statusCode);
|
|
||||||
|
|
||||||
reqResolves[arg.requestId](arg.body);
|
|
||||||
|
|
||||||
delete reqResolves[arg.requestId];
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
async function ajax(url, method, data) {
|
async function ajax(url, method, data) {
|
||||||
const options = {
|
const options = {
|
||||||
url: baseApiUrl + url,
|
url: baseApiUrl + url,
|
||||||
@ -93,6 +81,20 @@ async function ajax(url, method, data) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
if (utils.isElectron()) {
|
||||||
|
const ipc = require('electron').ipcRenderer;
|
||||||
|
|
||||||
|
ipc.on('server-response', (event, arg) => {
|
||||||
|
console.log(utils.now(), "Response #" + arg.requestId + ": " + arg.statusCode);
|
||||||
|
|
||||||
|
reqResolves[arg.requestId](arg.body);
|
||||||
|
|
||||||
|
delete reqResolves[arg.requestId];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, 100);
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
get,
|
get,
|
||||||
post,
|
post,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user