Cleanup Added lobby menu and page items. fix for root redirect

This commit is contained in:
2025-09-03 22:49:27 +02:00
parent 6e212db8e1
commit eff5aafbdb
25 changed files with 148 additions and 65 deletions

View File

@@ -2,7 +2,7 @@ FROM php:8.3-apache
RUN apt-get update && apt-get install -y libpq-dev libzip-dev unzip libpng-dev libjpeg-dev libfreetype6-dev libicu-dev && \
docker-php-ext-install pdo_pgsql pgsql zip bcmath gd intl
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -y nodejs
apt-get install -y nodejs npm
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
php composer-setup.php --install-dir=/usr/local/bin --filename=composer && \
rm composer-setup.php

View File

@@ -0,0 +1,12 @@
<?php
namespace App\Filament\User\Pages;
use Filament\Pages\Page;
class AboutUs extends Page
{
protected static ?string $navigationIcon = 'heroicon-o-document-text';
protected static string $view = 'filament.user.pages.about-us';
}

View File

@@ -0,0 +1,12 @@
<?php
namespace App\Filament\User\Pages;
use Filament\Pages\Page;
class Deposits extends Page
{
protected static ?string $navigationIcon = 'iconsax-two-money-recive';
protected static string $view = 'filament.user.pages.deposits';
}

View File

@@ -6,7 +6,7 @@ use Filament\Pages\Page;
class Lobby extends Page
{
protected static ?string $navigationIcon = 'heroicon-o-home';
protected static ?string $navigationIcon = 'ri-home-smile-2-fill';
protected static string $view = 'filament.user.pages.lobby';
}
}

View File

@@ -0,0 +1,12 @@
<?php
namespace App\Filament\User\Pages;
use Filament\Pages\Page;
class Profile extends Page
{
protected static ?string $navigationIcon = 'carbon-user-profile';
protected static string $view = 'filament.user.pages.profile';
}

View File

@@ -0,0 +1,12 @@
<?php
namespace App\Filament\User\Pages;
use Filament\Pages\Page;
class Transactions extends Page
{
protected static ?string $navigationIcon = 'polaris-transaction-icon';
protected static string $view = 'filament.user.pages.transactions';
}

View File

@@ -0,0 +1,12 @@
<?php
namespace App\Filament\User\Pages;
use Filament\Pages\Page;
class VIP extends Page
{
protected static ?string $navigationIcon = 'ri-vip-crown-2-fill';
protected static string $view = 'filament.user.pages.v-i-p';
}

View File

@@ -0,0 +1,17 @@
<?php
namespace App\Filament\User\Widgets;
use Filament\Widgets\Widget;
class AdminButtonWidget extends Widget
{
protected static ?int $sort = 1;
protected static string $view = 'filament.user.widgets.admin-button-widget';
public function shouldRender(): bool
{
return auth()->user()->role === 'admin';
}
}

View File

@@ -0,0 +1,17 @@
<?php
namespace App\Filament\User\Widgets;
use Filament\Widgets\Widget;
class AdminLinkWidget extends Widget
{
protected static ?int $sort = 2;
protected static string $view = 'filament.user.widgets.admin-link-widget';
public function shouldRender(): bool
{
return auth()->user() && auth()->user()->role === 'admin';
}
}

View File

@@ -24,19 +24,21 @@ class UserPanelProvider extends PanelProvider
{
return $panel
->id('user')
->path('user')
->path('') // Serve at root (/)
->login()
->colors([
'primary' => Color::Green, // Neon green accents
'primary' => Color::Purple, // Purple for user panel
])
->brandLogo(null) // Text brand name only
->discoverResources(in: app_path('Filament/User/Resources'), for: 'App\\Filament\\User\\Resources')
->discoverPages(in: app_path('Filament/User/Pages'), for: 'App\\Filament\\User\\Pages')
->pages([
Pages\Dashboard::class, # Lobby as dashboard
Pages\Dashboard::class, // Lobby as dashboard
])
->discoverWidgets(in: app_path('Filament/User/Widgets'), for: 'App\\Filament\\User\\Widgets')
->widgets([
Widgets\AccountWidget::class,
\App\Filament\User\Widgets\AdminLinkWidget::class, // Correct namespace
])
->middleware([
EncryptCookies::class,
@@ -53,7 +55,8 @@ class UserPanelProvider extends PanelProvider
Authenticate::class,
])
->navigationGroups([
'Casino' # Group for games, deposits, transactions
]);
'Casino' // Group for games, deposits, transactions
])
->default();
}
}

View File

@@ -1,22 +0,0 @@
<x-layout title="Lobby">
<div class="container mx-auto mt-4">
<h1 class="text-2xl font-bold mb-4 text-neon_green text-glow">Casino Lobby</h1>
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
<div class="card bg-gray_800 p-4 rounded shadow-neon">
<h3 class="text-lg mb-2">Slots</h3>
<p>Pragmatic-style reels and animations.</p>
<a href="/games/slots" class="btn btn-neon mt-2">Play</a>
</div>
<div class="card bg-gray_800 p-4 rounded shadow-neon">
<h3 class="text-lg mb-2">Plinko</h3>
<p>Physics-based drop with multipliers.</p>
<a href="/games/plinko" class="btn btn-neon mt-2">Play</a>
</div>
<div class="card bg-gray_800 p-4 rounded shadow-neon">
<h3 class="text-lg mb-2">Wheel Spin</h3>
<p>Fortune wheel with prizes.</p>
<a href="/games/wheel" class="btn btn-neon mt-2">Play</a>
</div>
</div>
</div>
</x-layout>

View File

@@ -0,0 +1,3 @@
<x-filament-panels::page>
</x-filament-panels::page>

View File

@@ -0,0 +1,4 @@
<x-filament-panels::page>
<h1 class="text-2xl font-bold mb-4">Deposits</h1>
<p>Claim promo codes for fake currency. Claim history below (coming soon).</p>
</x-filament-panels::page>

View File

@@ -1,3 +1,20 @@
<x-filament-panels::page>
</x-filament-panels::page>
<h1 class="text-2xl font-bold mb-4">Casino Lobby</h1>
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
<div class="card bg-gray-800 p-4 rounded">
<h3 class="text-lg mb-2">Slots</h3>
<p>Pragmatic-style reels and animations.</p>
<a href="/games/slots" class="filament-button filament-button-size-sm">Play</a>
</div>
<div class="card bg-gray-800 p-4 rounded">
<h3 class="text-lg mb-2">Plinko</h3>
<p>Physics-based drop with multipliers.</p>
<a href="/games/plinko" class="filament-button filament-button-size-sm">Play</a>
</div>
<div class="card bg-gray-800 p-4 rounded">
<h3 class="text-lg mb-2">Wheel Spin</h3>
<p>Fortune wheel with prizes.</p>
<a href="/games/wheel" class="filament-button filament-button-size-sm">Play</a>
</div>
</div>
</x-filament-panels::page>

View File

@@ -0,0 +1,4 @@
<x-filament-panels::page>
<h1 class="text-2xl font-bold mb-4">Profile</h1>
<p>Change password, profile picture, email, add 2FA (coming soon).</p>
</x-filament-panels::page>

View File

@@ -0,0 +1,3 @@
<x-filament-panels::page>
<h1 class="text-2xl font-bold mb-4">Transactions</h1><p>View deposits, withdrawals, wins/losses (coming soon).</p>
</x-filament-panels::page>

View File

@@ -0,0 +1,3 @@
<x-filament-panels::page>
<h1 class="text-2xl font-bold mb-4">About Us</h1><p>Skunk Lounge is a fake casino for entertainment only. No real money.</p>
</x-filament-panels::page>

View File

@@ -0,0 +1,4 @@
<x-filament-widgets::widget>
<x-filament::section>
<a href="/admin" class="btn-neon">Admin Panel</a>
</x-filament-widgets::widget>

View File

@@ -0,0 +1,3 @@
<x-filament-widgets::widget>
<a href="/admin" class="filament-button filament-button-size-sm">Admin Panel</a>
</x-filament-widgets::widget>

View File

@@ -1,4 +0,0 @@
<x-layout title="About Us">
<h1 class="text-2xl font-bold mb-4 glow">About Us</h1>
<p>Skunk Lounge is a fake casino for entertainment only. No real money involved.</p>
</x-layout>

View File

@@ -1,4 +0,0 @@
<x-layout title="Deposits">
<h1 class="text-2xl font-bold mb-4 glow">Deposits</h1>
<p>Claim promo codes for fake currency. Claim history below. (Coming soon)</p>
</x-layout>

View File

@@ -1,4 +0,0 @@
<x-layout title="Profile">
<h1 class="text-2xl font-bold mb-4 glow">Profile</h1>
<p>Change password, profile picture, email, add 2FA, etc. (Coming soon)</p>
</x-layout>

View File

@@ -1,4 +0,0 @@
<x-layout title="Transactions">
<h1 class="text-2xl font-bold mb-4 glow">Transactions</h1>
<p>View deposits, withdrawals, wins/losses. (Coming soon)</p>
</x-layout>

View File

@@ -1,4 +0,0 @@
<x-layout title="VIP">
<h1 class="text-2xl font-bold mb-4 glow">VIP</h1>
<p>Subscribe with casino money for VIP status. (Coming soon)</p>
</x-layout>

View File

@@ -4,14 +4,6 @@ use App\Http\Controllers\ProfileController;
use Illuminate\Support\Facades\Route;
use App\View\Components\Lobby;
Route::get('/', function () {
return view('welcome');
});
Route::get('/lobby', function () {
return view('components.lobby');
})->middleware('auth');
Route::get('/dashboard', function () {
return view('dashboard');
})->middleware(['auth', 'verified'])->name('dashboard');
@@ -20,11 +12,6 @@ Route::middleware('auth')->group(function () {
Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');
Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
Route::get('/profile', function () { return view('pages.profile'); })->name('profile');
Route::get('/deposits', function () { return view('pages.deposits'); })->name('deposits');
Route::get('/transactions', function () { return view('pages.transactions'); })->name('transactions');
Route::get('/vip', function () { return view('pages.vip'); })->name('vip');
Route::get('/about', function () { return view('pages.about'); })->name('about');
});
require __DIR__.'/auth.php';