command center

This commit is contained in:
Andras Bacsai
2023-05-04 10:00:08 +02:00
parent 135f9ab048
commit b8b0d2243f
7 changed files with 30 additions and 91 deletions

View File

@@ -1,32 +1,19 @@
@props([
'id' => null,
'type' => 'text',
'required' => false,
'readonly' => false,
'label' => null,
'type' => 'text',
'class' => '',
'instantSave' => false,
'disabled' => false,
'hidden' => false,
])
@if ($type === 'checkbox')
<label for={{ $id }}>
@if ($label)
{{ $label }}
@else
{{ $id }}
@endif
@if ($required)
*
@endif
<input type="checkbox" id={{ $id }}
@if ($instantSave) wire:click='instantSave' wire:model.defer={{ $id }} @else wire:model.defer={{ $id }} @endif>
</label>
@error($id)
<span class="text-red-500">{{ $message }}</span>
@enderror
@else
<span @class([
'flex justify-end' => $type === 'checkbox',
'flex flex-col' => $type !== 'checkbox',
])>
<label for={{ $id }}>
@if ($label)
{{ $label }}
@@ -38,17 +25,13 @@
@endif
</label>
@if ($type === 'textarea')
<textarea class={{ $class }} type={{ $type }} id={{ $id }}
wire:model.defer={{ $id }} @if ($required) required @endif
@if ($disabled) disabled @endif @if ($readonly) readOnly disabled @endif></textarea>
<textarea {{ $attributes }} type={{ $type }} id={{ $id }} wire:model.defer={{ $id }}></textarea>
@else
<input class={{ $class }} type={{ $type }} id={{ $id }}
wire:model.defer={{ $id }} @if ($required) required @endif
@if ($disabled) disabled @endif
@if ($readonly) readOnly disabled @endif />
<input {{ $attributes }} type={{ $type }} id={{ $id }}
@if ($instantSave) wire:click='instantSave' wire:model.defer={{ $id }} @else wire:model.defer={{ $id }} @endif />
@endif
@error($id)
<div class="text-red-500">{{ $message }}</div>
@enderror
@endif
</span>

View File

@@ -2,9 +2,7 @@
<div>v{{ config('coolify.version') }}</div>
@auth
<a href="/">Home</a>
@env('local')
<a href="/demo">Demo</a>
@endenv
<a href="/command-center">Command Center</a>
<a href="/profile">Profile</a>
@if (auth()->user()->isRoot())
<a href="/settings">Settings</a>