diff --git a/app/Livewire/Onboarding.php b/app/Livewire/Onboarding.php index defd807..f6ab9de 100644 --- a/app/Livewire/Onboarding.php +++ b/app/Livewire/Onboarding.php @@ -44,7 +44,7 @@ class Onboarding extends Component public int $routePriority = 50; // State - public array $errors = []; + public array $formErrors = []; public bool $isLoading = false; protected LemmyAuthService $lemmyAuthService; @@ -96,20 +96,20 @@ public function mount(): void public function goToStep(int $step): void { $this->step = $step; - $this->errors = []; + $this->formErrors = []; } public function nextStep(): void { $this->step++; - $this->errors = []; + $this->formErrors = []; } public function previousStep(): void { if ($this->step > 1) { $this->step--; - $this->errors = []; + $this->formErrors = []; } } @@ -128,7 +128,7 @@ public function deleteAccount(): void public function createPlatformAccount(): void { - $this->errors = []; + $this->formErrors = []; $this->isLoading = true; $this->validate([ @@ -184,12 +184,12 @@ public function createPlatformAccount(): void $this->nextStep(); } catch (\App\Exceptions\PlatformAuthException $e) { if (str_contains($e->getMessage(), 'Rate limited by')) { - $this->errors['general'] = $e->getMessage(); + $this->formErrors['general'] = $e->getMessage(); } else { - $this->errors['general'] = 'Invalid username or password. Please check your credentials and try again.'; + $this->formErrors['general'] = 'Invalid username or password. Please check your credentials and try again.'; } } catch (\Exception $e) { - $this->errors['general'] = 'Unable to connect to the Lemmy instance. Please check the URL and try again.'; + $this->formErrors['general'] = 'Unable to connect to the Lemmy instance. Please check the URL and try again.'; } finally { $this->isLoading = false; } @@ -197,7 +197,7 @@ public function createPlatformAccount(): void public function createFeed(): void { - $this->errors = []; + $this->formErrors = []; $this->isLoading = true; $this->validate([ @@ -227,7 +227,7 @@ public function createFeed(): void $this->nextStep(); } catch (\Exception $e) { - $this->errors['general'] = 'Failed to create feed. Please try again.'; + $this->formErrors['general'] = 'Failed to create feed. Please try again.'; } finally { $this->isLoading = false; } @@ -235,7 +235,7 @@ public function createFeed(): void public function createChannel(): void { - $this->errors = []; + $this->formErrors = []; $this->isLoading = true; $this->validate([ @@ -254,7 +254,7 @@ public function createChannel(): void ->get(); if ($activeAccounts->isEmpty()) { - $this->errors['general'] = 'No active platform accounts found for this instance. Please create a platform account first.'; + $this->formErrors['general'] = 'No active platform accounts found for this instance. Please create a platform account first.'; $this->isLoading = false; return; } @@ -279,7 +279,7 @@ public function createChannel(): void $this->nextStep(); } catch (\Exception $e) { - $this->errors['general'] = 'Failed to create channel. Please try again.'; + $this->formErrors['general'] = 'Failed to create channel. Please try again.'; } finally { $this->isLoading = false; } @@ -287,7 +287,7 @@ public function createChannel(): void public function createRoute(): void { - $this->errors = []; + $this->formErrors = []; $this->isLoading = true; $this->validate([ @@ -309,7 +309,7 @@ public function createRoute(): void $this->nextStep(); } catch (\Exception $e) { - $this->errors['general'] = 'Failed to create route. Please try again.'; + $this->formErrors['general'] = 'Failed to create route. Please try again.'; } finally { $this->isLoading = false; } @@ -344,6 +344,6 @@ public function render() 'feeds' => $feeds, 'channels' => $channels, 'feedProviders' => $feedProviders, - ])->layout('layouts.guest'); + ])->layout('layouts.onboarding'); } } diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index 78b684f..fb71818 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -1,4 +1,9 @@ +
+

Welcome back

+

Sign in to your account

+
+ @@ -14,7 +19,14 @@
- +
+ + @if (Route::has('password.request')) + + {{ __('Forgot password?') }} + + @endif +
-
- @if (Route::has('password.request')) - - {{ __('Forgot your password?') }} - - @endif - - - {{ __('Log in') }} +
+ + {{ __('Sign in') }}
+ + @if (Route::has('register')) +
+ Don't have an account? + + {{ __('Sign up') }} + +
+ @endif diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php index a857242..9c56eca 100644 --- a/resources/views/auth/register.blade.php +++ b/resources/views/auth/register.blade.php @@ -1,4 +1,9 @@ +
+

Create an account

+

Get started with FFR

+
+
@csrf @@ -19,34 +24,33 @@
- -
- -
-
- - {{ __('Already registered?') }} - - - - {{ __('Register') }} +
+ + {{ __('Create account') }}
+ +
+ Already have an account? + + {{ __('Sign in') }} + +
diff --git a/resources/views/components/primary-button.blade.php b/resources/views/components/primary-button.blade.php index d71f0b6..6a376dd 100644 --- a/resources/views/components/primary-button.blade.php +++ b/resources/views/components/primary-button.blade.php @@ -1,3 +1,3 @@ - diff --git a/resources/views/components/text-input.blade.php b/resources/views/components/text-input.blade.php index da1b12d..e17e5a0 100644 --- a/resources/views/components/text-input.blade.php +++ b/resources/views/components/text-input.blade.php @@ -1,3 +1,3 @@ @props(['disabled' => false]) -merge(['class' => 'border-gray-300 focus:border-indigo-500 focus:ring-indigo-500 rounded-md shadow-sm']) }}> +merge(['class' => 'border-gray-300 focus:border-blue-500 focus:ring-blue-500 rounded-lg shadow-sm px-4 py-3']) }}> diff --git a/resources/views/layouts/guest.blade.php b/resources/views/layouts/guest.blade.php index 3628119..469c4c3 100644 --- a/resources/views/layouts/guest.blade.php +++ b/resources/views/layouts/guest.blade.php @@ -5,18 +5,41 @@ - {{ config('app.name', 'Laravel') }} + {{ config('app.name', 'FFR') }} - + @vite(['resources/css/app.css', 'resources/js/app.js']) @livewireStyles - {{ $slot }} +
+ + + + +
+ {{ $slot }} +
+ + +
+

Route your feeds to the Fediverse

+
+
@livewireScripts diff --git a/resources/views/layouts/onboarding.blade.php b/resources/views/layouts/onboarding.blade.php new file mode 100644 index 0000000..7679da7 --- /dev/null +++ b/resources/views/layouts/onboarding.blade.php @@ -0,0 +1,43 @@ + + + + + + + + {{ config('app.name', 'FFR') }} - Setup + + + + + + + @vite(['resources/css/app.css', 'resources/js/app.js']) + @livewireStyles + + +
+ + + + + {{ $slot }} + + +
+

Route your feeds to the Fediverse

+
+
+ @livewireScripts + + diff --git a/resources/views/livewire/onboarding.blade.php b/resources/views/livewire/onboarding.blade.php index bba2156..4bf82ba 100644 --- a/resources/views/livewire/onboarding.blade.php +++ b/resources/views/livewire/onboarding.blade.php @@ -1,5 +1,5 @@ -
-
+
+
{{-- Step 1: Welcome --}} @if ($step === 1) @@ -59,9 +59,9 @@ class="w-full bg-blue-600 text-white py-3 px-4 rounded-md hover:bg-blue-700 tran
4
- @if (!empty($errors['general'])) + @if (!empty($formErrors['general']))
-

{{ $errors['general'] }}

+

{{ $formErrors['general'] }}

@endif @@ -190,9 +190,9 @@ class="bg-blue-600 text-white py-2 px-6 rounded-md hover:bg-blue-700 transition
- @if (!empty($errors['general'])) + @if (!empty($formErrors['general']))
-

{{ $errors['general'] }}

+

{{ $formErrors['general'] }}

@endif @@ -294,9 +294,9 @@ class="bg-blue-600 text-white py-2 px-6 rounded-md hover:bg-blue-700 transition
- @if (!empty($errors['general'])) + @if (!empty($formErrors['general']))
-

{{ $errors['general'] }}

+

{{ $formErrors['general'] }}

@endif @@ -400,9 +400,9 @@ class="bg-blue-600 text-white py-2 px-6 rounded-md hover:bg-blue-700 transition
- @if (!empty($errors['general'])) + @if (!empty($formErrors['general']))
-

{{ $errors['general'] }}

+

{{ $formErrors['general'] }}

@endif