diff --git a/src/frontend/app/ui/gallery/search/query-builder/query-builder.gallery.component.html b/src/frontend/app/ui/gallery/search/query-builder/query-builder.gallery.component.html index 3d8be80a..2e60b98e 100644 --- a/src/frontend/app/ui/gallery/search/query-builder/query-builder.gallery.component.html +++ b/src/frontend/app/ui/gallery/search/query-builder/query-builder.gallery.component.html @@ -8,7 +8,7 @@
diff --git a/src/frontend/app/ui/gallery/search/query-builder/query-bulder.gallery.component.ts b/src/frontend/app/ui/gallery/search/query-builder/query-bulder.gallery.component.ts index 59adb72e..80cf9520 100644 --- a/src/frontend/app/ui/gallery/search/query-builder/query-bulder.gallery.component.ts +++ b/src/frontend/app/ui/gallery/search/query-builder/query-bulder.gallery.component.ts @@ -1,24 +1,7 @@ -import { - Component, - EventEmitter, - forwardRef, - Input, - Output, -} from '@angular/core'; -import { - SearchQueryDTO, - SearchQueryTypes, - TextSearch, -} from '../../../../../../common/entities/SearchQueryDTO'; -import { - ControlValueAccessor, - UntypedFormControl, - NG_VALIDATORS, - NG_VALUE_ACCESSOR, - ValidationErrors, - Validator, -} from '@angular/forms'; -import { SearchQueryParserService } from '../search-query-parser.service'; +import {Component, EventEmitter, forwardRef, Input, Output,} from '@angular/core'; +import {SearchQueryDTO, SearchQueryTypes, TextSearch,} from '../../../../../../common/entities/SearchQueryDTO'; +import {ControlValueAccessor, NG_VALIDATORS, NG_VALUE_ACCESSOR, UntypedFormControl, ValidationErrors, Validator,} from '@angular/forms'; +import {SearchQueryParserService} from '../search-query-parser.service'; @Component({ selector: 'app-gallery-search-query-builder', @@ -38,8 +21,7 @@ import { SearchQueryParserService } from '../search-query-parser.service'; ], }) export class GallerySearchQueryBuilderComponent - implements ControlValueAccessor, Validator -{ + implements ControlValueAccessor, Validator { public searchQueryDTO: SearchQueryDTO = { type: SearchQueryTypes.any_text, text: '', @@ -48,7 +30,8 @@ export class GallerySearchQueryBuilderComponent @Input() placeholder = $localize`Search`; public rawSearchText = ''; - constructor(private searchQueryParserService: SearchQueryParserService) {} + constructor(private searchQueryParserService: SearchQueryParserService) { + } validateRawSearchText(): void { try { @@ -66,21 +49,16 @@ export class GallerySearchQueryBuilderComponent text: '', type: SearchQueryTypes.any_text, } as TextSearch; - } - - onQueryChange(): void { - this.rawSearchText = this.searchQueryParserService.stringify( - this.searchQueryDTO - ); this.onChange(); } validate(control: UntypedFormControl): ValidationErrors { - return { required: true }; + return {required: true}; } // eslint-disable-next-line @typescript-eslint/no-empty-function - public onTouched(): void {} + public onTouched(): void { + } public writeValue(obj: any): void { this.searchQueryDTO = obj; @@ -98,12 +76,17 @@ export class GallerySearchQueryBuilderComponent } public onChange(): void { + this.rawSearchText = this.searchQueryParserService.stringify( + this.searchQueryDTO + ); this.propagateChange(this.searchQueryDTO); } // eslint-disable-next-line @typescript-eslint/no-empty-function - private propagateChange = (_: unknown): void => {}; + private propagateChange = (_: unknown): void => { + }; // eslint-disable-next-line @typescript-eslint/no-empty-function - private propagateTouch = (_: unknown): void => {}; + private propagateTouch = (_: unknown): void => { + }; } diff --git a/src/frontend/app/ui/gallery/search/query-enrty/query-entry.search.gallery.component.css b/src/frontend/app/ui/gallery/search/query-enrty/query-entry.search.gallery.component.css index 1f491994..c493d485 100644 --- a/src/frontend/app/ui/gallery/search/query-enrty/query-entry.search.gallery.component.css +++ b/src/frontend/app/ui/gallery/search/query-enrty/query-entry.search.gallery.component.css @@ -5,14 +5,3 @@ label { margin-top: 0.3rem; } - -.match-type { - font-size: 2rem; - margin-top: -0.8rem; - font-weight: bold; - cursor: pointer; -} - -.match-type.exact-match { - color: #0069d9; -} diff --git a/src/frontend/app/ui/gallery/search/query-enrty/query-entry.search.gallery.component.html b/src/frontend/app/ui/gallery/search/query-enrty/query-entry.search.gallery.component.html index 28573932..b7cc4b40 100644 --- a/src/frontend/app/ui/gallery/search/query-enrty/query-entry.search.gallery.component.html +++ b/src/frontend/app/ui/gallery/search/query-enrty/query-entry.search.gallery.component.html @@ -51,24 +51,31 @@ -
- -
-
+
+
+ + +
+
+
- " - "
-
+
@@ -118,7 +120,7 @@
-
+
-
+
-
+
-
+
-
+
-
+
Mpx
-
+