Compare commits
58 Commits
cc934b1b3c
...
d54b580c7c
Author | SHA1 | Date |
---|---|---|
philipp lang | d54b580c7c | |
philipp lang | 26f6925d42 | |
philipp lang | d9d87e59e9 | |
philipp lang | 5e16222554 | |
philipp lang | bf7a298afc | |
philipp lang | 7a1ab8f03b | |
philipp lang | afffecb4c0 | |
philipp lang | 1c7e010249 | |
philipp lang | 644a70a082 | |
philipp lang | e6d33ba2de | |
philipp lang | c67ae040de | |
philipp lang | 54b413ae68 | |
philipp lang | d6325fbc33 | |
philipp lang | 3ff185e059 | |
philipp lang | 0d412544bb | |
philipp lang | 201b99cacf | |
philipp lang | bf0e9cb962 | |
philipp lang | 3bc038c4c1 | |
philipp lang | 49f972bc1b | |
philipp lang | b26ac83031 | |
philipp lang | 21433624c5 | |
philipp lang | 98c2972575 | |
philipp lang | d590fbd325 | |
philipp lang | 9535a50c4a | |
philipp lang | d46dccf4e6 | |
philipp lang | 3009003545 | |
philipp lang | ff47b024f5 | |
philipp lang | 8077f36724 | |
philipp lang | 908f99f403 | |
philipp lang | ee5b923f25 | |
philipp lang | ce7f86b7c0 | |
philipp lang | 89803b80a1 | |
philipp lang | d45d8f561f | |
philipp lang | c94facf794 | |
philipp lang | cef1c28df1 | |
philipp lang | ff846d0929 | |
philipp lang | ba59783415 | |
philipp lang | c0031cd4f0 | |
philipp lang | 56dd5cf146 | |
philipp lang | d096a1026b | |
philipp lang | fd8bf40090 | |
philipp lang | 62e122eef1 | |
philipp lang | baa4b4a32c | |
philipp lang | be8d1f5ab7 | |
philipp lang | 3ec27b6707 | |
philipp lang | 4ccc4097d6 | |
philipp lang | bf973d4139 | |
philipp lang | ef0b0198fe | |
philipp lang | f21c636803 | |
philipp lang | 72cb7dd818 | |
philipp lang | a53637c14f | |
philipp lang | 3c324fa211 | |
philipp lang | 03b839d5ae | |
philipp lang | 580238d665 | |
philipp lang | 6d85a7c37c | |
philipp lang | f2c30b013b | |
philipp lang | acaccbb106 | |
philipp lang | 528b716705 |
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}}" id="{{$id}}"
|
||||
<select {{$attributes}} @if($disabled) disabled @endif name="{{$name}}"
|
||||
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,7 +47,6 @@ 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,6 +32,13 @@ 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
|
||||
|
@ -44,7 +51,6 @@ class Text extends Component
|
|||
"
|
||||
{{ $attributes }}
|
||||
/>
|
||||
<x-ui::errors :for="$name" />
|
||||
@if($hint)
|
||||
<x-form::hint>{{$hint}}</x-form::hint>
|
||||
@endif
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
<?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) => ["type.{$key}" => $attribute]) : [],
|
||||
...$this->type ? collect($this->type::fieldNames())->mapWithKeys(fn ($attribute, $key) => ["params.{$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="'type.'.$field['name']"
|
||||
:name="$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')]
|
||||
#[Validate('required|string|min:4')]
|
||||
public string $password = '';
|
||||
#[Validate('required|string')]
|
||||
public string $mglnr = '';
|
||||
|
|
|
@ -6,14 +6,34 @@ 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';
|
||||
|
||||
Alpine.plugin(
|
||||
Tooltip.defaultProps({
|
||||
theme: 'primary',
|
||||
animation: 'shift-toward',
|
||||
})
|
||||
);
|
||||
const defaultTippy = {
|
||||
theme: 'primary',
|
||||
animation: 'shift-toward',
|
||||
};
|
||||
|
||||
Alpine.plugin(Tooltip.defaultProps(defaultTippy));
|
||||
|
||||
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,6 +76,7 @@ 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