Umbenennung presseportale → pressekonto in Domains, Themes und Dokumentation. Design-Tokens, Portal-Shell, Customer-Dashboard, Auth- und Admin-PM-Views. Artisan-Befehl migrate:legacy-media mit Tests und Hub-Flux-Entwicklungsdocs. Co-authored-by: Cursor <cursoragent@cursor.com>
74 lines
2.7 KiB
PHP
74 lines
2.7 KiB
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Auth;
|
|
use Illuminate\Validation\ValidationException;
|
|
use Livewire\Attributes\Layout;
|
|
use Livewire\Volt\Component;
|
|
|
|
new #[Layout('components.layouts.auth.pressekonto', ['heading' => 'Passwort bestätigen', 'eyebrow' => 'Sicherheitsbereich', 'showFromBanner' => false])] class extends Component {
|
|
public string $password = '';
|
|
|
|
/**
|
|
* Confirm the current user's password.
|
|
*/
|
|
public function confirmPassword(): void
|
|
{
|
|
$this->validate([
|
|
'password' => ['required', 'string'],
|
|
]);
|
|
|
|
if (! Auth::guard('web')->validate([
|
|
'email' => Auth::user()->email,
|
|
'password' => $this->password,
|
|
])) {
|
|
throw ValidationException::withMessages([
|
|
'password' => __('auth.password'),
|
|
]);
|
|
}
|
|
|
|
session(['auth.password_confirmed_at' => time()]);
|
|
|
|
$this->redirectIntended(default: route('dashboard', absolute: false), navigate: true);
|
|
}
|
|
}; ?>
|
|
|
|
<div>
|
|
<p class="text-[13.5px] text-ink-2 leading-[1.65] !-mt-4 mb-6">
|
|
Dieser Bereich des Publisher-Hubs ist besonders geschützt. Bitte bestätigen Sie zur
|
|
Sicherheit erneut Ihr Passwort, bevor Sie fortfahren.
|
|
</p>
|
|
|
|
<form wire:submit="confirmPassword" class="space-y-[18px]" x-data="{ showPassword: false }" novalidate>
|
|
|
|
<div>
|
|
<label class="field-label" for="auth-password">Passwort</label>
|
|
<div class="field-pw-wrap">
|
|
<input
|
|
id="auth-password"
|
|
wire:model="password"
|
|
:type="showPassword ? 'text' : 'password'"
|
|
required
|
|
autofocus
|
|
autocomplete="current-password"
|
|
class="field-input pr-[72px]"
|
|
placeholder="••••••••••"
|
|
@error('password') aria-invalid="true" @enderror
|
|
/>
|
|
<button
|
|
type="button"
|
|
class="field-affix"
|
|
@click="showPassword = !showPassword"
|
|
x-text="showPassword ? 'Verbergen' : 'Anzeigen'"
|
|
>Anzeigen</button>
|
|
</div>
|
|
@error('password')
|
|
<p class="field-error">{{ $message }}</p>
|
|
@enderror
|
|
</div>
|
|
|
|
<button type="submit" class="auth-btn-primary !mt-[22px]" wire:loading.attr="disabled" wire:target="confirmPassword">
|
|
<span wire:loading.remove wire:target="confirmPassword">Bestätigen</span>
|
|
<span wire:loading wire:target="confirmPassword">Wird geprüft …</span>
|
|
</button>
|
|
</form>
|
|
</div>
|