Add all files

This commit is contained in:
root
2025-11-30 11:57:22 +01:00
parent 2ee51cac4f
commit 044271db3d
1476 changed files with 142544 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
<form
class="flex flex-col gap-2 max-w-md mx-auto"
wire:submit="verify">
<div class="flex flex-col items-center mt-4 mb-10">
<x-logo />
<h1 class="text-2xl text-center mt-2">{{ __('auth.verify_2fa') }} </h1>
</div>
<x-form.input name="code" type="text" :label="__('account.input.two_factor_code')" :placeholder="__('account.input.two_factor_code_placeholder')" wire:model="code" required />
<x-button.primary class="w-full" type="submit">{{ __('auth.verify') }}</x-button.primary>
</form>

View File

@@ -0,0 +1,91 @@
@php
// Verificar si el modo "force_authentik_only" está activado
$extension = \App\Models\Extension::where('extension', 'Authentik')->first();
$forceAuthentikOnly = false;
$authentikEnabled = false;
if ($extension && $extension->enabled) {
$settings = $extension->settings->pluck('value', 'key')->toArray();
$forceAuthentikOnly = !empty($settings['force_authentik_only']);
$authentikEnabled = !empty($settings['client_id']) && !empty($settings['client_secret']) && !empty($settings['base_url']);
}
@endphp
@if($forceAuthentikOnly && $authentikEnabled)
{{-- Mode Authentik uniquement --}}
<div class="mx-auto flex flex-col gap-2 mt-4 shadow-sm px-6 sm:px-14 pb-10 bg-primary-800 rounded-md xl:max-w-[40%] w-full">
<div class="flex flex-col items-center mt-4 mb-10">
<x-logo />
<h1 class="text-2xl text-center mt-2">{{ __('auth.sign_in_title') }}</h1>
<p class="text-sm text-center mt-2 text-gray-300">
{{ __('authentik::messages.authentik_force_only_description') }}
</p>
</div>
<a href="{{ route('oauth.authentik.redirect') }}"
class="w-full flex items-center justify-center px-4 py-3 bg-blue-600 border border-transparent rounded-md font-semibold text-sm text-white uppercase tracking-widest hover:bg-blue-700 focus:bg-blue-700 active:bg-blue-900 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 transition ease-in-out duration-150">
<svg class="w-5 h-5 mr-2" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M3 3a1 1 0 000 2v8a2 2 0 002 2h2.586l-1.293 1.293a1 1 0 101.414 1.414L10 15.414l2.293 2.293a1 1 0 001.414-1.414L12.414 15H15a2 2 0 002-2V5a1 1 0 100-2H3zm11.707 4.707a1 1 0 00-1.414-1.414L10 9.586 8.707 8.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"></path>
</svg>
{{ __('authentik::messages.authentik_login_button') }}
</a>
</div>
@else
{{-- Mode normal --}}
<form
class="mx-auto flex flex-col gap-2 mt-4 shadow-sm px-6 sm:px-14 pb-10 bg-primary-800 rounded-md xl:max-w-[40%] w-full"
wire:submit="submit" id="login">
<div class="flex flex-col items-center mt-4 mb-10">
<x-logo />
<h1 class="text-2xl text-center mt-2">{{ __('auth.sign_in_title') }} </h1>
</div>
<x-form.input name="email" type="email" :label="__('general.input.email')"
:placeholder="__('general.input.email_placeholder')" wire:model="email" hideRequiredIndicator required />
<x-form.input name="password" type="password" :label="__('general.input.password')"
:placeholder="__('general.input.password_placeholder')" required hideRequiredIndicator wire:model="password" />
<div class="flex flex-row">
<x-form.checkbox name="remember" label="Remember me" wire:model="remember" />
<a class="text-sm text-secondary-500 text-secondary hover:underline ml-auto"
href="{{ route('password.request') }}">
{{ __('auth.forgot_password') }}
</a>
</div>
<x-captcha :form="'login'" />
<x-button.primary class="w-full" type="submit">{{ __('auth.sign_in') }}</x-button.primary>
@if (config('settings.oauth_github') || config('settings.oauth_google') || config('settings.oauth_discord'))
<div class="flex flex-col items-center mt-4">
<div class="my-5 flex items-center w-full">
<span aria-hidden="true" class="h-0.5 grow rounded bg-primary-700"></span>
<span class="rounded-full px-3 py-1 text-xs font-medium bg-primary-700 text-gray-200">
{{ __('auth.or_sign_in_with') }}
</span>
<span aria-hidden="true" class="h-0.5 grow rounded bg-primary-700"></span>
</div>
<div class="flex flex-row flex-wrap justify-center mt-2 gap-4">
@foreach (['github', 'google', 'discord'] as $provider)
@if (config('settings.oauth_' . $provider))
<a href="{{ route('oauth.redirect', $provider) }}"
class="flex items-center justify-center px-4 h-10 border border-neutral rounded-md text-primary-100">
<img src="/assets/images/{{ $provider }}-dark.svg" alt="{{ $provider }}"
class="size-5 mr-2 text-secondary">
{{ __(ucfirst($provider)) }}
</a>
@endif
@endforeach
</div>
</div>
@endif
@if(!config('settings.registration_disabled', false))
<div class="text-base text-center rounded-md py-2 mt-6 text-sm">
{{ __('auth.dont_have_account') }}
<a class="text-sm text-secondary-500 text-secondary hover:underline" href="{{ route('register') }}"
wire:navigate>
{{ __('auth.sign_up') }}
</a>
</div>
@endif
</form>
@endif

View File

@@ -0,0 +1,56 @@
<form
class="mx-auto flex flex-col gap-2 mt-4 shadow-sm px-6 sm:px-14 pb-10 bg-primary-800 rounded-md xl:max-w-[40%] w-full"
wire:submit="submit" id="login">
<div class="flex flex-col items-center mt-4 mb-10">
<x-logo />
<h1 class="text-2xl text-center mt-2">{{ __('auth.sign_in_title') }} </h1>
</div>
<x-form.input name="email" type="email" :label="__('general.input.email')"
:placeholder="__('general.input.email_placeholder')" wire:model="email" hideRequiredIndicator required />
<x-form.input name="password" type="password" :label="__('general.input.password')"
:placeholder="__('general.input.password_placeholder')" required hideRequiredIndicator wire:model="password" />
<div class="flex flex-row">
<x-form.checkbox name="remember" label="Remember me" wire:model="remember" />
<a class="text-sm text-secondary-500 text-secondary hover:underline ml-auto"
href="{{ route('password.request') }}">
{{ __('auth.forgot_password') }}
</a>
</div>
<x-captcha :form="'login'" />
<x-button.primary class="w-full" type="submit">{{ __('auth.sign_in') }}</x-button.primary>
@if (config('settings.oauth_github') || config('settings.oauth_google') || config('settings.oauth_discord'))
<div class="flex flex-col items-center mt-4">
<div class="my-5 flex items-center w-full">
<span aria-hidden="true" class="h-0.5 grow rounded bg-primary-700"></span>
<span class="rounded-full px-3 py-1 text-xs font-medium bg-primary-700 text-gray-200">
{{ __('auth.or_sign_in_with') }}
</span>
<span aria-hidden="true" class="h-0.5 grow rounded bg-primary-700"></span>
</div>
<div class="flex flex-row flex-wrap justify-center mt-2 gap-4">
@foreach (['github', 'google', 'discord'] as $provider)
@if (config('settings.oauth_' . $provider))
<a href="{{ route('oauth.redirect', $provider) }}"
class="flex items-center justify-center px-4 h-10 border border-neutral rounded-md text-primary-100">
<img src="/assets/images/{{ $provider }}-dark.svg" alt="{{ $provider }}"
class="size-5 mr-2 text-secondary">
{{ __(ucfirst($provider)) }}
</a>
@endif
@endforeach
</div>
</div>
@endif
@if(!config('settings.registration_disabled', false))
<div class="text-base text-center rounded-md py-2 mt-6 text-sm">
{{ __('auth.dont_have_account') }}
<a class="text-sm text-secondary-500 text-secondary hover:underline" href="{{ route('register') }}"
wire:navigate>
{{ __('auth.sign_up') }}
</a>
</div>
@endif
</form>

View File

@@ -0,0 +1,91 @@
@php
// Verificar si el modo "force_authentik_only" está activado
$extension = \App\Models\Extension::where('extension', 'Authentik')->first();
$forceAuthentikOnly = false;
$authentikEnabled = false;
if ($extension && $extension->enabled) {
$settings = $extension->settings->pluck('value', 'key')->toArray();
$forceAuthentikOnly = !empty($settings['force_authentik_only']);
$authentikEnabled = !empty($settings['client_id']) && !empty($settings['client_secret']) && !empty($settings['base_url']);
}
@endphp
@if($forceAuthentikOnly && $authentikEnabled)
{{-- Mode Authentik uniquement --}}
<div class="mx-auto flex flex-col gap-2 mt-4 shadow-sm px-6 sm:px-14 pb-10 bg-primary-800 rounded-md xl:max-w-[40%] w-full">
<div class="flex flex-col items-center mt-4 mb-10">
<x-logo />
<h1 class="text-2xl text-center mt-2">{{ __('auth.sign_in_title') }}</h1>
<p class="text-sm text-center mt-2 text-gray-300">
{{ __('authentik::messages.authentik_force_only_description') }}
</p>
</div>
<a href="{{ route('oauth.authentik.redirect') }}"
class="w-full flex items-center justify-center px-4 py-3 bg-blue-600 border border-transparent rounded-md font-semibold text-sm text-white uppercase tracking-widest hover:bg-blue-700 focus:bg-blue-700 active:bg-blue-900 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 transition ease-in-out duration-150">
<svg class="w-5 h-5 mr-2" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M3 3a1 1 0 000 2v8a2 2 0 002 2h2.586l-1.293 1.293a1 1 0 101.414 1.414L10 15.414l2.293 2.293a1 1 0 001.414-1.414L12.414 15H15a2 2 0 002-2V5a1 1 0 100-2H3zm11.707 4.707a1 1 0 00-1.414-1.414L10 9.586 8.707 8.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"></path>
</svg>
{{ __('authentik::messages.authentik_login_button') }}
</a>
</div>
@else
{{-- Mode normal --}}
<form
class="mx-auto flex flex-col gap-2 mt-4 shadow-sm px-6 sm:px-14 pb-10 bg-primary-800 rounded-md xl:max-w-[40%] w-full"
wire:submit="submit" id="login">
<div class="flex flex-col items-center mt-4 mb-10">
<x-logo />
<h1 class="text-2xl text-center mt-2">{{ __('auth.sign_in_title') }} </h1>
</div>
<x-form.input name="email" type="email" :label="__('general.input.email')"
:placeholder="__('general.input.email_placeholder')" wire:model="email" hideRequiredIndicator required />
<x-form.input name="password" type="password" :label="__('general.input.password')"
:placeholder="__('general.input.password_placeholder')" required hideRequiredIndicator wire:model="password" />
<div class="flex flex-row">
<x-form.checkbox name="remember" label="Remember me" wire:model="remember" />
<a class="text-sm text-secondary-500 text-secondary hover:underline ml-auto"
href="{{ route('password.request') }}">
{{ __('auth.forgot_password') }}
</a>
</div>
<x-captcha :form="'login'" />
<x-button.primary class="w-full" type="submit">{{ __('auth.sign_in') }}</x-button.primary>
@if (config('settings.oauth_github') || config('settings.oauth_google') || config('settings.oauth_discord'))
<div class="flex flex-col items-center mt-4">
<div class="my-5 flex items-center w-full">
<span aria-hidden="true" class="h-0.5 grow rounded bg-primary-700"></span>
<span class="rounded-full px-3 py-1 text-xs font-medium bg-primary-700 text-gray-200">
{{ __('auth.or_sign_in_with') }}
</span>
<span aria-hidden="true" class="h-0.5 grow rounded bg-primary-700"></span>
</div>
<div class="flex flex-row flex-wrap justify-center mt-2 gap-4">
@foreach (['github', 'google', 'discord'] as $provider)
@if (config('settings.oauth_' . $provider))
<a href="{{ route('oauth.redirect', $provider) }}"
class="flex items-center justify-center px-4 h-10 border border-neutral rounded-md text-primary-100">
<img src="/assets/images/{{ $provider }}-dark.svg" alt="{{ $provider }}"
class="size-5 mr-2 text-secondary">
{{ __(ucfirst($provider)) }}
</a>
@endif
@endforeach
</div>
</div>
@endif
@if(!config('settings.registration_disabled', false))
<div class="text-base text-center rounded-md py-2 mt-6 text-sm">
{{ __('auth.dont_have_account') }}
<a class="text-sm text-secondary-500 text-secondary hover:underline" href="{{ route('register') }}"
wire:navigate>
{{ __('auth.sign_up') }}
</a>
</div>
@endif
</form>
@endif

View File

@@ -0,0 +1,5 @@
<div>
<button wire:click="logout" class="flex flex-row items-center p-3 gap-2 text-sm font-semibold text-error/80 hover:text-error bg-background-secondary hover:bg-background-secondary/80">
{{ __('auth.logout') }}
</button>
</div>

View File

@@ -0,0 +1,13 @@
<form
class="flex flex-col gap-2 max-w-md mx-auto px-6 sm:px-14 pb-10 bg-primary-800 rounded-md"
wire:submit="submit" id="reset">
<div class="flex flex-col items-center mt-4 mb-10">
<x-logo />
<h1 class="text-2xl text-center mt-2">{{ __('auth.reset_password') }} </h1>
</div>
<x-form.input name="email" type="text" :label="__('auth.input.email_label')" :placeholder="__('auth.input.email')" wire:model="email" required />
<x-captcha :form="'reset'" />
<x-button.primary class="w-full" type="submit">{{ __('auth.reset_password') }}</x-button.primary>
</form>

View File

@@ -0,0 +1,18 @@
<form class="flex flex-col gap-2 max-w-md mx-auto px-6 sm:px-14 pb-10 bg-primary-800 rounded-md" wire:submit="submit"
id="reset">
<div class="flex flex-col items-center mt-4 mb-10">
<x-logo />
<h1 class="text-2xl text-center mt-2">{{ __('auth.reset_password') }} </h1>
</div>
<x-form.input name="email" type="text" :label="__('auth.input.email_label')" :placeholder="__('auth.input.email')"
wire:model="email" required disabled />
<x-form.input name="password" type="password" :label="__('Password')" :placeholder="__('Your password')"
wire:model="password" required />
<x-form.input name="password_confirm" type="password" :label="__('Password')"
:placeholder="__('Confirm your password')" wire:model="password_confirmation" required />
<x-captcha :form="'reset'" />
<x-button.primary class="w-full" type="submit">{{ __('auth.reset_password') }}</x-button.primary>
</form>

View File

@@ -0,0 +1,35 @@
<form
class="mx-auto flex flex-col gap-2 mt-4 shadow-sm px-6 sm:px-14 pb-10 bg-primary-800 rounded-md xl:max-w-[60%] w-full"
wire:submit.prevent="submit" id="register">
<div class="flex flex-col items-center mt-4 mb-10">
<x-logo />
<h1 class="text-2xl text-center mt-2">{{ __('auth.sign_up_title') }} </h1>
</div>
<div class="flex flex-col md:grid md:grid-cols-2 gap-4">
<x-form.input name="first_name" type="text" :label="__('general.input.first_name')"
:placeholder="__('general.input.first_name_placeholder')" wire:model="first_name" required />
<x-form.input name="last_name" type="text" :label="__('general.input.last_name')"
:placeholder="__('general.input.last_name_placeholder')" wire:model="last_name" required />
<x-form.input name="email" type="email" :label="__('general.input.email')"
:placeholder="__('general.input.email_placeholder')" required wire:model="email" divClass="col-span-2" />
<x-form.input name="password" type="password" :label="__('Password')" :placeholder="__('Your password')"
wire:model="password" required />
<x-form.input name="password_confirm" type="password" :label="__('Password')"
:placeholder="__('Confirm your password')" wire:model="password_confirmation" required />
<x-form.properties :custom_properties="$custom_properties" :properties="$properties" />
</div>
<x-captcha :form="'register'" />
<x-button.primary class="w-full mt-2">{{ __('Sign up') }}</x-button.primary>
<div class="text-white text-center rounded-md py-2 mt-6 text-sm">
{{ __('auth.already_have_account') }}
<a class="text-sm text-secondary-500 text-secondary hover:underline" href="{{ route('login') }}" wire:navigate>
{{ __('auth.sign_in') }}
</a>
</div>
</form>

View File

@@ -0,0 +1,12 @@
<div
class="mx-auto flex flex-col gap-2 mt-4 shadow-sm px-6 sm:px-14 py-10 bg-background-secondary rounded-md xl:max-w-[60%] w-full">
<h1 class="text-2xl">{{ __('auth.verification.notice') }}</h1>
<p class="mt-2">{{ __('auth.verification.check_your_email') }}</p>
<form class="flex flex-col gap-2 mt-4" wire:submit.prevent="submit" id="verify-email">
<x-captcha :form="'verify-email'" />
<p class="text-base">{{ __('auth.verification.not_received') }}</p>
<x-button.primary class="w-full" type="submit">{{ __('auth.verification.request_another') }}</x-button.primary>
</form>
</div>