mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
ln auth as default
This commit is contained in:
@@ -15,11 +15,16 @@ class LNUrlAuth extends Component
|
|||||||
protected ?string $lnurl = null;
|
protected ?string $lnurl = null;
|
||||||
protected ?string $qrCode = null;
|
protected ?string $qrCode = null;
|
||||||
|
|
||||||
public function switchToEmail()
|
public function switchToEmailLogin()
|
||||||
{
|
{
|
||||||
return to_route('login');
|
return to_route('login');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function switchToEmailSignup()
|
||||||
|
{
|
||||||
|
return to_route('register');
|
||||||
|
}
|
||||||
|
|
||||||
public function mount()
|
public function mount()
|
||||||
{
|
{
|
||||||
$this->k1 = bin2hex(str()->random(32));
|
$this->k1 = bin2hex(str()->random(32));
|
||||||
|
|||||||
@@ -9,17 +9,33 @@
|
|||||||
{!! $this->qrCode !!}
|
{!! $this->qrCode !!}
|
||||||
</div>
|
</div>
|
||||||
<div class="my-2 flex justify-center font-mono break-all">
|
<div class="my-2 flex justify-center font-mono break-all">
|
||||||
<span wire:key="lnurl">lightning:{{ $this->lnurl }}</span>
|
<input class="w-full" readonly wire:key="lnurl" onClick="this.select();"
|
||||||
|
value="lightning:{{ $this->lnurl }}"/>
|
||||||
|
</div>
|
||||||
|
<div class="flex justify-end w-full">
|
||||||
|
<div
|
||||||
|
x-data="{
|
||||||
|
textToCopy: 'lightning:{{ $this->lnurl }}',
|
||||||
|
}"
|
||||||
|
@click.prevent="window.navigator.clipboard.writeText(textToCopy);window.$wireui.notify({title:'URL kopiert!',icon:'success'});"
|
||||||
|
>
|
||||||
|
<x-button
|
||||||
|
xs
|
||||||
|
>
|
||||||
|
<i class="fa fa-thin fa-clipboard"></i>
|
||||||
|
Kopiere
|
||||||
|
</x-button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex items-center justify-end mt-4">
|
<div class="flex items-center justify-end mt-4">
|
||||||
|
|
||||||
<x-button icon="login" secondary class="ml-4" wire:click="switchToEmail">
|
<x-button icon="login" secondary class="ml-4" wire:click="switchToEmailLogin">
|
||||||
{{ __('Switch to E-Mail login') }}
|
{{ __('Switch to E-Mail login') }}
|
||||||
</x-button>
|
</x-button>
|
||||||
|
|
||||||
<x-button icon="at-symbol" primary class="ml-4" wire:click="switchToEmail">
|
<x-button icon="at-symbol" primary class="ml-4" wire:click="switchToEmailSignup">
|
||||||
{{ __('Switch to E-Mail signup') }}
|
{{ __('Switch to E-Mail signup') }}
|
||||||
</x-button>
|
</x-button>
|
||||||
|
|
||||||
|
|||||||
@@ -43,11 +43,11 @@
|
|||||||
<div></div>
|
<div></div>
|
||||||
@else
|
@else
|
||||||
<div class="inline-flex items-center ml-5 my-2 text-lg space-x-6 lg:justify-end">
|
<div class="inline-flex items-center ml-5 my-2 text-lg space-x-6 lg:justify-end">
|
||||||
<a href="{{ route('login') }}"
|
<a href="{{ route('auth.ln') }}"
|
||||||
class="text-xs sm:text-base font-medium leading-6 text-gray-400 hover:text-gray-300 whitespace-no-wrap transition duration-150 ease-in-out">
|
class="text-xs sm:text-base font-medium leading-6 text-gray-400 hover:text-gray-300 whitespace-no-wrap transition duration-150 ease-in-out">
|
||||||
Login
|
Login
|
||||||
</a>
|
</a>
|
||||||
<a href="{{ route('register') }}"
|
<a href="{{ route('auth.ln') }}"
|
||||||
class="text-xs sm:text-base inline-flex items-center justify-center px-4 py-2 font-medium leading-6 text-gray-200 hover:text-white whitespace-no-wrap bg-gray-800 border border-transparent rounded shadow-sm hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-800">
|
class="text-xs sm:text-base inline-flex items-center justify-center px-4 py-2 font-medium leading-6 text-gray-200 hover:text-white whitespace-no-wrap bg-gray-800 border border-transparent rounded shadow-sm hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-800">
|
||||||
Registrieren
|
Registrieren
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user