mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	search busy animation
This commit is contained in:
		| @@ -9,3 +9,7 @@ | |||||||
|     position: absolute; |     position: absolute; | ||||||
|  |  | ||||||
| } | } | ||||||
|  |  | ||||||
|  | .result-content-searching { | ||||||
|  |     opacity: 0.2; | ||||||
|  | } | ||||||
| @@ -3,10 +3,12 @@ | |||||||
|  |  | ||||||
| <p>Search string: <i>{{query}}</i></p> | <p>Search string: <i>{{query}}</i></p> | ||||||
|  |  | ||||||
|  | <div [class.result-content-searching]="searching"> | ||||||
| <app-document-card-large *ngFor="let result of results" | <app-document-card-large *ngFor="let result of results" | ||||||
|     [document]="result.document" |     [document]="result.document" | ||||||
|     [details]="result.highlights"> |     [details]="result.highlights"> | ||||||
|  |  | ||||||
| </app-document-card-large> | </app-document-card-large> | ||||||
|  | </div> | ||||||
|  |  | ||||||
| <p *ngIf="results.length == 0" class="mx-auto">No results</p> | <p *ngIf="results.length == 0" class="mx-auto">No results</p> | ||||||
|   | |||||||
| @@ -13,13 +13,17 @@ export class SearchComponent implements OnInit { | |||||||
|  |  | ||||||
|   query: string = "" |   query: string = "" | ||||||
|  |  | ||||||
|  |   searching = false | ||||||
|  |  | ||||||
|   constructor(private searchService: SearchService, private route: ActivatedRoute) { } |   constructor(private searchService: SearchService, private route: ActivatedRoute) { } | ||||||
|  |  | ||||||
|   ngOnInit(): void { |   ngOnInit(): void { | ||||||
|     this.route.queryParamMap.subscribe(paramMap => { |     this.route.queryParamMap.subscribe(paramMap => { | ||||||
|       this.query = paramMap.get('query') |       this.query = paramMap.get('query') | ||||||
|  |       this.searching = true | ||||||
|       this.searchService.search(this.query).subscribe(result => { |       this.searchService.search(this.query).subscribe(result => { | ||||||
|         this.results = result |         this.results = result | ||||||
|  |         this.searching = false | ||||||
|       }) |       }) | ||||||
|     }) |     }) | ||||||
|      |      | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jonas Winkler
					Jonas Winkler