An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
init lang + login/register page
Andras Bacsai7fd224b44a31
diff --git a/lang/en.json b/lang/en.jsonnew file mode 100644index 0000000000..c690f3fb67--- /dev/null+++ b/lang/en.json@@ -0,0 +1,15 @@+{+ "auth.login": "Login",+ "auth.logout": "Logout",+ "auth.register": "Register",+ "auth.registration_disabled": "Registration is disabled.",+ "auth.reset_password": "Reset Password",+ "auth.failed": "These credentials do not match our records.",+ "auth.failed.password": "The provided password is incorrect.",+ "auth.failed.email": "We can't find a user with that e-mail address.",+ "auth.throttle": "Too many login attempts. Please try again in :seconds seconds.",+ "input.name": "Name",+ "input.email": "Email",+ "input.password": "Password",+ "input.password.again": "Password Again"+}diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.phpindex df63a074c7..cde9524455 100644--- a/resources/views/auth/login.blade.php+++ b/resources/views/auth/login.blade.php@@ -1,27 +1,30 @@-<x-layout>- <div>v{{ config('version') }}</div>- <a href="/login">Login</a>- @if ($is_registration_enabled)- <a href="/register">Register</a>- @else- <span>Registration disabled</span>- @endif- <div>- <form action="/login" method="POST">- @csrf- <input type="text" name="email" placeholder="email" @env('local') value="[email protected]" @endenv- autofocus />- <input type="password" name="password" placeho lder="Password" @env('local') value="password" @endenv />- <x-inputs.button type="submit">Login</x-inputs.button>- </form>- @if ($errors->any())- <div class="alert alert-danger">- <ul>- @foreach ($errors->all() as $error)- <li>{{ $error }}</li>- @endforeach- </ul>+<x-layout-simple>+ <div class="flex items-center justify-center h-screen">+ <div>+ <div>+ <form action="/login" method="POST" class="flex flex-col gap-2">+ @csrf+ <input type="email" name="email" placeholder="{{ __('input.email') }}"+ @env('local') value="[email protected]" @endenv autofocus />+ <input type="password" name="password" placeholder="{{ __('input.password') }}"+ @env('local') value="password" @endenv />+ <x-inputs.button isBold type="submit">{{ __('auth.login') }}</x-inputs.button>+ </form>+ @if ($errors->any())+ <div class="alert alert-danger">+ <ul>+ <li>{{ __('auth.failed') }}</li>+ </ul>+ </div>+ @endif</div>- @endif+ @if ($is_registration_enabled)+ <a href="/register" class="flex justify-center pt-2">+ <button>{{ __('auth.register') }}</button>+ </a>+ @else+ <div>{{ __('auth.registration_disabled') }}</div>+ @endif+ </div></div>-</x-layout>+</x-layout-simple>diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.phpindex 8a8ab42d4e..dba7763620 100644--- a/resources/views/auth/register.blade.php+++ b/resources/views/auth/register.blade.php@@ -1,23 +1,28 @@-<x-layout>- <div>v{{ config('version') }}</div>- <a href="/login">Login</a>- <a href="/register">Register</a>- <form action="/register" method="POST">- @csrf- <input type="text" name="name" placeholder="name" @env('local') value="Root" @endenv />- <input type="text" name="email" placeholder="email" @env('local') value="[email protected]" @endenv />- <input type="password" name="password" placeholder="Password" @env('local') value="password" @endenv />- <input type="password" name="password_confirmation" placeholder="Password"- @env('local') value="password" @endenv />- <x-inputs.button type="submit">Register</x-inputs.button>- </form>- @if ($errors->any())- <div class="alert alert-danger">- <ul>- @foreach ($errors->all() as $error)- <li>{{ $error }}</li>- @endforeach- </ul>+<x-layout-simple>+ <div class="flex items-center justify-center h-screen">+ <div>+ <form action="/register" method="POST" class="flex flex-col gap-2">+ @csrf+ <input type="text" name="name" placeholder="{{ __('input.name') }}"+ @env('local') value="root" @endenv />+ <input type="email" name="email" placeholder="{{ __('input.email') }}"+ @env('local') value="[email protected]" @endenv />+ <input type="password" name="password" placeholder="{{ __('input.password') }}"+ @env('local') value="password" @endenv />+ <input type="password" name="password_confirmation" placeholder="{{ __('input.password.again') }}"+ @env('local') value="password" @endenv />+ <x-inputs.button isBold type="submit">{{ __('auth.register') }}</x-inputs.button>+ </form>+ @if ($errors->any())+ <div class="alert alert-danger">+ <ul>+ <li>{{ __('auth.failed') }}</li>+ </ul>+ </div>+ @endif+ <a href="/login" class="flex justify-center pt-2">+ <button>{{ __('auth.login') }}</button>+ </a></div>- @endif-</x-layout>+ </div>+</x-layout-simple>diff --git a/resources/views/components/layout-simple.blade.php b/resources/views/components/layout-simple.blade.phpnew file mode 100644index 0000000000..8c6472474a--- /dev/null+++ b/resources/views/components/layout-simple.blade.php@@ -0,0 +1,32 @@+<!DOCTYPE html>+<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">++<head>+ <meta charset="utf-8">+ <meta name="viewport" content="width=device-width, initial-scale=1">+ <link rel="preconnect" href="https://api.fonts.coollabs.io" crossorigin>+ <link href="https://api.fonts.coollabs.io/css2?family=Inter&display=swap" rel="stylesheet">+ @env('local')+ <title>Coolify - localhost</title>+ @endenv+ @env('production')+ <title>{{ $title ?? 'Coolify' }}</title>+ @endenv+ <meta name="csrf-token" content="{{ csrf_token() }}">+ @vite(['resources/js/app.js', 'resources/css/app.css'])+ <style>+ [x-cloak] {+ display: none !important;+ }+ </style>+</head>++<body>+ <main>+ {{ $slot }}+ </main>+ <a+ class="fixed text-xs cursor-pointer left-2 bottom-1 opacity-20 hover:opacity-100 hover:text-white">v{{ config('version') }}</a>+</body>++</html>diff --git a/resources/views/components/layout.blade.php b/resources/views/components/layout.blade.phpindex da3cf8b3d7..54fc235003 100644--- a/resources/views/components/layout.blade.php+++ b/resources/views/components/layout.blade.php@@ -23,8 +23,7 @@</head><body>- <a- class="fixed text-xs cursor-pointer left-2 bottom-1 opacity-20 hover:opacity-100 hover:text-white">v{{ config('version') }}</a>+@livewireScripts@auth@@ -33,7 +32,8 @@<main class="max-w-6xl pt-10 mx-auto">{{ $slot }}</main>-+ <a+ class="fixed text-xs cursor-pointer left-2 bottom-1 opacity-20 hover:opacity-100 hover:text-white">v{{ config('version') }}</a>@auth<script>window.addEventListener("keydown", function(event) {