mirror of
https://github.com/Myxelium/Bridge-Multi.git
synced 2026-04-09 05:09:39 +00:00
Fix redundant issue description text
This commit is contained in:
@@ -61,7 +61,7 @@
|
||||
@if (globalChartIssues.length > 0) {
|
||||
<div class="menu-title">Chart Issues Found:</div>
|
||||
<ul class="list-disc ml-9 min-w-[246px] max-w-[min(26.1vw,444px)]">
|
||||
<li *ngFor="let issue of globalChartIssues" class="list-item">{{ issue.description }}</li>
|
||||
<li *ngFor="let issue of globalChartIssues" class="list-item">{{ issue }}</li>
|
||||
</ul>
|
||||
}
|
||||
@for (trackIssues of trackIssuesGroups; track $index) {
|
||||
|
||||
@@ -114,8 +114,23 @@ export class ChartSidebarComponent implements OnInit {
|
||||
return _.chain(this.selectedChart!.notesData.chartIssues)
|
||||
.filter(i => i.instrument === null)
|
||||
.filter(i => i.noteIssue !== 'isDefaultBPM')
|
||||
.groupBy(i => i.noteIssue)
|
||||
.values()
|
||||
.map(issueGroup => this.getGlobalChartIssueText(issueGroup))
|
||||
.value()
|
||||
}
|
||||
private getGlobalChartIssueText(issueGroup: NotesData['chartIssues']) {
|
||||
const one = issueGroup.length === 1
|
||||
const len = issueGroup.length
|
||||
switch (issueGroup[0].noteIssue) {
|
||||
case 'misalignedTimeSignature':
|
||||
return `There ${one ? 'is' : 'are'} ${len} misaligned time signature marker${one ? '' : 's'} in this chart.`
|
||||
case 'badEndEvent':
|
||||
return `There ${one ? 'is' : 'are'} ${len} invalid "end" event${one ? '' : 's'} in this chart.`
|
||||
default:
|
||||
return issueGroup[0].description
|
||||
}
|
||||
}
|
||||
|
||||
public get trackIssuesGroups() {
|
||||
return _.chain(this.selectedChart!.notesData.chartIssues)
|
||||
|
||||
Reference in New Issue
Block a user