Merge branch 'main' into linked-notifications

This commit is contained in:
Face 2025-07-15 18:22:23 +03:00 committed by GitHub
commit 159d371655
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 390 additions and 83 deletions

View file

@ -203,13 +203,15 @@
<!-- Page dots -->
<div class="flex items-center justify-center gap-2">
{#each tips as _, index}
{#each tips as tip, index}
<button
aria-label={`Go to page ${index + 1}`}
onclick={() => goToPage(index)}
class="h-2 w-2 rounded-full transition-colors {index === currentPage
? 'bg-primary'
: 'bg-muted-foreground/30 hover:bg-muted-foreground/50'}"
aria-label={`Go to tip ${index + 1}: ${tip.title}`}
aria-current={index === currentPage ? 'page' : undefined}
></button>
{/each}
</div>

View file

@ -105,7 +105,14 @@
async function handleTileClick(index: number) {
if (!isPlaying || revealedTiles.includes(index) || !sessionToken) return;
lastClickedTile = index;
try {
// Temporarily disabled - using local simulation
toast.error('Mines game temporarily disabled', {
description: 'This feature is currently under maintenance'
});
return;
/* try {
const response = await fetch('/api/gambling/mines/reveal', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
@ -142,12 +149,19 @@
toast.error('Failed to reveal tile', {
description: error instanceof Error ? error.message : 'Unknown error occurred'
});
}
} */
}
async function cashOut() {
if (!isPlaying || !sessionToken) return;
try {
// Temporarily disabled
toast.error('Mines game temporarily disabled', {
description: 'This feature is currently under maintenance'
});
return;
/* try {
const response = await fetch('/api/gambling/mines/cashout', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
@ -175,12 +189,19 @@
toast.error('Failed to cash out', {
description: error instanceof Error ? error.message : 'Unknown error occurred'
});
}
} */
}
async function startGame() {
if (!canBet) return;
balance -= betAmount;
// Temporarily disabled
toast.error('Mines game temporarily disabled', {
description: 'This feature is currently under maintenance'
});
return;
/* balance -= betAmount;
onBalanceUpdate?.(balance);
try {
const response = await fetch('/api/gambling/mines/start', {
@ -207,7 +228,7 @@
toast.error('Failed to start game', {
description: error instanceof Error ? error.message : 'Unknown error occurred'
});
}
} */
}
onMount(async () => {