diff --git a/app/View/Components/Forms/Input.php b/app/View/Components/Forms/Input.php new file mode 100644 index 000000000..06c077474 --- /dev/null +++ b/app/View/Components/Forms/Input.php @@ -0,0 +1,37 @@ +id)) $this->id = new Cuid2(7); + if (is_null($this->name)) $this->name = $this->id; + + $this->label = Str::title($this->label); + return view('components.forms.input'); + } +} diff --git a/resources/css/app.css b/resources/css/app.css index 3250a89e2..dd6382f00 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -5,41 +5,39 @@ .scrollbar { @apply scrollbar-thumb-coollabs-100 scrollbar-track-coolgray-200 scrollbar-w-1; } - html { - @apply min-h-screen h-full bg-coolgray-100; + @apply text-neutral-400; } - body { - @apply scrollbar min-h-screen bg-coolgray-100 text-neutral-400 antialiased; + @apply scrollbar antialiased; } -main { +.main { @apply pl-24 pr-10 mx-auto max-w-screen-xl pt-4; } - +input { + @apply input input-sm h-7 outline-none placeholder:text-neutral-700 text-white rounded bg-coolgray-200 w-full; +} input[type="checkbox"] { @apply toggle toggle-warning toggle-xs rounded; } -input { - @apply input input-sm h-7 outline-none placeholder:text-neutral-700 text-white rounded; -} + input[type="text"], [type="number"], [type="email"], [type="password"] { - @apply read-only:bg-coolgray-200/50 read-only:text-opacity-25; + @apply read-only:bg-coolgray-200/50 read-only:text-opacity-25 border-none; +} +textarea { + @apply textarea placeholder:text-neutral-700 text-white rounded scrollbar bg-coolgray-200; +} +select { + @apply h-7 select select-xs text-sm disabled:bg-coolgray-200 border-none disabled:opacity-50 font-normal placeholder:text-neutral-700 text-white rounded bg-coolgray-200; } .label-text, label { @apply text-neutral-400 text-sm; } -textarea { - @apply textarea placeholder:text-neutral-700 text-white rounded scrollbar; -} -select { - @apply h-7 select select-xs text-sm disabled:bg-coolgray-200 border-none disabled:opacity-50 font-normal placeholder:text-neutral-700 text-white rounded; -} .loading { @apply w-4 text-warning; } diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index 30937c16e..fdfce764d 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -1,5 +1,5 @@ -
+
Coolify
@@ -7,14 +7,19 @@

{{ __('auth.login') }}

- + @if ($is_registration_enabled) + + {{ __('auth.register_now') }} + + @endif
@csrf @env('local') - + @@ -27,12 +32,7 @@ @endenv {{ __('auth.login') }} - @if ($is_registration_enabled) - - {{ __('auth.register_now') }} - - @else + @if (!$is_registration_enabled)
{{ __('auth.registration_disabled') }}
@endif @if ($errors->any()) diff --git a/resources/views/components/forms/input.blade.php b/resources/views/components/forms/input.blade.php index 50daa43d5..c3c85d828 100644 --- a/resources/views/components/forms/input.blade.php +++ b/resources/views/components/forms/input.blade.php @@ -1,15 +1,4 @@ -@props([ - 'id' => $attributes->has('id'), - 'type' => $attributes->get('type') ?? 'text', - 'label' => $attributes->has('label'), - 'readonly' => null, - 'required' => null, - 'disabled' => null, - 'helper' => $attributes->has('helper'), - 'noDirty' => $attributes->has('noDirty'), - 'cannotPeak' => $attributes->has('cannotPeak'), -]) -
merge(['class' => 'w-full form-control']) }}> +
@if ($label) @endif - @if ($type === 'password') -
- $cannotPeak, - ]) @if ($id) id={{ $id }} name={{ $id }} - wire:model.defer={{ $id }} @endisset - @if ($disabled !== null) disabled @endif - @if ($required !== null) required @endif @if ($readonly !== null) readonly @endif - @if (!$noDirty && $id) wire:dirty.class="input-warning" - @endif {{ $attributes }} /> - @if (!$cannotPeak) - @if (!$disabled) + +
+ @if ($type === 'password') +
+ isNotEmpty()) type={{ $type }} + id={{ $id }} name={{ $name }} value={{ $value }} + placeholder={{ $placeholder }}> + @if ($cannotPeakPassword) - - - - - @else - + @class([ + 'border-l-0 border-none rounded-r no-animation h-7 btn join-item btn-xs', + 'bg-coolgray-200/50 hover:bg-coolgray-200/50 text-opacity-25' => + $disabled || $readonly, + 'bg-coolgray-200 hover:bg-coolgray-200' => !$disabled || !$readonly, + ])> @endif - @endif +
+ @else + isNotEmpty()) + @isset($value) value={{ $value }} @endisset + @isset($placeholder) placeholder={{ $placeholder }} @endisset> + @endif + @if (!$label && $helper) + + @endif
-@else - -@endif - -@error($id) - -@enderror
diff --git a/resources/views/components/helper.blade.php b/resources/views/components/helper.blade.php index a074aca2c..35d22c2f3 100644 --- a/resources/views/components/helper.blade.php +++ b/resources/views/components/helper.blade.php @@ -1,6 +1,3 @@ -@props([ - 'helper' => $attributes->has('helper'), -])
@@ -8,7 +5,7 @@ d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z">
-