новый дизайн

This commit is contained in:
2026-07-25 18:36:45 +04:00
parent df7f98fe8b
commit c43a73e148
54 changed files with 4234 additions and 1110 deletions
+12 -9
View File
@@ -24,8 +24,7 @@ class LandingController extends Controller
Request $request,
AzerothCoreAccountService $accounts,
NewsService $news,
): Response
{
): Response {
$realmConfig = config('moonwell.realm');
$rates = $realmConfig['rates'] ?? [];
$user = Auth::user();
@@ -78,6 +77,11 @@ class LandingController extends Controller
'moon' => true,
],
'registerEndpoint' => route('game-account.store'),
'legalUrls' => [
'published' => (bool) config('moonwell.legal.published'),
'offer' => config('moonwell.legal.published') ? route('legal.offer') : null,
'privacy' => config('moonwell.legal.published') ? route('legal.privacy') : null,
],
'inviteRequired' => (bool) config('moonwell.registration.require_invite_code'),
'csrfToken' => csrf_token(),
'auth' => [
@@ -108,14 +112,13 @@ class LandingController extends Controller
RegisterGameAccountRequest $request,
AzerothCoreAccountRegistrar $registrar,
InviteCodeService $inviteCodes,
): RedirectResponse
{
): RedirectResponse {
try {
$register = fn (): array => $registrar->register(
$request->string('username')->toString(),
$request->string('email')->toString(),
$request->string('password')->toString(),
);
$request->string('username')->toString(),
$request->string('email')->toString(),
$request->string('password')->toString(),
);
$result = config('moonwell.registration.require_invite_code')
? $inviteCodes->redeemForRegistration(
@@ -152,7 +155,7 @@ class LandingController extends Controller
private function errorBag(): array
{
$errors = session()->get('errors');
if (!$errors) {
if (! $errors) {
return [];
}