Skip to content

Commit

Permalink
Visualize compensation points better
Browse files Browse the repository at this point in the history
  • Loading branch information
timoschwarzer committed Jul 16, 2024
1 parent e856a55 commit 77641ed
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion components/League/PointsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
This game does not count towards the leaderboard.
</template>
</div>
<span v-else>Worst race gets discarded</span>
<span v-else>Worst game gets discarded over time</span>
</v-tooltip>
</template>

Expand Down
23 changes: 23 additions & 0 deletions pages/league/seasons/_seasonId.vue
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,20 @@
Submitted to current game
</v-tooltip>
</template>
<template #item.points="{ item }">
<v-tooltip left open-delay="500" :disabled="item.rankingCompensationPoints === 0">
<template #activator="{ on }">
<span :class="{'compensating-points': item.rankingCompensationPoints > 0}" v-on="on">
{{ item.points }}
</span>
</template>
<div class="text-right">
Includes {{ item.rankingCompensationPoints }} {{ item.rankingCompensationPoints === 1 ? 'point' : 'points' }} to compensate<br>
missed or unusually bad games. These points<br>
disappear over time until the end of the season.
</div>
</v-tooltip>
</template>

<!-- no data -->
<template #no-data>
Expand Down Expand Up @@ -689,4 +703,13 @@
margin-right: 0.5em;
margin-left: -0.5em;
}
.compensating-points {
&::before {
content: '℮';
color: rgba(255, 255, 255, 0.5);
}
cursor: help;
}
</style>

0 comments on commit 77641ed

Please sign in to comment.