Skip to content

Commit

Permalink
FIx typo in SB ranking + eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
V-Paranoiaque committed Nov 25, 2024
1 parent fd8e283 commit 0815fc1
Showing 1 changed file with 42 additions and 75 deletions.
117 changes: 42 additions & 75 deletions src/app/rankingseabattles/rankingseabattles.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,97 +12,64 @@
<h1 class="text-center" id="rankingDesc">
<span translate>Sea Battles Ranking</span>
</h1>
<table
class="table table-striped table-middle align-middle"
aria-labelledby="rankingDesc">
<table class="table table-striped table-middle align-middle" aria-labelledby="rankingDesc">

Check failure on line 15 in src/app/rankingseabattles/rankingseabattles.component.html

View workflow job for this annotation

GitHub Actions / Run eslint

Replace `·class="table·table-striped·table-middle·align-middle"` with `⏎··············class="table·table-striped·table-middle·align-middle"⏎·············`
<thead>
<tr class="text-center">
<th scope="col"></th>
<th scope="col" translate>Player</th>
<th scope="col" class="d-none d-sm-table-cell">
% <span translate>Victory</span>
% <span translate>Victories</span>
</th>
<th scope="col" translate>Points</th>
</tr>
</thead>
<tbody>
@for (p of rankingList; track p) {
<tr>
<td>
{{ p.ranking }}
</td>
<td>
<app-user-profile
id="{{ p.player_id }}"
username="{{ p.username }}"
status="1"></app-user-profile>
</td>
<td class="text-center d-none d-sm-table-cell">
@if (p.sb_participate > 0) {
{{
(100 * p.sb_win) / p.sb_participate
| number: '1.0-2' : this.translate.currentLang
}}%
} @else {
-
}
</td>
<td class="text-end">
{{ p.points | number: '' : this.translate.currentLang }}
</td>
</tr>
<tr>

Check failure on line 28 in src/app/rankingseabattles/rankingseabattles.component.html

View workflow job for this annotation

GitHub Actions / Run eslint

Insert `··`
<td>

Check failure on line 29 in src/app/rankingseabattles/rankingseabattles.component.html

View workflow job for this annotation

GitHub Actions / Run eslint

Insert `··`
{{ p.ranking }}

Check failure on line 30 in src/app/rankingseabattles/rankingseabattles.component.html

View workflow job for this annotation

GitHub Actions / Run eslint

Insert `··`
</td>

Check failure on line 31 in src/app/rankingseabattles/rankingseabattles.component.html

View workflow job for this annotation

GitHub Actions / Run eslint

Insert `··`
<td>

Check failure on line 32 in src/app/rankingseabattles/rankingseabattles.component.html

View workflow job for this annotation

GitHub Actions / Run eslint

Replace `··················` with `····················`
<app-user-profile id="{{ p.player_id }}" username="{{ p.username }}" status="1"></app-user-profile>

Check failure on line 33 in src/app/rankingseabattles/rankingseabattles.component.html

View workflow job for this annotation

GitHub Actions / Run eslint

Replace `····················<app-user-profile·id="{{·p.player_id·}}"·username="{{·p.username·}}"` with `······················<app-user-profile⏎························id="{{·p.player_id·}}"⏎························username="{{·p.username·}}"⏎·······················`
</td>

Check failure on line 34 in src/app/rankingseabattles/rankingseabattles.component.html

View workflow job for this annotation

GitHub Actions / Run eslint

Replace `··················` with `····················`
<td class="text-center d-none d-sm-table-cell">

Check failure on line 35 in src/app/rankingseabattles/rankingseabattles.component.html

View workflow job for this annotation

GitHub Actions / Run eslint

Insert `··`
@if (p.sb_participate > 0) {

Check failure on line 36 in src/app/rankingseabattles/rankingseabattles.component.html

View workflow job for this annotation

GitHub Actions / Run eslint

Insert `··`
{{
(100 * p.sb_win) / p.sb_participate
| number: '1.0-2' : this.translate.currentLang
}}%
} @else {
-
}
</td>
<td class="text-end">
{{ p.points | number: '' : this.translate.currentLang }}
</td>
</tr>
}
</tbody>
</table>

@if (rankingMax > 1) {
<div>
<br />
<div class="input-group">
<span
class="input-group-text"
role="button"
(click)="rankingPageChange(1)"
(keyup.enter)="rankingPageChange(1)"
tabindex="0"
>&lt;&lt;</span
>
<span
class="input-group-text"
role="button"
(click)="rankingPageChange(rankingPage - 1)"
(keyup.enter)="rankingPageChange(rankingPage - 1)"
tabindex="0"
>&lt;</span
>
<select
class="form-select"
#mySelect
(change)="rankingPageChange(parseInt(mySelect.value))"
[ngModel]="rankingPage"
title="{{ 'Change page' | translate }}">
@for (id of Tools.range(1, rankingMax); track id) {
<option value="{{ id }}" translate>Page {{ id }}</option>
}
</select>
<span
class="input-group-text"
role="button"
(click)="rankingPageChange(rankingPage + 1)"
(keyup.enter)="rankingPageChange(rankingPage + 1)"
tabindex="0"
>&gt;</span
>
<span
class="input-group-text"
role="button"
(click)="rankingPageChange(rankingMax)"
(keyup.enter)="rankingPageChange(rankingMax)"
tabindex="0"
>&gt;&gt;</span
>
</div>
<div>
<br />
<div class="input-group">
<span class="input-group-text" role="button" (click)="rankingPageChange(1)"
(keyup.enter)="rankingPageChange(1)" tabindex="0">&lt;&lt;</span>
<span class="input-group-text" role="button" (click)="rankingPageChange(rankingPage - 1)"
(keyup.enter)="rankingPageChange(rankingPage - 1)" tabindex="0">&lt;</span>
<select class="form-select" #mySelect (change)="rankingPageChange(parseInt(mySelect.value))"
[ngModel]="rankingPage" title="{{ 'Change page' | translate }}">
@for (id of Tools.range(1, rankingMax); track id) {
<option value="{{ id }}" translate>Page {{ id }}</option>
}
</select>
<span class="input-group-text" role="button" (click)="rankingPageChange(rankingPage + 1)"
(keyup.enter)="rankingPageChange(rankingPage + 1)" tabindex="0">&gt;</span>
<span class="input-group-text" role="button" (click)="rankingPageChange(rankingMax)"
(keyup.enter)="rankingPageChange(rankingMax)" tabindex="0">&gt;&gt;</span>
</div>
</div>
}
</div>
</div>
Expand All @@ -111,4 +78,4 @@ <h1 class="text-center" id="rankingDesc">
</div>
</main>

<app-main-right></app-main-right>
<app-main-right></app-main-right>

0 comments on commit 0815fc1

Please sign in to comment.