Added "Open in Circleguard" button on scores
This commit is contained in:
parent
898416dad5
commit
1ce7d4c599
@ -45,6 +45,7 @@
|
|||||||
<ul style="line-height: 2.2">
|
<ul style="line-height: 2.2">
|
||||||
<li>Played by: <a [routerLink]="['/u/' + this.replayData.username]">{{ this.replayData.username }}</a> <a class="btn" style="margin-left: 5px" href="https://osu.ppy.sh/users/{{ this.replayData.user_id }}" target="_blank">osu!web</a></li>
|
<li>Played by: <a [routerLink]="['/u/' + this.replayData.username]">{{ this.replayData.username }}</a> <a class="btn" style="margin-left: 5px" href="https://osu.ppy.sh/users/{{ this.replayData.user_id }}" target="_blank">osu!web</a></li>
|
||||||
<li>Link to score: <a class="btn" href="https://osu.ppy.sh/scores/osu/{{ this.replayData.replay_id }}" target="_blank">osu!web</a></li>
|
<li>Link to score: <a class="btn" href="https://osu.ppy.sh/scores/osu/{{ this.replayData.replay_id }}" target="_blank">osu!web</a></li>
|
||||||
|
<li><a class="btn" [href]="this.buildCircleguardUrl()">Open in CircleGuard</a></li>
|
||||||
<li>PP: {{ this.replayData.pp }}</li>
|
<li>PP: {{ this.replayData.pp }}</li>
|
||||||
<li>Grade: <app-osu-grade [grade]="this.replayData.rank"></app-osu-grade></li>
|
<li>Grade: <app-osu-grade [grade]="this.replayData.rank"></app-osu-grade></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@ -76,6 +76,20 @@ export class ViewScoreComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
buildCircleguardUrl(): string {
|
||||||
|
if(!this.replayData) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
let url = "circleguard://m=" + this.replayData.beatmap_id + "&u=" + this.replayData.user_id;
|
||||||
|
|
||||||
|
if (this.replayData.mods.length > 0) {
|
||||||
|
url += "&m1=" + this.replayData.mods.join('');
|
||||||
|
}
|
||||||
|
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
|
||||||
private loadScoreData(): void {
|
private loadScoreData(): void {
|
||||||
this.isLoading = true;
|
this.isLoading = true;
|
||||||
this.http.get<ReplayData>(`${environment.apiUrl}/score/${this.replayId}`).pipe(
|
this.http.get<ReplayData>(`${environment.apiUrl}/score/${this.replayId}`).pipe(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user