🛠️ Refactor Blade views for Livewire component consistency, streamline login view, and improve key usage across components

- Replaced `state` and `computed` with `Livewire\Component` implementations in `language/selector.blade.php` for enhanced maintainability.
- Adjusted `login.blade.php` syntax for dynamic href generation and removed commented-out sign-up link.
- Added unique `wire:key` attributes to iterable elements for enhanced performance and reactivity.
- Simplified controller routing and corrected indentation in `web.php`, improving clarity.
This commit is contained in:
HolgerHatGarKeineNode
2026-01-17 17:07:15 +01:00
parent eebe453f5a
commit 4c0d387692
5 changed files with 80 additions and 81 deletions

View File

@@ -18,11 +18,8 @@ use Livewire\Attributes\Validate;
use Livewire\Component;
use SimpleSoftwareIO\QrCode\Facades\QrCode;
new
#[Layout('components.layouts.auth')]
#[SeoDataAttribute(key: 'login')]
class extends Component
{
new #[Layout('components.layouts.auth')]
class extends Component {
use SeoTrait;
#[Validate('required|string|email')]
@@ -208,7 +205,8 @@ class extends Component
$this->authError = null;
$this->mount();
}
}; ?>
};
?>
<div class="flex min-h-screen" x-data="nostrLogin"
x-init="initErrorPolling"
@@ -258,7 +256,7 @@ class extends Component
<div>
<flux:button
primary
:href="'lightning:'.$this->lnurl"
href="lightning:{{ $this->lnurl }}"
>
{{ __('Click to connect') }}
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 512 512"
@@ -273,12 +271,6 @@ class extends Component
</div>
</div>
<!-- Sign up Link -->
{{--@if (Route::has('register'))
<flux:subheading class="text-center">
First time around here? <flux:link href="{{ route('register') }}" wire:navigate>Sign up for free</flux:link>
</flux:subheading>
@endif--}}
<!-- Language Selection Accordion -->
<livewire:language.selector/>
</div>