Skip to content

Commit 3558a39

Browse files
committed
wip
1 parent 8c0b9f5 commit 3558a39

File tree

4 files changed

+563
-22
lines changed

4 files changed

+563
-22
lines changed

packages/core/src/Console/Commands/MooxInstaller.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
use Moox\Core\Console\Traits\SelectFilamentPanel;
1414
use Moox\Core\Services\PackageService;
1515

16-
use function Laravel\Prompts\multiselect;
17-
use function Laravel\Prompts\select;
16+
use function Moox\Prompts\multiselect;
17+
use function Moox\Prompts\select;
1818

1919
class MooxInstaller extends Command
2020
{

packages/prompts/resources/views/filament/components/run-command.blade.php

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
Fehler
66
</x-slot>
77
<p style="color: #b91c1c;">{{ $error }}</p>
8+
@if($output)
9+
<pre
10+
style="background-color: #111827; color: #f87171; padding: 1rem; border-radius: 0.25rem; overflow: auto; font-size: 0.875rem; margin-top: 0.75rem;">{{ $output }}</pre>
11+
@elseif($currentStepOutput)
12+
<pre
13+
style="background-color: #111827; color: #f87171; padding: 1rem; border-radius: 0.25rem; overflow: auto; font-size: 0.875rem; margin-top: 0.75rem;">{{ $currentStepOutput }}</pre>
14+
@endif
815
</x-filament::section>
916
@elseif($isComplete)
1017
<x-filament::section>
@@ -18,11 +25,42 @@
1825
</x-filament::section>
1926
@elseif($currentPrompt)
2027
{{ $this->form }}
28+
29+
@if(!empty($validationErrors))
30+
<div
31+
style="margin-top: 1rem; padding: 0.75rem 1rem; background-color: #fef3c7; border-left: 4px solid #f59e0b; border-radius: 0.375rem;">
32+
<div style="display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem;">
33+
<svg style="width: 1.25rem; height: 1.25rem; color: #f59e0b; flex-shrink: 0;" fill="none"
34+
stroke="currentColor" viewBox="0 0 24 24">
35+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
36+
d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z">
37+
</path>
38+
</svg>
39+
<strong style="color: #92400e; font-size: 0.875rem; font-weight: 600;">Validierungsfehler:</strong>
40+
</div>
41+
<ul style="color: #92400e; margin: 0; padding-left: 1.25rem; list-style: disc; font-size: 0.875rem;">
42+
@foreach($validationErrors as $msg)
43+
<li>{{ $msg }}</li>
44+
@endforeach
45+
</ul>
46+
</div>
47+
@endif
48+
2149
<div style="margin-top: 1rem; display: flex; justify-content: flex-end;">
2250
<x-filament::button wire:click="submitPrompt" type="button" color="primary">
2351
Weiter
2452
</x-filament::button>
2553
</div>
54+
55+
@if($currentStepOutput)
56+
<x-filament::section style="margin-top: 1rem;">
57+
<x-slot name="heading">
58+
Command Output
59+
</x-slot>
60+
<pre
61+
style="background-color: #111827; color: #4ade80; padding: 1rem; border-radius: 0.25rem; overflow: auto; font-size: 0.875rem; max-height: 400px;">{{ $currentStepOutput }}</pre>
62+
</x-filament::section>
63+
@endif
2664
@else
2765
<x-filament::section>
2866
<x-slot name="heading">

0 commit comments

Comments
 (0)