Skip to content

Commit

Permalink
fix: Broken view on certain step progress
Browse files Browse the repository at this point in the history
  • Loading branch information
lewislarsen committed Jul 14, 2024
1 parent 0f48074 commit e5c07e6
Showing 1 changed file with 33 additions and 23 deletions.
56 changes: 33 additions & 23 deletions resources/views/partials/steps-to-get-started/view.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</div>
</div>
<div class="grid md:grid-cols-12 gap-6 md:space-x-3">
<div class="bg-white rounded-[0.70rem] px-5 py-5 text-gray-950 col-span-4">
<div class="bg-gray-100 rounded-[0.70rem] px-5 py-5 text-gray-950 col-span-4">
<h1 class="text-2xl font-bold">
{{ __('Step 1)') }}
</h1>
Expand All @@ -24,15 +24,25 @@
{{ __('We support Ubuntu and Debian distributions primarily.') }}
</div>
<div>
<a href="{{ route('remote-servers.create') }}" wire:navigate>
<x-primary-button class="mt-4" centered fat>
{{ __('Link Remote Server') }}
@svg('heroicon-o-arrow-right', 'h-5 w-5 ml-2 inline')
</x-primary-button>
</a>
@if (Auth::user()->remoteServers->isNotEmpty())
<div class="my-3 bg-green-50 rounded-none border-l-4 border-green-600 p-2.5">
@svg('heroicon-o-check', 'h-5 w-5 text-green-600 mr-2 inline')
<span
class="text-green-600 text-sm">{{ __('You have completed this step.') }}</span>
</div>
@endif

@if (Auth::user()->remoteServers->isEmpty())
<a href="{{ route('remote-servers.create') }}" wire:navigate>
<x-primary-button class="mt-4" centered fat>
{{ __('Link Remote Server') }}
@svg('heroicon-o-arrow-right', 'h-5 w-5 ml-2 inline')
</x-primary-button>
</a>
@endif
</div>
</div>
<div class="bg-white rounded-[0.70rem] px-5 py-5 text-gray-950 col-span-4">
<div class="bg-gray-100 rounded-[0.70rem] px-5 py-5 text-gray-950 col-span-4">
<h1 class="text-2xl font-bold">
{{ __('Step 2)') }}
</h1>
Expand All @@ -48,27 +58,33 @@
{{ __('Add your S3 bucket API details to store your backups safely.') }}
</div>
<div>
@if (Auth::user()->backupDestinations->isNotEmpty())
<div class="my-3 bg-green-50 rounded-none border-l-4 border-green-600 p-2.5">
@svg('heroicon-o-check', 'h-5 w-5 text-green-600 mr-2 inline')
<span
class="text-green-600 text-sm">{{ __('You have completed this step.') }}</span>
</div>
@endif

@if (Auth::user()->remoteServers->isEmpty())
<div class="my-3 bg-red-50 rounded-lg p-2.5">
@svg('heroicon-o-exclamation-triangle', 'h-5 w-5 text-red-500 mr-2 inline')
<span class="text-red-500 text-sm">{{ __('You need to link a Remote Server first.') }}</span>
<span
class="text-red-500 text-sm">{{ __('You need to link a Remote Server first.') }}</span>
</div>
@endif

@if (Auth::user()->remoteServers->isEmpty())
<x-primary-button
class="mt-4 cursor-not-allowed bg-opacity-50 hover:bg-opacity-50 focus:bg-opacity-50"
centered fat disabled>
{{ __('Add your Backup Destination') }}
@svg('heroicon-o-arrow-right', 'h-5 w-5 ml-2 inline')
</x-primary-button>
@else
<a href="{{ route('backup-destinations.create') }}" wire:navigate>
<x-primary-button class="mt-4" centered fat>
{{ __('Add another Backup Destination') }}
@svg('heroicon-o-arrow-right', 'h-5 w-5 ml-2 inline')
</x-primary-button>
@endif
</div>
</div>
<div class="bg-white rounded-[0.70rem] px-5 py-5 text-gray-950 col-span-4">
<div class="bg-gray-100 rounded-[0.70rem] px-5 py-5 text-gray-950 col-span-4">
<h1 class="text-2xl font-bold">
{{ __('Step 3)') }}
</h1>
Expand All @@ -88,17 +104,11 @@ class="mt-4 cursor-not-allowed bg-opacity-50 hover:bg-opacity-50 focus:bg-opacit
<span
class="text-red-500 text-sm">{{ __('You need to link a Backup Destination first.') }}</span>
</div>
<x-primary-button
class="mt-4 cursor-not-allowed bg-opacity-50 hover:bg-opacity-50 focus:bg-opacity-50"
centered fat disabled>
{{ __('Create your first Backup Task') }}
@svg('heroicon-o-arrow-right', 'h-5 w-5 ml-2 inline')
</x-primary-button>
@else
<a href="{{ route('backup-tasks.create') }}" wire:navigate>
<x-primary-button class="mt-6" centered fat>
{{ __('Create your first Backup Task') }}
@svg('heroicon-o-arrow-right', 'h-5 w-5 ml-2')
@svg('heroicon-o-arrow-right', 'h-5 w-5 ml-2 inline')
</x-primary-button>
</a>
@endif
Expand Down

0 comments on commit e5c07e6

Please sign in to comment.