diff --git a/app/Livewire/Profile/HelpPage.php b/app/Livewire/Profile/HelpPage.php new file mode 100644 index 00000000..133f7225 --- /dev/null +++ b/app/Livewire/Profile/HelpPage.php @@ -0,0 +1,31 @@ +layout('components.layouts.account-app'); + } +} diff --git a/resources/views/account/partials/sidebar.blade.php b/resources/views/account/partials/sidebar.blade.php index bc55c377..affeaf4f 100644 --- a/resources/views/account/partials/sidebar.blade.php +++ b/resources/views/account/partials/sidebar.blade.php @@ -82,5 +82,13 @@ +
  • + + + @svg('heroicon-o-lifebuoy', 'h-6 w-6 lg:h-5 lg:w-5 lg:mr-2') + {{ __('Need Help?') }} + + +
  • diff --git a/resources/views/livewire/profile/help-page.blade.php b/resources/views/livewire/profile/help-page.blade.php new file mode 100644 index 00000000..484221fc --- /dev/null +++ b/resources/views/livewire/profile/help-page.blade.php @@ -0,0 +1,73 @@ +
    + @section('title', __('Need Help?')) + + + {{ __('Need Help?') }} + + + + + heroicon-o-lifebuoy + + + + {{ __('Need Help?') }} + + + + {{ __('If you are a bit stuck and need some support, this should help you receive it!') }} + + +
    +

    + {{ __('Vanguard offers various resources to help you get the most out of our backup solution. Here are some quick links to get you started:') }} +

    + +
    + @php + $resources = [ + ['title' => 'Documentation', 'icon' => 'heroicon-o-book-open', 'url' => 'https://docs.vanguardbackup.com', 'description' => 'Comprehensive guides and API references'], + ['title' => 'GitHub Discussions', 'icon' => 'heroicon-o-chat-bubble-left-right', 'url' => 'https://github.com/vanguardbackup/vanguard/discussions', 'description' => 'Community-driven Q&A and discussions'], + ['title' => 'Vanguard Website', 'icon' => 'heroicon-o-globe-alt', 'url' => 'https://vanguardbackup.com', 'description' => 'Product information and latest updates'], + ]; + @endphp + + @foreach ($resources as $resource) + +
    +
    + +

    {{ __($resource['title']) }}

    +
    +

    {{ __($resource['description']) }}

    +
    + {{ __('Learn more') }} + +
    +
    +
    + @endforeach +
    + +
    +

    {{ __('Need Further Assistance?') }}

    +

    + {{ __('If you couldn\'t find what you\'re looking for in the resources above, we can help:') }} +

    + +
    +
    +
    +
    diff --git a/routes/breadcrumbs.php b/routes/breadcrumbs.php index 89b819ab..3713a416 100644 --- a/routes/breadcrumbs.php +++ b/routes/breadcrumbs.php @@ -118,3 +118,7 @@ Breadcrumbs::for('profile.connections', function (BreadcrumbTrail $trail) { $trail->push(__('Manage Connections'), route('profile.connections')); }); + +Breadcrumbs::for('profile.help', function (BreadcrumbTrail $trail) { + $trail->push(__('Need Help?'), route('profile.help')); +}); diff --git a/routes/web.php b/routes/web.php index 7e8c21b4..3c88bcb8 100644 --- a/routes/web.php +++ b/routes/web.php @@ -14,6 +14,7 @@ use App\Livewire\Profile\APIPage; use App\Livewire\Profile\ConnectionsPage; use App\Livewire\Profile\ExperimentsPage; +use App\Livewire\Profile\HelpPage; use App\Livewire\Profile\MFAPage; use App\Livewire\Profile\QuietModePage; use App\Livewire\Profile\SessionsPage; @@ -75,6 +76,7 @@ Route::get('profile/experiments', ExperimentsPage::class)->name('profile.experiments'); Route::get('profile/quiet-mode', QuietModePage::class)->name('profile.quiet-mode'); Route::get('profile/connections', ConnectionsPage::class)->name('profile.connections'); + Route::get('profile/help', HelpPage::class)->name('profile.help'); }); require __DIR__ . '/auth.php'; diff --git a/tests/Feature/Profile/HelpPageTest.php b/tests/Feature/Profile/HelpPageTest.php new file mode 100644 index 00000000..f1401a07 --- /dev/null +++ b/tests/Feature/Profile/HelpPageTest.php @@ -0,0 +1,24 @@ +user = User::factory()->create(['password' => Hash::make('password')]); + $this->actingAs($this->user); +}); + +test('the page can be visited by authenticated users', function (): void { + $this->get(route('profile.help')) + ->assertOk(); +}); + +test('the page cannot be visited by guests', function (): void { + Auth::logout(); + $this->get(route('profile.help')) + ->assertRedirect('login'); + $this->assertGuest(); +});