33 lines
1.1 KiB
PHP
33 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Livewire\Ui\Webmail;
|
|
|
|
use Livewire\Component;
|
|
|
|
class LogoutButton extends Component
|
|
{
|
|
public function logout(): void
|
|
{
|
|
session()->forget(['webmail_email', 'webmail_password']);
|
|
$this->redirect(route('ui.webmail.login'));
|
|
}
|
|
|
|
public function render()
|
|
{
|
|
return <<<'BLADE'
|
|
<button wire:click="logout"
|
|
style="display:flex;align-items:center;justify-content:center;padding:6px 8px;
|
|
border-radius:5px;font-size:11.5px;color:var(--mw-t4);cursor:pointer;
|
|
background:none;border:none;"
|
|
onmouseover="this.style.background='var(--mw-bg3)';this.style.color='var(--mw-rd)'"
|
|
onmouseout="this.style.background='none';this.style.color='var(--mw-t4)'"
|
|
title="Abmelden">
|
|
<svg width="12" height="12" viewBox="0 0 15 15" fill="none">
|
|
<path d="M10 7.5H2M8 5l2.5 2.5L8 10M6 2H3a1 1 0 0 0-1 1v9a1 1 0 0 0 1 1h3"
|
|
stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
</svg>
|
|
</button>
|
|
BLADE;
|
|
}
|
|
}
|