Skip to content

Commit 885d30a

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents ed17b65 + 1156c6e commit 885d30a

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/app/sega/chunithm/v2/v2-rating/v2-rating.component.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,16 @@ <h1 class="page-heading">Rating</h1>
22

33
<div class="card mb-3">
44
<div class="card-body">
5+
<ng-container *ngIf="romVersion >= verseVersion">
6+
<div>Total Rating: <span class="{{(topTotal + newTotal) / 50 | toRating | ratingClass}}">{{(topTotal + newTotal) / 50 | toRating }}</span></div>
7+
<div>New: <span class="{{newTotal / 20 | toRating | ratingClass}}">{{newTotal / 20 | toRating }}</span></div>
8+
<div>Old: <span class="{{topTotal / 30 | toRating | ratingClass}}">{{topTotal / 30 | toRating }}</span></div>
9+
</ng-container>
10+
<ng-container *ngIf="romVersion < verseVersion">
511
<div>Total Rating: <span class="{{(topTotal + recentTotal) / 40 | toRating | ratingClass}}">{{(topTotal + recentTotal) / 40 | toRating }}</span></div>
612
<div>Best: <span class="{{topTotal / 30 | toRating | ratingClass}}">{{topTotal / 30 | toRating }}</span></div>
713
<div>Recent: <span class="{{recentTotal / 10 | toRating | ratingClass}}">{{recentTotal / 10 | toRating }}</span></div>
14+
</ng-container>
815
</div>
916
</div>
1017

src/app/sega/chunithm/v2/v2-rating/v2-rating.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export class V2RatingComponent implements OnInit {
1818
enableImages = environment.enableImages;
1919

2020
romVersion: Version;
21+
verseVersion = new Version('2.30.00');
2122
topRating: RatingItem[] = [];
2223
newRating: RatingItem[] = [];
2324
recentRating: RatingItem[] = [];
@@ -38,7 +39,6 @@ export class V2RatingComponent implements OnInit {
3839
const profile = await lastValueFrom(this.api.get('api/game/chuni/v2/profile', param));
3940
if (!profile) { return; }
4041
this.romVersion = new Version(profile.lastRomVersion);
41-
this.messageService.notice(this.romVersion.full);
4242
if (this.romVersion >= new Version('2.30.00')){
4343
// b50
4444
this.api.get('api/game/chuni/v2/verse-rating', param).subscribe(
@@ -53,6 +53,7 @@ export class V2RatingComponent implements OnInit {
5353
}
5454
this.topRating.forEach(item => this.topTotal += item.rating);
5555
this.newRating.forEach(item => this.newTotal += item.rating);
56+
this.newRating.forEach(item => console.log(item.rating.toString()));
5657
},
5758
error => this.messageService.notice(error)
5859
);

0 commit comments

Comments
 (0)