Skip to content

Commit

Permalink
🔧 Fix: Hide thrown darts in PageConfig component
Browse files Browse the repository at this point in the history
The code changes hide the section for displaying thrown darts in the PageConfig component by setting a conditional rendering. This change was made to address an issue related to the confetti animation.
  • Loading branch information
creazy231 committed May 27, 2024
1 parent c9325e9 commit 3002a35
Show file tree
Hide file tree
Showing 4 changed files with 328 additions and 275 deletions.
2 changes: 1 addition & 1 deletion components/PageConfig.vue
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@
</div>
</div>

<div class="space-y-4 rounded border border-white/10 p-4">
<div v-if="false" class="space-y-4 rounded border border-white/10 p-4">
<div>
<h2 class="text-lg font-semibold">
Show thrown darts
Expand Down
3 changes: 2 additions & 1 deletion entrypoints/match.content/winner-animation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,9 @@ export async function winnerAnimation() {

(winnerScoreWrapperEl as HTMLElement).style.height = `${winnerScoreElHeight}px`;
}

if (config.thrownDartsOnWin.enabled && dartsThrown.length > 0) {
(winnerScoreEl as HTMLElement).innerText = `${dartsThrown} Darts`;
// (winnerScoreEl as HTMLElement).innerText = `${dartsThrown} Darts`; // TODO: Add darts thrown to winner animation in other way that does not break the confetti animation
// set font size of dart thrown text to 48pt on smaller screens because of longer text
if (!winnerScoreElWidth || winnerScoreElWidth < 615) (winnerScoreEl as HTMLElement).style.fontSize = "48pt";
(winnerScoreEl as HTMLElement).style.lineHeight = `${winnerScoreElHeight}px`;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "autodarts-tools",
"description": "Autodarts Tools enhances the gaming experience on autodarts.io",
"version": "1.3.11",
"version": "1.3.12",
"type": "module",
"author": {
"name": "Tobias Thiele",
Expand Down
Loading

0 comments on commit 3002a35

Please sign in to comment.