Compare commits
63 Commits
d54b580c7c
...
cc934b1b3c
Author | SHA1 | Date |
---|---|---|
philipp lang | cc934b1b3c | |
philipp lang | 1c92e1a2e2 | |
philipp lang | 6827358307 | |
philipp lang | b01bc5d1f1 | |
philipp lang | 04bfb85293 | |
philipp lang | de6cb31a79 | |
philipp lang | 39edad55ca | |
philipp lang | 4a3a80c101 | |
philipp lang | 0b54bbaf30 | |
philipp lang | 7ed31f111f | |
philipp lang | 1be3e0393a | |
philipp lang | 13cc02afd0 | |
philipp lang | 7b6daa47eb | |
philipp lang | 4ecbff4cf1 | |
philipp lang | 0da1e1ca42 | |
philipp lang | dc15bda5c7 | |
philipp lang | 836a38390f | |
philipp lang | 5ef5e95be8 | |
philipp lang | 16db435018 | |
philipp lang | dd9ad974ce | |
philipp lang | 3159323f5a | |
philipp lang | 6ea9db8eef | |
philipp lang | c5bb2e3428 | |
philipp lang | 19a13df20d | |
philipp lang | 36976cda90 | |
philipp lang | cac0209a71 | |
philipp lang | 6f8240af80 | |
philipp lang | 8fbd4cd2d1 | |
philipp lang | 96f8f7e152 | |
philipp lang | 816950797f | |
philipp lang | da17f4c6d2 | |
philipp lang | 7be0ab1c82 | |
philipp lang | b8eabaa501 | |
philipp lang | 634c2f69c7 | |
philipp lang | b528d59800 | |
philipp lang | 67c62c9fa7 | |
philipp lang | 2ff3942b8d | |
philipp lang | 2c501e23d0 | |
philipp lang | 114d611169 | |
philipp lang | ffa2bf1ab9 | |
philipp lang | 03ba1777fc | |
philipp lang | f0f1d236ef | |
philipp lang | d42d70d5fa | |
philipp lang | 33d8c6aae8 | |
philipp lang | 5f0bbf7dc1 | |
philipp lang | 9ce81a9f0f | |
philipp lang | 4372b2196e | |
philipp lang | d58fde42c2 | |
philipp lang | 74d755ad47 | |
philipp lang | 05fe99a2bb | |
philipp lang | e323daeacb | |
philipp lang | 4ea848af7d | |
philipp lang | 3ae0b85b05 | |
philipp lang | c4b300403f | |
philipp lang | bff309ccfa | |
philipp lang | ea140b428e | |
philipp lang | a1a50aaddb | |
philipp lang | dcb25c8814 | |
philipp lang | 8feac575ad | |
philipp lang | f8ea3824ae | |
philipp lang | 040af778ef | |
philipp lang | ea53dcea4f | |
philipp lang | e807aff3e6 |
File diff suppressed because one or more lines are too long
|
@ -33,7 +33,7 @@ class Select extends Component
|
|||
@endif
|
||||
|
||||
<div class="relative flex-none flex">
|
||||
<select {{$attributes}} @if($disabled) disabled @endif name="{{$name}}"
|
||||
<select {{$attributes}} @if($disabled) disabled @endif name="{{$name}}" id="{{$id}}"
|
||||
class="
|
||||
w-full h-[var(--height)] border-gray-600 border-solid text-gray-300 bg-gray-700 leading-none rounded-lg
|
||||
group-[.size-default]:border-2 group-[.size-sm]:border
|
||||
|
@ -47,6 +47,7 @@ class Select extends Component
|
|||
<option value="{{$option['id']}}">{{ $option['name'] }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<x-ui::errors :for="$name" />
|
||||
@if($hint)
|
||||
<x-form::hint class="right-6">{{$hint}}</x-form::hint>
|
||||
@endif
|
||||
|
|
|
@ -32,13 +32,6 @@ class Text extends Component
|
|||
@endif
|
||||
<div class="relative flex-none flex">
|
||||
<input
|
||||
@error($name) x-init="tippy($el, {
|
||||
content: () => '@error($name){{$message}}@enderror',
|
||||
showOnCreate: true,
|
||||
theme: 'danger',
|
||||
placement: 'top-end',
|
||||
delay: [0, 3000],
|
||||
})" @enderror
|
||||
id="{{$id}}"
|
||||
type="{{$type}}"
|
||||
@if ($type === 'password') autocomplete="off" @endif
|
||||
|
@ -51,6 +44,7 @@ class Text extends Component
|
|||
"
|
||||
{{ $attributes }}
|
||||
/>
|
||||
<x-ui::errors :for="$name" />
|
||||
@if($hint)
|
||||
<x-form::hint>{{$hint}}</x-form::hint>
|
||||
@endif
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
namespace App\View\Ui;
|
||||
|
||||
use Illuminate\View\Component;
|
||||
|
||||
class Errors extends Component
|
||||
{
|
||||
|
||||
public function __construct(
|
||||
public string $for,
|
||||
) {
|
||||
}
|
||||
|
||||
public function id(): string
|
||||
{
|
||||
return 'errors-' . str_replace('.', '--', $this->for);
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return <<<'HTML'
|
||||
@error($for)
|
||||
<div x-data="{error: ''}" x-init="window.setTimeout(() => document.querySelector('#{{$id()}}') ? document.querySelector('#{{$id()}}').remove() : null, 2000)" class="absolute bottom-[calc(100%+0.5rem)] right-0" id="{{$id}}">
|
||||
<div class="tippy-box" tabindex="-1" data-theme="danger" data-placement="top">
|
||||
<div class="tippy-content">{{$message}}</div>
|
||||
<div class="tippy-arrow absolute right-0 mr-2"></div>
|
||||
</div>
|
||||
</div>
|
||||
@enderror
|
||||
HTML;
|
||||
}
|
||||
}
|
|
@ -36,7 +36,7 @@ class Form extends Component
|
|||
'type' => 'Typ',
|
||||
'name' => 'Beschreibung',
|
||||
'domain' => 'Domain',
|
||||
...$this->type ? collect($this->type::fieldNames())->mapWithKeys(fn ($attribute, $key) => ["params.{$key}" => $attribute]) : [],
|
||||
...$this->type ? collect($this->type::fieldNames())->mapWithKeys(fn ($attribute, $key) => ["type.{$key}" => $attribute]) : [],
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -104,11 +104,11 @@ class Form extends Component
|
|||
<x-form::select name="typeClass" wire:model.live="typeClass" label="Typ" :options="$types" required />
|
||||
@foreach($this->fields() as $index => $field)
|
||||
<x-form::text
|
||||
wire:key="index"
|
||||
wire:key="$index"
|
||||
wire:model="type.{{$field['name']}}"
|
||||
:label="$field['label']"
|
||||
:type="$field['type']"
|
||||
:name="$field['name']"
|
||||
:name="'type.'.$field['name']"
|
||||
:required="str_contains('required', $field['validator'])"
|
||||
></x-form::text>
|
||||
@endforeach
|
||||
|
|
|
@ -14,7 +14,7 @@ class SettingView extends Component
|
|||
|
||||
public $settingClass = NamiSettings::class;
|
||||
|
||||
#[Validate('required|string|min:4')]
|
||||
#[Validate('required|string')]
|
||||
public string $password = '';
|
||||
#[Validate('required|string')]
|
||||
public string $mglnr = '';
|
||||
|
|
|
@ -6,34 +6,14 @@ import 'tippy.js/dist/tippy.css';
|
|||
import 'tippy.js/animations/shift-toward.css';
|
||||
import '../css/tooltip.css';
|
||||
import {error, success} from './toastify.js';
|
||||
import tippy from 'tippy.js';
|
||||
|
||||
const defaultTippy = {
|
||||
theme: 'primary',
|
||||
animation: 'shift-toward',
|
||||
};
|
||||
|
||||
Alpine.plugin(Tooltip.defaultProps(defaultTippy));
|
||||
Alpine.plugin(
|
||||
Tooltip.defaultProps({
|
||||
theme: 'primary',
|
||||
animation: 'shift-toward',
|
||||
})
|
||||
);
|
||||
|
||||
window.addEventListener('success', (event) => success(event.detail[0]));
|
||||
|
||||
document.addEventListener('alpine:init', () => {
|
||||
Alpine.directive('error', function (el, {value, modifiers, expression}, {Alpine, effect, cleanup, evaluateLater}) {
|
||||
let getThingToLog = evaluateLater(expression);
|
||||
|
||||
// el._x_custom_tippy = new tippy(el, {
|
||||
// ...defaultTippy,
|
||||
// content: '',
|
||||
// });
|
||||
|
||||
effect(() => {
|
||||
getThingToLog((thingToLog) => {
|
||||
console.log(thingToLog);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
window.tippy = tippy;
|
||||
|
||||
Livewire.start();
|
||||
|
|
|
@ -76,7 +76,6 @@ use App\Membership\Actions\MembershipStoreAction;
|
|||
use App\Membership\Actions\MembershipUpdateAction;
|
||||
use App\Payment\SubscriptionController;
|
||||
|
||||
Route::get('/lala', fn () => auth()->login(\App\User::first()));
|
||||
Route::group(['namespace' => 'App\\Http\\Controllers'], function (): void {
|
||||
Auth::routes(['register' => false]);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue