mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
move sleep to general utisl function
This commit is contained in:
parent
d2975bbd21
commit
a168edb168
@ -359,6 +359,12 @@ function isValidAttributeName(name) {
|
|||||||
return ATTR_NAME_MATCHER.test(name);
|
return ATTR_NAME_MATCHER.test(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function sleep(time_ms) {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
setTimeout(resolve, time_ms);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
reloadFrontendApp,
|
reloadFrontendApp,
|
||||||
parseDate,
|
parseDate,
|
||||||
@ -402,5 +408,6 @@ export default {
|
|||||||
initHelpButtons,
|
initHelpButtons,
|
||||||
openHelp,
|
openHelp,
|
||||||
filterAttributeName,
|
filterAttributeName,
|
||||||
isValidAttributeName
|
isValidAttributeName,
|
||||||
|
sleep,
|
||||||
};
|
};
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
export const sleep = (time_ms) => {
|
|
||||||
return new Promise((resolve) => {
|
|
||||||
setTimeout(resolve, time_ms);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
export default sleep;
|
|
@ -1,12 +1,13 @@
|
|||||||
import libraryLoader from "../../services/library_loader.js";
|
import libraryLoader from "../../services/library_loader.js";
|
||||||
import TypeWidget from "./type_widget.js";
|
import TypeWidget from "./type_widget.js";
|
||||||
import appContext from "../../services/app_context.js";
|
import utils from '../../services/utils.js';
|
||||||
import sleep from './canvas-note-utils/sleep.js';
|
|
||||||
import froca from "../../services/froca.js";
|
import froca from "../../services/froca.js";
|
||||||
import debounce from "./canvas-note-utils/lodash.debounce.js";
|
import debounce from "./canvas-note-utils/lodash.debounce.js";
|
||||||
import uniqueId from "./canvas-note-utils/lodash.uniqueId.js";
|
import uniqueId from "./canvas-note-utils/lodash.uniqueId.js";
|
||||||
import replaceExternalAssets from "./canvas-note-utils/replaceExternalAssets.js";
|
import replaceExternalAssets from "./canvas-note-utils/replaceExternalAssets.js";
|
||||||
|
|
||||||
|
const {sleep} = utils;
|
||||||
|
|
||||||
const TPL = `
|
const TPL = `
|
||||||
<div class="canvas-note-widget note-detail-canvas-note note-detail-printable note-detail">
|
<div class="canvas-note-widget note-detail-canvas-note note-detail-printable note-detail">
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user