Skip to content

Commit f5e9dc0

Browse files
authored
Fix playpause button not toggling (#5)
1 parent 66d20b5 commit f5e9dc0

File tree

1 file changed

+30
-7
lines changed

1 file changed

+30
-7
lines changed

force-app/main/default/lwc/smsSweeperForceMenuBar/smsSweeperForceMenuBar.html

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,44 @@
33
<div class="sms-counter">
44
{flaggedMines}
55
<!--!Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->
6-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" class="sms-flag-counter">
7-
<path d="m64 32c0-17.7-14.3-32-32-32s-32 14.3-32 32v32 304 112c0 17.7 14.3 32 32 32s32-14.3 32-32v-128l64.3-16.1c41.1-10.3 84.6-5.5 122.5 13.4 44.2 22.1 95.5 24.8 141.7 7.4l34.7-13c12.5-4.7 20.8-16.6 20.8-30v-247.7c0-23-24.2-38-44.8-27.7l-9.6 4.8c-46.3 23.2-100.8 23.2-147.1 0-35.1-17.6-75.4-22-113.5-12.5l-69 17.4z"/>
6+
<svg
7+
xmlns="http://www.w3.org/2000/svg"
8+
viewBox="0 0 448 512"
9+
class="sms-flag-counter"
10+
>
11+
<path
12+
d="m64 32c0-17.7-14.3-32-32-32s-32 14.3-32 32v32 304 112c0 17.7 14.3 32 32 32s32-14.3 32-32v-128l64.3-16.1c41.1-10.3 84.6-5.5 122.5 13.4 44.2 22.1 95.5 24.8 141.7 7.4l34.7-13c12.5-4.7 20.8-16.6 20.8-30v-247.7c0-23-24.2-38-44.8-27.7l-9.6 4.8c-46.3 23.2-100.8 23.2-147.1 0-35.1-17.6-75.4-22-113.5-12.5l-69 17.4z"
13+
/>
814
</svg>
915
</div>
1016
<div class="sms-counter-container">
11-
<button lwc:if={gameInProgress} type="button" class="sms-play-pause-button" onclick={handlePlayPause}>
17+
<button
18+
lwc:if={gameInProgress}
19+
type="button"
20+
class="sms-play-pause-button"
21+
onclick={handlePlayPause}
22+
>
1223
<!--!Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->
13-
<svg lwc:if={timer} viewBox="0 0 320 512" xmlns="http://www.w3.org/2000/svg"><path d="m48 64c-26.5 0-48 21.5-48 48v288c0 26.5 21.5 48 48 48h32c26.5 0 48-21.5 48-48v-288c0-26.5-21.5-48-48-48zm192 0c-26.5 0-48 21.5-48 48v288c0 26.5 21.5 48 48 48h32c26.5 0 48-21.5 48-48v-288c0-26.5-21.5-48-48-48z"/></svg>
24+
<svg
25+
lwc:if={isTimerRunning}
26+
viewBox="0 0 320 512"
27+
xmlns="http://www.w3.org/2000/svg"
28+
>
29+
<path
30+
d="m48 64c-26.5 0-48 21.5-48 48v288c0 26.5 21.5 48 48 48h32c26.5 0 48-21.5 48-48v-288c0-26.5-21.5-48-48-48zm192 0c-26.5 0-48 21.5-48 48v288c0 26.5 21.5 48 48 48h32c26.5 0 48-21.5 48-48v-288c0-26.5-21.5-48-48-48z"
31+
/>
32+
</svg>
1433
<!--!Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->
15-
<svg lwc:else viewBox="0 0 384 512" xmlns="http://www.w3.org/2000/svg"><path d="m73 39c-14.8-9.1-33.4-9.4-48.5-.9s-24.5 24.5-24.5 41.9v352c0 17.4 9.4 33.4 24.5 41.9s33.7 8.1 48.5-.9l288-176c14.3-8.7 23-24.2 23-41s-8.7-32.2-23-41z"/></svg>
34+
<svg lwc:else viewBox="0 0 384 512" xmlns="http://www.w3.org/2000/svg">
35+
<path
36+
d="m73 39c-14.8-9.1-33.4-9.4-48.5-.9s-24.5 24.5-24.5 41.9v352c0 17.4 9.4 33.4 24.5 41.9s33.7 8.1 48.5-.9l288-176c14.3-8.7 23-24.2 23-41s-8.7-32.2-23-41z"
37+
/>
38+
</svg>
1639
</button>
1740
<div class="sms-counter">
1841
{elapsed}
19-
<c-sms-clock-icon animate={timer}></c-sms-clock-icon>
42+
<c-sms-clock-icon animate={isTimerRunning}></c-sms-clock-icon>
2043
</div>
2144
</div>
2245
</div>
23-
</template>
46+
</template>

0 commit comments

Comments
 (0)