ranking added
This commit is contained in:
parent
16db253fb4
commit
f42c6dc028
@ -12,6 +12,16 @@
|
|||||||
<img class="logo_light" src="assets/logo-authentes-white.png" />
|
<img class="logo_light" src="assets/logo-authentes-white.png" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<ion-reorder-group (ionItemReorder)="reorderItems($event)" disabled="false">
|
||||||
|
<!-- Default reorder icon, end aligned items -->
|
||||||
|
<ion-item *ngFor="let card of this.game.cardset; let i = index">
|
||||||
|
<ion-label>
|
||||||
|
<span class="ranking-number">{{ i + 1 }}.</span> {{ card.title }}
|
||||||
|
</ion-label>
|
||||||
|
<ion-reorder slot="end"></ion-reorder>
|
||||||
|
</ion-item>
|
||||||
|
</ion-reorder-group>
|
||||||
|
|
||||||
</ion-content>
|
</ion-content>
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,4 +7,7 @@
|
|||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ranking-number {
|
||||||
|
color: var(--ion-color-primary);
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
@ -12,4 +12,9 @@ export class ValuesRankingPage {
|
|||||||
|
|
||||||
constructor(private router: Router, private game: GameService, public alert: AlertService) {}
|
constructor(private router: Router, private game: GameService, public alert: AlertService) {}
|
||||||
|
|
||||||
|
reorderItems(ev) {
|
||||||
|
const itemMove = this.game.cardset.splice(ev.detail.from, 1)[0];
|
||||||
|
this.game.cardset.splice(ev.detail.to, 0, itemMove);
|
||||||
|
ev.detail.complete();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user