Compare commits

..

2 Commits

4 changed files with 22 additions and 23 deletions

View File

View File

@@ -30,10 +30,7 @@
"icon": "./icos/", "icon": "./icos/",
"files": [ "files": [
"newton/", "newton/",
"build/", "build/"
"!node_modules/ace-builds/",
"!node_modules/web-streams-polyfill/",
"!node_modules/@angular/"
], ],
"mac": { "mac": {
"category": "public.app-category.developer-tools" "category": "public.app-category.developer-tools"
@@ -49,13 +46,7 @@
}, },
"postinstall": "electron-builder install-app-deps", "postinstall": "electron-builder install-app-deps",
"dependencies": { "dependencies": {
"@angular/cdk": "19.2.0",
"@angular/common": "19.2.0",
"@angular/core": "19.2.0",
"@angular/forms": "19.2.0",
"@angular/platform-browser": "19.2.0",
"@xterm/xterm": "5.5.0", "@xterm/xterm": "5.5.0",
"ace-builds": "1.43.0",
"ace-diff": "3.0.3", "ace-diff": "3.0.3",
"ace-layout": "1.5.0", "ace-layout": "1.5.0",
"ace-linters": "1.8.3", "ace-linters": "1.8.3",
@@ -66,16 +57,21 @@
"express": "4.18.2", "express": "4.18.2",
"marked": "16.4.0", "marked": "16.4.0",
"node-fetch": "3.3.2", "node-fetch": "3.3.2",
"node-pty": "^1.0.0", "node-pty": "1.0.0",
"rxjs": "7.8.0",
"socket.io": "4.8.1", "socket.io": "4.8.1",
"uuid": "11.1.0", "uuid": "11.1.0",
"zone.js": "0.15.0" "zone.js": "0.15.0"
}, },
"devDependencies": { "devDependencies": {
"ace-builds": "1.43.0",
"@angular-devkit/build-angular": "19.2.8", "@angular-devkit/build-angular": "19.2.8",
"@angular/cdk": "19.2.0",
"@angular/common": "19.2.0",
"@angular/core": "19.2.0",
"@angular/cli": "19.2.8", "@angular/cli": "19.2.8",
"@angular/compiler-cli": "19.2.0", "@angular/compiler-cli": "19.2.0",
"@angular/forms": "19.2.0",
"@angular/platform-browser": "19.2.0",
"@types/express": "4.17.17", "@types/express": "4.17.17",
"@types/jasmine": "5.1.0", "@types/jasmine": "5.1.0",
"@types/node": "18.18.0", "@types/node": "18.18.0",
@@ -91,6 +87,7 @@
"karma-jasmine": "5.1.0", "karma-jasmine": "5.1.0",
"karma-jasmine-html-reporter": "2.1.0", "karma-jasmine-html-reporter": "2.1.0",
"nanoevents": "9.1.0", "nanoevents": "9.1.0",
"rxjs": "7.8.0",
"tree-sitter": "0.21.1", "tree-sitter": "0.21.1",
"tree-sitter-bash": "0.23.2", "tree-sitter-bash": "0.23.2",
"tree-sitter-c": "0.23.1", "tree-sitter-c": "0.23.1",

View File

@@ -8,12 +8,13 @@
} @else if (isQueryNotFound) { } @else if (isQueryNotFound) {
<label id="find-status-lbl"> <label id="find-status-lbl">
<b class="warning">Query not found...</b> <b class="warning">Query not found...</b>
<p class="warning" style="white-space: pre;">{{query}}</p>
</label> </label>
} @else if (!isQueryLong && !isQueryNotFound) { } @else if (query && !isQueryLong && !isQueryNotFound) {
<label id="find-status-lbl">Find in Current File: <label id="find-status-lbl">Found in current file:
<p class="success">{{query}}</p> <b class="success">{{totalCount}}</b>
</label> </label>
} @else {
<label id="find-status-lbl">Find in Current File:</label>
} }
</div> </div>

View File

@@ -40,6 +40,7 @@ export class SearchReplaceComponent {
@Input() findOptions: string = ""; @Input() findOptions: string = "";
@Input() isQueryLong: boolean = false; @Input() isQueryLong: boolean = false;
@Input() isQueryNotFound: boolean = false; @Input() isQueryNotFound: boolean = false;
@Input() totalCount: number = 0;
private editor!: any; private editor!: any;
@@ -193,14 +194,14 @@ export class SearchReplaceComponent {
public findEntryKeyUpHandler(event: KeyboardEvent) { public findEntryKeyUpHandler(event: KeyboardEvent) {
if (!event.ctrlKey || !this.query) return; if (!event.ctrlKey || !this.query) return;
if (event.key === "ArrowUp") this.findPreviousEntry(); if (event.key === "ArrowUp") this.findPreviousEntry();
if (event.key === "ArrowDown") this.findNextEntry(); if (event.key === "ArrowDown") this.findNextEntry();
} }
public findAllEntries() { public findAllEntries() {
this.query = this.findEntryElm.nativeElement.value; this.query = this.findEntryElm.nativeElement.value;
let totalCount = this.editor.findAll(this.query, { this.totalCount = this.editor.findAll(this.query, {
backwards: this.isBackwards, backwards: this.isBackwards,
wrap: this.isWrap, wrap: this.isWrap,
caseSensitive: this.useCaseSensitive, caseSensitive: this.useCaseSensitive,
@@ -209,7 +210,7 @@ export class SearchReplaceComponent {
range: this.searchOnlyInSelection range: this.searchOnlyInSelection
}); });
if (totalCount === 0) this.isQueryNotFound = true; if (this.totalCount === 0) this.isQueryNotFound = true;
} }
public replaceEntry(event: KeyboardEvent) { public replaceEntry(event: KeyboardEvent) {
@@ -220,7 +221,7 @@ export class SearchReplaceComponent {
if (!fromStr) return; if (!fromStr) return;
let totalCount = this.editor.replace(toStr, fromStr, { this.editor.replace(toStr, fromStr, {
backwards: this.isBackwards, backwards: this.isBackwards,
wrap: this.isWrap, wrap: this.isWrap,
caseSensitive: this.useCaseSensitive, caseSensitive: this.useCaseSensitive,
@@ -241,7 +242,7 @@ export class SearchReplaceComponent {
if (!fromStr) return; if (!fromStr) return;
let totalCount = this.editor.replaceAll(toStr, fromStr, { this.editor.replaceAll(toStr, fromStr, {
backwards: this.isBackwards, backwards: this.isBackwards,
wrap: this.isWrap, wrap: this.isWrap,
caseSensitive: this.useCaseSensitive, caseSensitive: this.useCaseSensitive,
@@ -269,7 +270,7 @@ export class SearchReplaceComponent {
if (this.isQueryLong) return; if (this.isQueryLong) return;
this.searchTimeoutId = setTimeout(() => { this.searchTimeoutId = setTimeout(() => {
let totalCount = this.editor.findAll(this.query, { this.totalCount = this.editor.findAll(this.query, {
backwards: this.isBackwards, backwards: this.isBackwards,
wrap: this.isWrap, wrap: this.isWrap,
caseSensitive: this.useCaseSensitive, caseSensitive: this.useCaseSensitive,
@@ -278,7 +279,7 @@ export class SearchReplaceComponent {
range: this.searchOnlyInSelection range: this.searchOnlyInSelection
}); });
this.isQueryNotFound = (totalCount === 0); this.isQueryNotFound = (this.totalCount === 0);
}, this.searchTimeout); }, this.searchTimeout);
} }