Use userId for /u/ route links
This commit is contained in:
parent
9719853302
commit
cfcab7d7cf
@ -157,7 +157,7 @@
|
|||||||
<ng-container *ngIf="column.type == 'string'">
|
<ng-container *ngIf="column.type == 'string'">
|
||||||
|
|
||||||
<ng-container *ngIf="column.name == 'user_username'; else stringField">
|
<ng-container *ngIf="column.name == 'user_username'; else stringField">
|
||||||
<a [href]="'/u/' + getValue(entry, column.name)" target="_blank">{{ getValue(entry, column.name) }}</a>
|
<a [href]="'/u/' + getValue(entry, 'user_id')" target="_blank">{{ getValue(entry, column.name) }}</a>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-template #stringField>
|
<ng-template #stringField>
|
||||||
{{ getValue(entry, column.name) }}
|
{{ getValue(entry, column.name) }}
|
||||||
|
|||||||
@ -346,7 +346,7 @@ export class SearchComponent implements OnInit {
|
|||||||
|
|
||||||
getLink(entry: any): any {
|
getLink(entry: any): any {
|
||||||
if(this.searchType === 'user') {
|
if(this.searchType === 'user') {
|
||||||
return "/u/" + this.getValue(entry, 'username');
|
return "/u/" + this.getValue(entry, 'user_id');
|
||||||
} else {
|
} else {
|
||||||
return "/s/" + this.getValue(entry, 'replay_id');
|
return "/s/" + this.getValue(entry, 'replay_id');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -62,11 +62,11 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Player</td>
|
<td>Player</td>
|
||||||
<td>
|
<td>
|
||||||
<a [routerLink]="['/u/' + this.pair.replays[0].username]">{{ this.pair.replays[0].username }}</a>
|
<a [routerLink]="['/u/' + this.pair.replays[0].user_id]">{{ this.pair.replays[0].username }}</a>
|
||||||
<a class="btn" style="margin-left: 5px" href="https://osu.ppy.sh/users/{{ this.pair.replays[0].user_id }}" target="_blank">osu!web</a>
|
<a class="btn" style="margin-left: 5px" href="https://osu.ppy.sh/users/{{ this.pair.replays[0].user_id }}" target="_blank">osu!web</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a [routerLink]="['/u/' + this.pair.replays[1].username]">{{ this.pair.replays[1].username }}</a>
|
<a [routerLink]="['/u/' + this.pair.replays[1].user_id]">{{ this.pair.replays[1].username }}</a>
|
||||||
<a class="btn" style="margin-left: 5px" href="https://osu.ppy.sh/users/{{ this.pair.replays[1].user_id }}" target="_blank">osu!web</a>
|
<a class="btn" style="margin-left: 5px" href="https://osu.ppy.sh/users/{{ this.pair.replays[1].user_id }}" target="_blank">osu!web</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@ -33,7 +33,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="score-player__row score-player__row--player mt-2">
|
<div class="score-player__row score-player__row--player mt-2">
|
||||||
Played by <a [routerLink]="['/u/' + this.replayData.username]">{{ this.replayData.username }}</a> <a *ngIf="this.replayData.user_id" class="btn" style="margin-left: 5px" href="https://osu.ppy.sh/users/{{ this.replayData.user_id }}" target="_blank">osu!web</a>
|
Played by <a [routerLink]="['/u/' + this.replayData.user_id ?? this.replayData.username]">{{ this.replayData.username }}</a> <a *ngIf="this.replayData.user_id" class="btn" style="margin-left: 5px" href="https://osu.ppy.sh/users/{{ this.replayData.user_id }}" target="_blank">osu!web</a>
|
||||||
<ng-container *ngIf="!this.isUserScore">
|
<ng-container *ngIf="!this.isUserScore">
|
||||||
<br>
|
<br>
|
||||||
Submitted on <strong>{{ this.replayData.date }}</strong>
|
Submitted on <strong>{{ this.replayData.date }}</strong>
|
||||||
@ -196,7 +196,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr *ngFor="let score of this.replayData.similar_scores">
|
<tr *ngFor="let score of this.replayData.similar_scores">
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
<a [routerLink]="['/u/' + score.username]">{{ score.username }}</a>
|
<a [routerLink]="['/u/' + score.user_id]">{{ score.username }}</a>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
{{ score.pp | number: '1.2-2' }}
|
{{ score.pp | number: '1.2-2' }}
|
||||||
|
|||||||
@ -98,7 +98,7 @@
|
|||||||
<tbody style="font-size: 14px;">
|
<tbody style="font-size: 14px;">
|
||||||
<tr *ngFor="let score of this.getCurrentPage()">
|
<tr *ngFor="let score of this.getCurrentPage()">
|
||||||
<td>
|
<td>
|
||||||
<a [routerLink]="['/u/' + score.username]">
|
<a [routerLink]="['/u/' + score.user_id]">
|
||||||
{{ score.username }}
|
{{ score.username }}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user