Added splash page

This commit is contained in:
2026-06-21 18:52:25 +10:00
parent 07e2796e09
commit a39589ee6f
13 changed files with 1030 additions and 29 deletions
@@ -32,12 +32,7 @@ class UserProfileController extends Controller
return redirect()->route($route, $args);
}
return redirect()->route('login');
}
public static function getUserFlightApiURL(User $user){
return config('app.logo_api_url').'/user/'.$user->name.'/flights';
//return '/data/user/'.$user->name.'/flights';
return redirect()->route('splash');
}
public function profileData(User $user, string $view, ?int $selectedFlightId = null) : array {
@@ -47,7 +42,6 @@ class UserProfileController extends Controller
'canEdit' => auth()->check() && (auth()->id() === $user->id || auth()->user()->hasRole('admin')),
'initialView' => $view,
'selectedFlightId' => $selectedFlightId,
'flight_api_url' => self::getUserFlightApiURL($user),
'followStatus' => auth()->check() ? auth()->user()->followStatus($user) : 'none',
'flightCount' => $user->departedFlights()->count(),
];
@@ -182,7 +176,6 @@ class UserProfileController extends Controller
'loggedInUser' => auth()->user(),
'userAchievement' => $canView ? $user->achievements()->where('achievement_id', $achievement->id)->first() : null,
'followStatus' => auth()->check() ? auth()->user()->followStatus($user) : 'none',
'flight_api_url' => UserProfileController::getUserFlightApiURL($user),
'regions' => $regions,
'alliance' => $alliance,
'airlines' => $airlines,