mirror of
https://github.com/Myxelium/Bridge-Multi.git
synced 2026-04-11 22:29:38 +00:00
Add drumsReviewed filter
This commit is contained in:
@@ -33,6 +33,7 @@ export class SearchService {
|
||||
public instrument: FormControl<Instrument | null>
|
||||
public difficulty: FormControl<Difficulty | null>
|
||||
public drumType: FormControl<DrumTypeName | null>
|
||||
public drumsReviewed: FormControl<boolean>
|
||||
public sortDirection: 'asc' | 'desc' = 'asc'
|
||||
public sortColumn: 'name' | 'artist' | 'album' | 'genre' | 'year' | 'charter' | 'length' | 'modifiedTime' | null = null
|
||||
|
||||
@@ -69,6 +70,14 @@ export class SearchService {
|
||||
}
|
||||
})
|
||||
|
||||
this.drumsReviewed = new FormControl<boolean>((localStorage.getItem('drumsReviewed') ?? 'true') === 'true', { nonNullable: true })
|
||||
this.drumsReviewed.valueChanges.subscribe(drumsReviewed => {
|
||||
localStorage.setItem('drumsReviewed', `${drumsReviewed}`)
|
||||
if (this.songsResponse?.page) {
|
||||
this.search(this.searchControl.value || '*').subscribe()
|
||||
}
|
||||
})
|
||||
|
||||
this.http.get<{ "name": string; "sha1": string }[]>('https://clonehero.gitlab.io/sources/icons.json').subscribe(result => {
|
||||
this.availableIcons = result.map(r => r.name)
|
||||
})
|
||||
@@ -104,6 +113,7 @@ export class SearchService {
|
||||
instrument: this.instrument.value,
|
||||
difficulty: this.difficulty.value,
|
||||
drumType: this.drumType.value,
|
||||
drumsReviewed: this.drumsReviewed.value,
|
||||
sort: this.sortColumn !== null ? { type: this.sortColumn, direction: this.sortDirection } : null,
|
||||
source: 'bridge',
|
||||
}).pipe(
|
||||
|
||||
Reference in New Issue
Block a user