mirror of
https://github.com/Myxelium/Bridge-Multi.git
synced 2026-07-07 18:45:09 +00:00
Fix redundant issue description text
This commit is contained in:
@@ -61,7 +61,7 @@
|
|||||||
@if (globalChartIssues.length > 0) {
|
@if (globalChartIssues.length > 0) {
|
||||||
<div class="menu-title">Chart Issues Found:</div>
|
<div class="menu-title">Chart Issues Found:</div>
|
||||||
<ul class="list-disc ml-9 min-w-[246px] max-w-[min(26.1vw,444px)]">
|
<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>
|
</ul>
|
||||||
}
|
}
|
||||||
@for (trackIssues of trackIssuesGroups; track $index) {
|
@for (trackIssues of trackIssuesGroups; track $index) {
|
||||||
|
|||||||
@@ -114,8 +114,23 @@ export class ChartSidebarComponent implements OnInit {
|
|||||||
return _.chain(this.selectedChart!.notesData.chartIssues)
|
return _.chain(this.selectedChart!.notesData.chartIssues)
|
||||||
.filter(i => i.instrument === null)
|
.filter(i => i.instrument === null)
|
||||||
.filter(i => i.noteIssue !== 'isDefaultBPM')
|
.filter(i => i.noteIssue !== 'isDefaultBPM')
|
||||||
|
.groupBy(i => i.noteIssue)
|
||||||
|
.values()
|
||||||
|
.map(issueGroup => this.getGlobalChartIssueText(issueGroup))
|
||||||
.value()
|
.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() {
|
public get trackIssuesGroups() {
|
||||||
return _.chain(this.selectedChart!.notesData.chartIssues)
|
return _.chain(this.selectedChart!.notesData.chartIssues)
|
||||||
|
|||||||
Reference in New Issue
Block a user