Fix leftover Events routes breaking SSO and dashboard.
Deploy Ladill Mini / deploy (push) Failing after 52s
Deploy Ladill Mini / deploy (push) Failing after 52s
Replace events.* route names with mini.* defaults, remove unused topbar search, and align deploy script with ladill-mini paths. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -21,14 +21,14 @@ class SsoLoginController extends Controller
|
|||||||
{
|
{
|
||||||
public function connect(Request $request): RedirectResponse
|
public function connect(Request $request): RedirectResponse
|
||||||
{
|
{
|
||||||
$intended = (string) $request->query('redirect', route('events.dashboard'));
|
$intended = (string) $request->query('redirect', route('mini.dashboard'));
|
||||||
|
|
||||||
if (Auth::check()) {
|
if (Auth::check()) {
|
||||||
return $this->safeRedirect($intended, route('events.dashboard'));
|
return $this->safeRedirect($intended, route('mini.dashboard'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->attemptSilentRefresh($request, $intended)) {
|
if ($this->attemptSilentRefresh($request, $intended)) {
|
||||||
return $this->safeRedirect($intended, route('events.dashboard'));
|
return $this->safeRedirect($intended, route('mini.dashboard'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$verifier = Str::random(64);
|
$verifier = Str::random(64);
|
||||||
@@ -63,7 +63,7 @@ class SsoLoginController extends Controller
|
|||||||
|
|
||||||
public function callback(Request $request): RedirectResponse
|
public function callback(Request $request): RedirectResponse
|
||||||
{
|
{
|
||||||
$intended = (string) $request->session()->get('sso.intended', route('events.dashboard'));
|
$intended = (string) $request->session()->get('sso.intended', route('mini.dashboard'));
|
||||||
|
|
||||||
if ($request->filled('error')) {
|
if ($request->filled('error')) {
|
||||||
if (in_array($request->query('error'), ['login_required', 'interaction_required', 'consent_required'], true)
|
if (in_array($request->query('error'), ['login_required', 'interaction_required', 'consent_required'], true)
|
||||||
@@ -118,7 +118,7 @@ class SsoLoginController extends Controller
|
|||||||
Auth::login($user, remember: true);
|
Auth::login($user, remember: true);
|
||||||
$request->session()->regenerate();
|
$request->session()->regenerate();
|
||||||
|
|
||||||
return $this->safeRedirect($intended, route('events.dashboard'));
|
return $this->safeRedirect($intended, route('mini.dashboard'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function logout(Request $request): RedirectResponse
|
public function logout(Request $request): RedirectResponse
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ class TeamController extends Controller
|
|||||||
|
|
||||||
$request->session()->put('ladill_account', (int) $validated['account']);
|
$request->session()->put('ladill_account', (int) $validated['account']);
|
||||||
|
|
||||||
return redirect()->route('events.dashboard');
|
return redirect()->route('mini.dashboard');
|
||||||
}
|
}
|
||||||
|
|
||||||
private function canManage(Request $request): bool
|
private function canManage(Request $request): bool
|
||||||
|
|||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://getcomposer.org/schema.json",
|
"$schema": "https://getcomposer.org/schema.json",
|
||||||
"name": "ladill/events",
|
"name": "ladill/mini",
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"description": "Ladill Events — tickets, attendees, badges & programmes at events.ladill.com",
|
"description": "Ladill Mini — payment QR codes and wallet payouts at mini.ladill.com",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"laravel",
|
"laravel",
|
||||||
"framework"
|
"framework"
|
||||||
|
|||||||
+1
-1
@@ -23,7 +23,7 @@ return [
|
|||||||
'issuer' => 'https://'.config('app.auth_domain'),
|
'issuer' => 'https://'.config('app.auth_domain'),
|
||||||
'client_id' => env('LADILL_SSO_CLIENT_ID'),
|
'client_id' => env('LADILL_SSO_CLIENT_ID'),
|
||||||
'client_secret' => env('LADILL_SSO_CLIENT_SECRET'),
|
'client_secret' => env('LADILL_SSO_CLIENT_SECRET'),
|
||||||
'redirect' => rtrim((string) env('APP_URL', 'https://events.ladill.com'), '/').'/sso/callback',
|
'redirect' => rtrim((string) env('APP_URL', 'https://mini.ladill.com'), '/').'/sso/callback',
|
||||||
],
|
],
|
||||||
|
|
||||||
'ladill_webmail' => [
|
'ladill_webmail' => [
|
||||||
|
|||||||
+2
-2
@@ -2,7 +2,7 @@
|
|||||||
# Fast on-host release deploy (same model as climpme/web/deploy/deploy.sh).
|
# Fast on-host release deploy (same model as climpme/web/deploy/deploy.sh).
|
||||||
set -Eeuo pipefail
|
set -Eeuo pipefail
|
||||||
|
|
||||||
APP_ROOT="${LADILL_APP_ROOT:-/var/www/ladill-events}"
|
APP_ROOT="${LADILL_APP_ROOT:-/var/www/ladill-mini}"
|
||||||
RELEASES_DIR="$APP_ROOT/releases"
|
RELEASES_DIR="$APP_ROOT/releases"
|
||||||
SHARED_DIR="$APP_ROOT/shared"
|
SHARED_DIR="$APP_ROOT/shared"
|
||||||
CURRENT_LINK="$APP_ROOT/current"
|
CURRENT_LINK="$APP_ROOT/current"
|
||||||
@@ -236,7 +236,7 @@ if [ -L "$CURRENT_LINK" ] && [ -f "$CURRENT_LINK/artisan" ]; then
|
|||||||
(cd "$CURRENT_LINK" && php artisan queue:restart) || true
|
(cd "$CURRENT_LINK" && php artisan queue:restart) || true
|
||||||
fi
|
fi
|
||||||
if command -v supervisorctl >/dev/null 2>&1; then
|
if command -v supervisorctl >/dev/null 2>&1; then
|
||||||
supervisorctl restart ladill-events-worker:* 2>/dev/null || true
|
supervisorctl restart ladill-mini-worker:* 2>/dev/null || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
log "Cleaning old releases"
|
log "Cleaning old releases"
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
@php
|
@php
|
||||||
$afiaGreeting = "Hi, I'm Afia 👋 Ask me about QR codes — creating a Business or WiFi code, styling and downloads, scan stats, or wallet billing…";
|
$afiaGreeting = "Hi, I'm Afia 👋 Ask me about payment QRs — creating one, accepting payments, payouts, or the 5% platform fee…";
|
||||||
$afiaSuggestions = [
|
$afiaSuggestions = [
|
||||||
'How do I create a Business QR code?',
|
'How do I create a payment QR?',
|
||||||
'What is the difference between Link and List of Links?',
|
'How do customers pay me?',
|
||||||
'How do I download a print-ready PNG?',
|
'When do payouts reach my wallet?',
|
||||||
'Why is my wallet balance low?',
|
'What is the platform fee?',
|
||||||
];
|
];
|
||||||
@endphp
|
@endphp
|
||||||
{{-- Afia — Ladill AI assistant slide-over. Opened via $dispatch('afia-open'). --}}
|
{{-- Afia — Ladill AI assistant slide-over. Opened via $dispatch('afia-open'). --}}
|
||||||
<div x-data="afia({
|
<div x-data="afia({
|
||||||
chatUrl: '{{ route('events.afia.chat') }}',
|
chatUrl: '{{ route('mini.afia.chat') }}',
|
||||||
csrf: '{{ csrf_token() }}',
|
csrf: '{{ csrf_token() }}',
|
||||||
greeting: @js($afiaGreeting),
|
greeting: @js($afiaGreeting),
|
||||||
suggestions: @js($afiaSuggestions),
|
suggestions: @js($afiaSuggestions),
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
</span>
|
</span>
|
||||||
<div class="leading-tight">
|
<div class="leading-tight">
|
||||||
<p class="text-sm font-semibold text-slate-900">Afia</p>
|
<p class="text-sm font-semibold text-slate-900">Afia</p>
|
||||||
<p class="text-[11px] text-slate-400">QR Plus assistant</p>
|
<p class="text-[11px] text-slate-400">Mini assistant</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center gap-1">
|
<div class="flex items-center gap-1">
|
||||||
|
|||||||
@@ -13,52 +13,6 @@
|
|||||||
<svg class="h-6 w-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"/></svg>
|
<svg class="h-6 w-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"/></svg>
|
||||||
</button>
|
</button>
|
||||||
@include('partials.mobile-topbar-title')
|
@include('partials.mobile-topbar-title')
|
||||||
<div class="relative hidden min-w-0 flex-1 max-w-md lg:block"
|
|
||||||
x-data="topbarSearch({ searchUrl: @js(route('events.search')) })"
|
|
||||||
@click.outside="open = false"
|
|
||||||
@keydown.escape.window="open = false">
|
|
||||||
<div class="relative">
|
|
||||||
<svg class="pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"/></svg>
|
|
||||||
<input type="text"
|
|
||||||
x-model="query"
|
|
||||||
@focus="onFocus()"
|
|
||||||
@input.debounce.200ms="search()"
|
|
||||||
@keydown.arrow-down.prevent="moveDown()"
|
|
||||||
@keydown.arrow-up.prevent="moveUp()"
|
|
||||||
@keydown.enter.prevent="go()"
|
|
||||||
placeholder="Search events and programmes…"
|
|
||||||
class="w-full rounded-xl border border-slate-200 bg-slate-50 py-2 pl-9 pr-10 text-sm text-slate-700 placeholder-slate-400 transition focus:border-indigo-300 focus:bg-white focus:ring-2 focus:ring-indigo-100 focus:outline-none">
|
|
||||||
<kbd class="pointer-events-none absolute right-3 top-1/2 hidden -translate-y-1/2 rounded-md border border-slate-200 bg-white px-1.5 py-0.5 text-[10px] font-medium text-slate-400 sm:inline-block">/</kbd>
|
|
||||||
</div>
|
|
||||||
<div x-show="open && (results.length > 0 || (query.length >= 2 && !loading))"
|
|
||||||
x-cloak
|
|
||||||
x-transition.opacity.duration.150ms
|
|
||||||
class="absolute left-0 top-full z-30 mt-1.5 w-full overflow-hidden rounded-xl border border-slate-200 bg-white shadow-lg">
|
|
||||||
<template x-if="loading">
|
|
||||||
<div class="px-4 py-3 text-center text-xs text-slate-400">Searching…</div>
|
|
||||||
</template>
|
|
||||||
<template x-if="!loading && results.length === 0 && query.length >= 2">
|
|
||||||
<div class="px-4 py-3 text-center text-xs text-slate-500">No results for "<span x-text="query" class="font-medium"></span>"</div>
|
|
||||||
</template>
|
|
||||||
<template x-if="!loading && results.length > 0">
|
|
||||||
<ul class="max-h-72 overflow-y-auto py-1">
|
|
||||||
<template x-for="(item, idx) in results" :key="item.url">
|
|
||||||
<li>
|
|
||||||
<a :href="item.url"
|
|
||||||
:class="idx === active ? 'bg-indigo-50 text-indigo-700' : 'text-slate-700'"
|
|
||||||
@mouseenter="active = idx"
|
|
||||||
class="flex items-center gap-3 px-4 py-2.5 text-sm transition hover:bg-indigo-50">
|
|
||||||
<span class="min-w-0 flex-1">
|
|
||||||
<span class="block truncate font-medium leading-tight" x-text="item.title"></span>
|
|
||||||
<span class="block truncate text-xs text-slate-400" x-text="item.subtitle"></span>
|
|
||||||
</span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</template>
|
|
||||||
</ul>
|
|
||||||
</template>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex items-center gap-3">
|
<div class="flex items-center gap-3">
|
||||||
@@ -170,9 +124,9 @@
|
|||||||
|
|
||||||
<div x-show="profileOpen" x-cloak x-transition @click.outside="profileOpen = false"
|
<div x-show="profileOpen" x-cloak x-transition @click.outside="profileOpen = false"
|
||||||
class="absolute right-0 z-20 mt-2 w-48 rounded-xl border border-slate-200 bg-white p-1 shadow-lg">
|
class="absolute right-0 z-20 mt-2 w-48 rounded-xl border border-slate-200 bg-white p-1 shadow-lg">
|
||||||
<a href="{{ route('account.settings') }}" class="block rounded-lg px-3 py-2 text-sm text-slate-700 hover:bg-slate-100">QR Settings</a>
|
<a href="{{ route('account.settings') }}" class="block rounded-lg px-3 py-2 text-sm text-slate-700 hover:bg-slate-100">Settings</a>
|
||||||
<a href="{{ ladill_account_url('account-settings') }}" class="block rounded-lg px-3 py-2 text-sm text-slate-700 hover:bg-slate-100">Account Settings</a>
|
<a href="{{ ladill_account_url('account-settings') }}" class="block rounded-lg px-3 py-2 text-sm text-slate-700 hover:bg-slate-100">Account Settings</a>
|
||||||
<a href="{{ route('events.dashboard') }}" class="block rounded-lg px-3 py-2 text-sm text-slate-700 hover:bg-slate-100">Dashboard</a>
|
<a href="{{ route('mini.dashboard') }}" class="block rounded-lg px-3 py-2 text-sm text-slate-700 hover:bg-slate-100">Dashboard</a>
|
||||||
<form method="POST" action="{{ route('logout') }}">
|
<form method="POST" action="{{ route('logout') }}">
|
||||||
@csrf
|
@csrf
|
||||||
<button type="submit" class="w-full rounded-lg px-3 py-2 text-left text-sm text-rose-600 hover:bg-rose-50">Logout</button>
|
<button type="submit" class="w-full rounded-lg px-3 py-2 text-left text-sm text-rose-600 hover:bg-rose-50">Logout</button>
|
||||||
|
|||||||
@@ -258,7 +258,7 @@
|
|||||||
class="absolute right-0 z-20 mt-2 w-48 rounded-xl border border-slate-200 bg-white p-1 shadow-lg">
|
class="absolute right-0 z-20 mt-2 w-48 rounded-xl border border-slate-200 bg-white p-1 shadow-lg">
|
||||||
<a href="{{ route('profile.edit') }}" class="block rounded-lg px-3 py-2 text-sm text-slate-700 hover:bg-slate-100">Profile</a>
|
<a href="{{ route('profile.edit') }}" class="block rounded-lg px-3 py-2 text-sm text-slate-700 hover:bg-slate-100">Profile</a>
|
||||||
<a href="{{ route('account.settings') }}" class="block rounded-lg px-3 py-2 text-sm text-slate-700 hover:bg-slate-100">Account Settings</a>
|
<a href="{{ route('account.settings') }}" class="block rounded-lg px-3 py-2 text-sm text-slate-700 hover:bg-slate-100">Account Settings</a>
|
||||||
<a href="{{ route('events.dashboard') }}" class="block rounded-lg px-3 py-2 text-sm text-slate-700 hover:bg-slate-100">Dashboard</a>
|
<a href="{{ route('mini.dashboard') }}" class="block rounded-lg px-3 py-2 text-sm text-slate-700 hover:bg-slate-100">Dashboard</a>
|
||||||
<form method="POST" action="{{ route('logout') }}">
|
<form method="POST" action="{{ route('logout') }}">
|
||||||
@csrf
|
@csrf
|
||||||
<button type="submit" class="w-full rounded-lg px-3 py-2 text-left text-sm text-rose-600 hover:bg-rose-50">Logout</button>
|
<button type="submit" class="w-full rounded-lg px-3 py-2 text-left text-sm text-rose-600 hover:bg-rose-50">Logout</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user