mailwolt/resources/views/livewire/ui/system/profile-page.blade.php

119 lines
6.0 KiB
PHP

<x-slot:breadcrumb>Mein Profil</x-slot:breadcrumb>
<div style="max-width:720px;margin:0 auto;display:flex;flex-direction:column;gap:16px">
{{-- Profil --}}
<div class="mbx-section">
<div class="mbx-domain-head">
<div class="mbx-domain-info">
<span class="mbx-badge-mute">Profil</span>
</div>
</div>
<div style="padding:16px 18px;display:flex;flex-direction:column;gap:12px">
<div>
<label class="mw-modal-label">Name</label>
<input type="text" wire:model.defer="name" class="mw-modal-input">
@error('name') <div class="mw-modal-error">{{ $message }}</div> @enderror
</div>
<div>
<label class="mw-modal-label">E-Mail</label>
<input type="text" value="{{ $email }}" class="mw-modal-input" disabled style="opacity:.6">
</div>
<div>
<button wire:click="saveProfile" class="mw-btn-primary" style="font-size:12px;padding:5px 14px">
<svg width="11" height="11" viewBox="0 0 12 12" fill="none"><path d="M2 6l3 3 5-5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>
Speichern
</button>
</div>
</div>
</div>
{{-- Passwort --}}
<div class="mbx-section">
<div class="mbx-domain-head">
<div class="mbx-domain-info">
<span class="mbx-badge-mute">Passwort ändern</span>
</div>
</div>
<div style="padding:16px 18px;display:flex;flex-direction:column;gap:12px">
<div>
<label class="mw-modal-label">Aktuelles Passwort</label>
<input type="password" wire:model.defer="current_password" class="mw-modal-input" autocomplete="current-password">
@error('current_password') <div class="mw-modal-error">{{ $message }}</div> @enderror
</div>
<div>
<label class="mw-modal-label">Neues Passwort</label>
<input type="password" wire:model.defer="new_password" class="mw-modal-input" autocomplete="new-password">
@error('new_password') <div class="mw-modal-error">{{ $message }}</div> @enderror
</div>
<div>
<label class="mw-modal-label">Bestätigung</label>
<input type="password" wire:model.defer="new_password_confirmation" class="mw-modal-input" autocomplete="new-password">
@error('new_password_confirmation') <div class="mw-modal-error">{{ $message }}</div> @enderror
</div>
<div>
<button wire:click="changePassword" class="mw-btn-primary" style="font-size:12px;padding:5px 14px">
<svg width="11" height="11" viewBox="0 0 12 12" fill="none"><path d="M2 6l3 3 5-5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>
Passwort setzen
</button>
</div>
</div>
</div>
{{-- 2FA --}}
<div class="mbx-section">
<div class="mbx-domain-head">
<div class="mbx-domain-info">
<span class="mbx-badge-mute">Zwei-Faktor-Authentifizierung</span>
</div>
@if($totpEnabled)
<span class="mbx-badge-ok">Aktiv</span>
@else
<span class="mbx-badge-warn">Nicht eingerichtet</span>
@endif
</div>
<div style="padding:14px 18px;display:flex;flex-direction:column;gap:12px">
<div style="display:flex;gap:10px;align-items:flex-start;padding:10px 12px;background:var(--mw-bg4);border:1px solid var(--mw-b2);border-radius:7px">
<svg width="13" height="13" viewBox="0 0 13 13" fill="none" style="flex-shrink:0;margin-top:1px;color:var(--mw-t4)">
<circle cx="6.5" cy="6.5" r="5.5" stroke="currentColor" stroke-width="1.2"/>
<path d="M6.5 6v3.5" stroke="currentColor" stroke-width="1.3" stroke-linecap="round"/>
<circle cx="6.5" cy="4" r=".7" fill="currentColor"/>
</svg>
<div style="font-size:11.5px;color:var(--mw-t3);line-height:1.6">
Bei aktiviertem 2FA wird beim Login nach dem Passwort ein
<strong style="color:var(--mw-t2)">6-stelliger TOTP-Code</strong>
aus deiner Authenticator-App verlangt.
</div>
</div>
@if($totpEnabled)
<div style="font-size:12px;color:var(--mw-t3)">
Dein Konto ist mit TOTP geschützt (Google Authenticator, Authy oder kompatible App).
</div>
<div>
<button wire:click="disableTotp"
wire:confirm="2FA wirklich deaktivieren? Dein Konto wird dann nur mit Passwort geschützt."
class="mw-btn-del" style="font-size:12px;padding:5px 12px">
<svg width="11" height="11" viewBox="0 0 12 12" fill="none"><path d="M2 2l8 8M10 2l-8 8" stroke="currentColor" stroke-width="1.3" stroke-linecap="round"/></svg>
TOTP deaktivieren
</button>
</div>
@else
<div style="font-size:12px;color:var(--mw-t3)">
Schütze dein Konto mit einem Einmalcode-Generator (TOTP). Einzurichten in unter einer Minute.
</div>
<div>
<button wire:click="$dispatch('openModal',{component:'ui.system.modal.totp-setup-modal'})"
class="mw-btn-primary" style="font-size:12px;padding:5px 14px">
<svg width="11" height="11" viewBox="0 0 11 11" fill="none"><path d="M5.5 1v9M1 5.5h9" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>
TOTP einrichten
</button>
</div>
@endif
</div>
</div>
</div>