find widget fixes

This commit is contained in:
zadam 2022-05-17 22:11:45 +02:00
parent 6cef1082b2
commit fca0b82610
4 changed files with 10 additions and 22 deletions

25
package-lock.json generated
View File

@ -24,14 +24,13 @@
"ejs": "3.1.8", "ejs": "3.1.8",
"electron-debug": "3.2.0", "electron-debug": "3.2.0",
"electron-dl": "3.3.1", "electron-dl": "3.3.1",
"electron-find": "1.0.7",
"electron-window-state": "5.0.3", "electron-window-state": "5.0.3",
"express": "4.18.1", "express": "4.18.1",
"express-partial-content": "1.0.2", "express-partial-content": "1.0.2",
"express-rate-limit": "6.4.0", "express-rate-limit": "6.4.0",
"express-session": "1.17.3", "express-session": "1.17.3",
"fs-extra": "10.1.0", "fs-extra": "10.1.0",
"helmet": "5.0.2", "helmet": "5.1.0",
"html": "1.0.0", "html": "1.0.0",
"html2plaintext": "2.1.4", "html2plaintext": "2.1.4",
"http-proxy-agent": "5.0.0", "http-proxy-agent": "5.0.0",
@ -3758,11 +3757,6 @@
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/electron-find": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/electron-find/-/electron-find-1.0.7.tgz",
"integrity": "sha512-C2FQJuk8567P2a2loBNwl5c8kwOTQVMB0capgHtPI7zKwZG16X0UxG+sNYZExQfnJ0PA+ecECA/4LcXxQa2TCA=="
},
"node_modules/electron-installer-common": { "node_modules/electron-installer-common": {
"version": "0.10.3", "version": "0.10.3",
"resolved": "https://registry.npmjs.org/electron-installer-common/-/electron-installer-common-0.10.3.tgz", "resolved": "https://registry.npmjs.org/electron-installer-common/-/electron-installer-common-0.10.3.tgz",
@ -5940,9 +5934,9 @@
} }
}, },
"node_modules/helmet": { "node_modules/helmet": {
"version": "5.0.2", "version": "5.1.0",
"resolved": "https://registry.npmjs.org/helmet/-/helmet-5.0.2.tgz", "resolved": "https://registry.npmjs.org/helmet/-/helmet-5.1.0.tgz",
"integrity": "sha512-QWlwUZZ8BtlvwYVTSDTBChGf8EOcQ2LkGMnQJxSzD1mUu8CCjXJZq/BXP8eWw4kikRnzlhtYo3lCk0ucmYA3Vg==", "integrity": "sha512-klsunXs8rgNSZoaUrNeuCiWUxyc+wzucnEnFejUg3/A+CaF589k9qepLZZ1Jehnzig7YbD4hEuscGXuBY3fq+g==",
"engines": { "engines": {
"node": ">=12.0.0" "node": ">=12.0.0"
} }
@ -14125,11 +14119,6 @@
"unused-filename": "^2.1.0" "unused-filename": "^2.1.0"
} }
}, },
"electron-find": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/electron-find/-/electron-find-1.0.7.tgz",
"integrity": "sha512-C2FQJuk8567P2a2loBNwl5c8kwOTQVMB0capgHtPI7zKwZG16X0UxG+sNYZExQfnJ0PA+ecECA/4LcXxQa2TCA=="
},
"electron-installer-common": { "electron-installer-common": {
"version": "0.10.3", "version": "0.10.3",
"resolved": "https://registry.npmjs.org/electron-installer-common/-/electron-installer-common-0.10.3.tgz", "resolved": "https://registry.npmjs.org/electron-installer-common/-/electron-installer-common-0.10.3.tgz",
@ -15684,9 +15673,9 @@
"integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw=="
}, },
"helmet": { "helmet": {
"version": "5.0.2", "version": "5.1.0",
"resolved": "https://registry.npmjs.org/helmet/-/helmet-5.0.2.tgz", "resolved": "https://registry.npmjs.org/helmet/-/helmet-5.1.0.tgz",
"integrity": "sha512-QWlwUZZ8BtlvwYVTSDTBChGf8EOcQ2LkGMnQJxSzD1mUu8CCjXJZq/BXP8eWw4kikRnzlhtYo3lCk0ucmYA3Vg==" "integrity": "sha512-klsunXs8rgNSZoaUrNeuCiWUxyc+wzucnEnFejUg3/A+CaF589k9qepLZZ1Jehnzig7YbD4hEuscGXuBY3fq+g=="
}, },
"hosted-git-info": { "hosted-git-info": {
"version": "2.8.9", "version": "2.8.9",

View File

@ -45,7 +45,7 @@
"express-rate-limit": "6.4.0", "express-rate-limit": "6.4.0",
"express-session": "1.17.3", "express-session": "1.17.3",
"fs-extra": "10.1.0", "fs-extra": "10.1.0",
"helmet": "5.0.2", "helmet": "5.1.0",
"html": "1.0.0", "html": "1.0.0",
"html2plaintext": "2.1.4", "html2plaintext": "2.1.4",
"http-proxy-agent": "5.0.0", "http-proxy-agent": "5.0.0",

View File

@ -80,7 +80,6 @@ export default class FindWidget extends NoteContextAwareWidget {
this.$caseSensitiveCheckbox.change(() => this.performFind()); this.$caseSensitiveCheckbox.change(() => this.performFind());
this.$matchWordsCheckbox = this.$widget.find(".find-widget-match-words-checkbox"); this.$matchWordsCheckbox = this.$widget.find(".find-widget-match-words-checkbox");
this.$matchWordsCheckbox.change(() => this.performFind()); this.$matchWordsCheckbox.change(() => this.performFind());
this.findResult = null;
this.searchTerm = null; this.searchTerm = null;
this.$input.keydown(async e => { this.$input.keydown(async e => {

View File

@ -171,13 +171,13 @@ export default class EditableCodeTypeWidget extends TypeWidget {
} }
} }
async executeInActiveCodeEditorEvent({callback}) { async executeInActiveCodeEditorEvent({resolve}) {
if (!this.isActive()) { if (!this.isActive()) {
return; return;
} }
await this.initialized; await this.initialized;
callback(this.codeEditor); resolve(this.codeEditor);
} }
} }