Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions resources/views/livewire/dashboard/dashboard-converter.blade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,27 @@
<div>
<p>Drop your file here</p>
<p>PNG, JPG, WEBP and PDF supported in beta</p>
<x-card variant="elevated">
@if ($step === 'upload')
<div class="flex flex-col items-center justify-center gap-4 rounded-[var(--ca-radius-md)] border-2 border-dashed border-[var(--ca-border)] bg-[var(--ca-surface-muted)]/40 px-6 py-12 text-center">
<div class="flex h-14 w-14 items-center justify-center rounded-full bg-[var(--ca-surface-muted)] text-[var(--ca-muted)]">
<svg xmlns="http://www.w3.org/2000/svg" class="h-7 w-7" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" d="M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 7.5m0 0L7.5 12M12 7.5V18" />
</svg>
</div>

<div class="flex flex-col gap-1">
<p class="text-base font-semibold text-[var(--ca-text)]">Drop your file here</p>
<p class="text-sm text-[var(--ca-muted)]">PNG, JPG, WEBP and PDF supported in beta</p>
</div>

<label class="cursor-pointer">
<input type="file" wire:model="upload" class="sr-only">
<span class="inline-flex items-center justify-center gap-2 rounded-[var(--ca-radius-md)] px-4 py-2 text-sm font-medium text-white shadow-sm transition hover:brightness-110" style="background:var(--ca-primary);">
Choose file
</span>
</label>

<p class="text-xs text-[var(--ca-muted)]">Your files stay private. We delete them after conversion.</p>
</div>
@endif
</x-card>
</div>
6 changes: 4 additions & 2 deletions tests/Feature/Livewire/DashboardConverterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
use App\Livewire\Dashboard\DashboardConverter;
use Livewire\Livewire;

it('renders dashboard converter component', function () {
it('renders empty upload state', function () {
Livewire::test(DashboardConverter::class)
->assertSee('Drop your file here');
->assertSee('Drop your file here')
->assertSee('PNG, JPG, WEBP and PDF supported in beta')
->assertSee('Choose file');
});