This commit is contained in:
parent
958460db98
commit
42b75ecf2f
2 changed files with 15 additions and 4 deletions
|
|
@ -374,9 +374,20 @@
|
|||
});
|
||||
}
|
||||
|
||||
function handleClose() {
|
||||
if ($gamesOverlay.matchId) {
|
||||
nakama.leaveMatch($gamesOverlay.matchId);
|
||||
async function handleClose() {
|
||||
const matchId = $gamesOverlay.matchId;
|
||||
const mode = $gameMode;
|
||||
|
||||
// If this is a waiting challenge we created, cancel it properly
|
||||
// (myColor === 'w' means we're white, which means we created the challenge)
|
||||
if (matchId && mode === 'waiting' && myColor === 'w') {
|
||||
try {
|
||||
await nakama.cancelChallenge(matchId);
|
||||
} catch (e) {
|
||||
console.error('Failed to cancel challenge:', e);
|
||||
}
|
||||
} else if (matchId) {
|
||||
nakama.leaveMatch(matchId);
|
||||
}
|
||||
|
||||
if (unsubscribeMatch) {
|
||||
|
|
|
|||
|
|
@ -3302,7 +3302,7 @@ bot.connect();</code></pre>
|
|||
<select
|
||||
id="screensaver-type"
|
||||
bind:value={screensaverType}
|
||||
style="width: 100%; max-width: 250px; padding: 0.5rem; border-radius: 4px; background: var(--bg-secondary); color: var(--text); border: 1px solid var(--border);"
|
||||
style="max-width: 250px;"
|
||||
>
|
||||
<option value="snowfall">Snowfall</option>
|
||||
<option value="fractal_crystalline">Fractal Crystalline</option>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue