Files
thecrimesynticate/resources/views/game/jail.blade.php
T
Doar MihaiandClaude Sonnet 4.6 f6e7d37428 feat: add bust-out card to jail page
Add interactive Bust Out card to jail view with:
- Success chance and cost display
- Conditional button state (active when funds sufficient, disabled otherwise)
- Form submission to game.jail.bust-out route with CSRF protection
- Flash message support for success/error feedback
- Cash on hand display in status card
- Dark crime theme styling with yellow prison colors

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 22:57:01 +03:00

102 lines
5.2 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
@extends('layouts.game')
@section('title', 'Jail')
@section('game-content')
<div class="max-w-2xl mx-auto space-y-4">
{{-- Flash messages --}}
@if(session('success'))
<div class="bg-green-900/30 border border-green-700 text-green-300 rounded-lg px-4 py-3 text-sm">
{{ session('success') }}
</div>
@endif
@if(session('error'))
<div class="bg-red-900/30 border border-red-700 text-red-300 rounded-lg px-4 py-3 text-sm">
{{ session('error') }}
</div>
@endif
<div class="bg-syndicate-800 border border-syndicate-700 rounded-lg">
<div class="p-8 text-center">
<div class="mb-6">
<span class="text-6xl">🚔</span>
</div>
<h1 class="font-display text-2xl font-bold text-gray-100 mb-4">You're in Jail</h1>
<p class="text-gray-400 mb-6 text-sm">Your character has been arrested and is currently serving time.</p>
{{-- Status card --}}
<div class="bg-yellow-900/20 border border-yellow-800 rounded-lg p-6 mb-6 text-left">
<h3 class="font-display text-base font-semibold text-yellow-300 mb-3">Your Status</h3>
<div class="space-y-2 text-sm">
<div class="flex justify-between">
<span class="text-gray-400">Status</span>
<span class="text-yellow-400 font-medium">In Jail</span>
</div>
<div class="flex justify-between">
<span class="text-gray-400">Release Time</span>
<span class="text-gray-200 font-medium">{{ $releaseTime }}</span>
</div>
<div class="flex justify-between">
<span class="text-gray-400">Cash on Hand</span>
<span class="text-gray-200 font-medium">${{ number_format($character->money) }}</span>
</div>
</div>
</div>
{{-- Bust Out card --}}
<div class="bg-syndicate-700 border border-syndicate-600 rounded-lg p-6 mb-6 text-left">
<h3 class="font-display text-base font-semibold text-gray-100 mb-1">Bust Out</h3>
<p class="text-gray-400 text-xs mb-4">Spend cash for a chance to escape early. Failure extends your sentence.</p>
<div class="space-y-2 text-sm mb-4">
<div class="flex justify-between">
<span class="text-gray-400">Success Chance</span>
<span class="text-yellow-400 font-medium">{{ $bustOutChance }}%</span>
</div>
<div class="flex justify-between">
<span class="text-gray-400">Cost</span>
<span class="text-gray-200 font-medium">${{ number_format($bustOutCost) }}</span>
</div>
<div class="flex justify-between">
<span class="text-gray-400">On Failure</span>
<span class="text-red-400 font-medium">Sentence × 1.5</span>
</div>
</div>
@if($character->money >= $bustOutCost)
<form action="{{ route('game.jail.bust-out') }}" method="POST">
@csrf
<button type="submit"
class="w-full flex items-center justify-center px-6 py-3 bg-yellow-700 hover:bg-yellow-600 text-white font-medium rounded-lg transition">
<span class="mr-2">🔓</span>
Bust Out ({{ $bustOutChance }}% chance)
</button>
</form>
@else
<button type="button" disabled
title="You need ${{ number_format($bustOutCost) }} to attempt a bust-out"
class="w-full flex items-center justify-center px-6 py-3 bg-syndicate-600 text-gray-500 font-medium rounded-lg cursor-not-allowed">
<span class="mr-2">🔒</span>
Not Enough Cash
</button>
@endif
</div>
<div class="space-y-4">
<p class="text-sm text-gray-600">Or wait for your sentence to complete automatically.</p>
<a href="{{ route('game.dashboard') }}"
class="inline-flex items-center text-gray-500 hover:text-gray-300 transition text-sm">
<svg class="w-4 h-4 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7" />
</svg>
Back to Dashboard
</a>
</div>
</div>
</div>
</div>
@endsection