mirror of
https://github.com/Myxelium/Bridge-Multi.git
synced 2026-04-11 14:19:38 +00:00
Fixed eslint errors
This commit is contained in:
@@ -21,8 +21,8 @@ export class BrowseComponent implements AfterViewInit {
|
||||
const $tableColumn = $('#table-column')
|
||||
// TODO: on new search, scroll to the top
|
||||
$tableColumn.on('scroll', () => {
|
||||
let pos = $tableColumn[0].scrollTop + $tableColumn[0].offsetHeight
|
||||
let max = $tableColumn[0].scrollHeight
|
||||
const pos = $tableColumn[0].scrollTop + $tableColumn[0].offsetHeight
|
||||
const max = $tableColumn[0].scrollHeight
|
||||
if (pos >= max - 5) {
|
||||
this.searchService.updateScroll()
|
||||
}
|
||||
|
||||
@@ -111,13 +111,9 @@ export class ChartSidebarComponent implements OnInit {
|
||||
* Converts <this.selectedVersion.song_length> into a readable duration.
|
||||
*/
|
||||
updateSongLength() {
|
||||
if (this.selectedVersion.song_length == 0) {
|
||||
this.songLength = 'Unknown'
|
||||
}
|
||||
if (this.selectedVersion.song_length == 0) { this.songLength = 'Unknown' }
|
||||
let seconds = Math.round(this.selectedVersion.song_length / 1000)
|
||||
if (seconds < 60) {
|
||||
this.songLength = `${seconds} second${seconds == 1 ? '' : 's'}`
|
||||
}
|
||||
if (seconds < 60) { this.songLength = `${seconds} second${seconds == 1 ? '' : 's'}` }
|
||||
let minutes = Math.floor(seconds / 60)
|
||||
let hours = 0
|
||||
while (minutes > 59) {
|
||||
@@ -182,10 +178,10 @@ export class ChartSidebarComponent implements OnInit {
|
||||
onDownloadClicked() {
|
||||
this.downloadService.addDownload(
|
||||
this.selectedVersion.versionID, {
|
||||
avTagName: this.selectedVersion.avTagName,
|
||||
artist: this.songResult.artist,
|
||||
charter: this.selectedVersion.charters, //TODO: get the charter name associated with this particular version
|
||||
links: JSON.parse(this.selectedVersion.downloadLink)
|
||||
})
|
||||
avTagName: this.selectedVersion.avTagName,
|
||||
artist: this.songResult.artist,
|
||||
charter: this.selectedVersion.charters, // TODO: get the charter name associated with this particular version
|
||||
links: JSON.parse(this.selectedVersion.downloadLink)
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -10,14 +10,14 @@ import { SearchService } from 'src/app/core/services/search.service'
|
||||
styleUrls: ['./result-table.component.scss']
|
||||
})
|
||||
export class ResultTableComponent implements OnInit {
|
||||
|
||||
|
||||
@Output() rowClicked = new EventEmitter<SongResult>()
|
||||
@Output() songChecked = new EventEmitter<SongResult>()
|
||||
@Output() songUnchecked = new EventEmitter<SongResult>()
|
||||
|
||||
|
||||
@ViewChild(CheckboxDirective, { static: true }) checkboxColumn: CheckboxDirective
|
||||
@ViewChildren('tableRow') tableRows: QueryList<ResultTableRowComponent>
|
||||
|
||||
|
||||
results: SongResult[]
|
||||
|
||||
constructor(private searchService: SearchService) { }
|
||||
|
||||
@@ -14,7 +14,7 @@ export class SearchBarComponent implements AfterViewInit {
|
||||
$('.ui.dropdown').dropdown()
|
||||
}
|
||||
|
||||
async onSearch(query: string) {
|
||||
onSearch(query: string) {
|
||||
this.searchService.newSearch(query)
|
||||
}
|
||||
}
|
||||
@@ -78,11 +78,11 @@ export class StatusBarComponent {
|
||||
const downloadSong = this.selectedResults.find(song => song.id == downloadVersion.songID)
|
||||
this.downloadService.addDownload(
|
||||
downloadVersion.versionID, {
|
||||
avTagName: downloadVersion.avTagName,
|
||||
artist: downloadSong.artist,
|
||||
charter: downloadVersion.charters,
|
||||
links: JSON.parse(downloadVersion.downloadLink)
|
||||
})
|
||||
avTagName: downloadVersion.avTagName,
|
||||
artist: downloadSong.artist,
|
||||
charter: downloadVersion.charters,
|
||||
links: JSON.parse(downloadVersion.downloadLink)
|
||||
})
|
||||
}
|
||||
} else {
|
||||
$('#selectedModal').modal('show')
|
||||
@@ -96,11 +96,11 @@ export class StatusBarComponent {
|
||||
const downloadSong = this.selectedResults.find(song => song.id == version.songID)
|
||||
this.downloadService.addDownload(
|
||||
version.versionID, {
|
||||
avTagName: version.avTagName,
|
||||
artist: downloadSong.artist,
|
||||
charter: version.charters,
|
||||
links: JSON.parse(version.downloadLink)
|
||||
})
|
||||
avTagName: version.avTagName,
|
||||
artist: downloadSong.artist,
|
||||
charter: version.charters,
|
||||
links: JSON.parse(version.downloadLink)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -63,4 +63,4 @@ export class SearchService {
|
||||
get allResultsVisible() {
|
||||
return this._allResultsVisible
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,7 @@ export class TabPersistStrategy extends RouteReuseStrategy {
|
||||
if (!route.routeConfig) return null
|
||||
return this.handles[route.routeConfig.path]
|
||||
}
|
||||
shouldReuseRoute(future: ActivatedRouteSnapshot, _curr: ActivatedRouteSnapshot) {
|
||||
shouldReuseRoute(future: ActivatedRouteSnapshot) {
|
||||
return future.data.shouldReuse || false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user