mirror of
https://github.com/ershisan99/coolify.git
synced 2025-12-16 20:49:28 +00:00
feat: force password reset + waitlist
This commit is contained in:
3
resources/views/auth/force-password-reset.blade.php
Normal file
3
resources/views/auth/force-password-reset.blade.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<x-layout-simple>
|
||||
<livewire:force-password-reset />
|
||||
</x-layout-simple>
|
||||
@@ -8,9 +8,17 @@
|
||||
<div class="flex items-center gap-2">
|
||||
<h1>{{ __('auth.login') }}</h1>
|
||||
@if ($is_registration_enabled)
|
||||
<a href="/register" class="text-xs normal-case hover:no-underline btn btn-sm bg-coollabs-gradient">
|
||||
{{ __('auth.register_now') }}
|
||||
</a>
|
||||
@if (config('coolify.waitlist'))
|
||||
<a href="/waitlist"
|
||||
class="text-xs normal-case hover:no-underline btn btn-sm bg-coollabs-gradient">
|
||||
Join the waitlist
|
||||
</a>
|
||||
@else
|
||||
<a href="/register"
|
||||
class="text-xs normal-case hover:no-underline btn btn-sm bg-coollabs-gradient">
|
||||
{{ __('auth.register_now') }}
|
||||
</a>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
<x-layout-simple>
|
||||
<div class="flex items-center justify-center h-screen mx-auto">
|
||||
<div class="min-h-screen hero">
|
||||
<div>
|
||||
<div class="flex flex-col items-center pb-8">
|
||||
<a href="{{ route('dashboard') }}">
|
||||
<div class="text-5xl font-bold tracking-tight text-center text-white">Coolify</div>
|
||||
</a>
|
||||
<x-version />
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
<h1>{{ __('auth.reset_password') }}</h1>
|
||||
<div class="flex items-center justify-center pb-4 text-center">
|
||||
<h2>{{ __('auth.reset_password') }}</h2>
|
||||
</div>
|
||||
<div>
|
||||
<form action="/reset-password" method="POST" class="flex flex-col gap-2">
|
||||
@@ -16,7 +15,7 @@
|
||||
<input hidden id="token" name="token" value="{{ request()->route('token') }}">
|
||||
<input hidden value="{{ request()->query('email') }}" type="email" name="email"
|
||||
label="{{ __('input.email') }}" />
|
||||
<div class="flex gap-2">
|
||||
<div class="flex flex-col gap-2">
|
||||
<x-forms.input required type="password" id="password" name="password"
|
||||
label="{{ __('input.password') }}" autofocus />
|
||||
<x-forms.input required type="password" id="password_confirmation" name="password_confirmation"
|
||||
|
||||
3
resources/views/auth/waitlist.blade.php
Normal file
3
resources/views/auth/waitlist.blade.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<x-layout-simple>
|
||||
<livewire:waitlist :waiting_in_line="$waiting_in_line" />
|
||||
</x-layout-simple>
|
||||
@@ -25,14 +25,15 @@
|
||||
<input {{ $attributes->merge(['class' => $defaultClass . ' pl-10']) }} @required($required)
|
||||
wire:model.defer={{ $id }} wire:dirty.class.remove='text-white'
|
||||
wire:dirty.class="input-warning" wire:loading.attr="disabled" type="{{ $type }}"
|
||||
@readonly($readonly) @disabled($disabled) id="{{ $id }}" name="{{ $name }}">
|
||||
@readonly($readonly) @disabled($disabled) id="{{ $id }}" name="{{ $name }}"
|
||||
placeholder="{{ $attributes->get('placeholder') }}">
|
||||
|
||||
</div>
|
||||
@else
|
||||
<input {{ $attributes->merge(['class' => $defaultClass]) }} @required($required) @readonly($readonly)
|
||||
wire:model.defer={{ $id }} wire:dirty.class.remove='text-white' wire:dirty.class="input-warning"
|
||||
wire:loading.attr="disabled" type="{{ $type }}" @disabled($disabled)
|
||||
id="{{ $id }}" name="{{ $name }}">
|
||||
id="{{ $id }}" name="{{ $name }}" placeholder="{{ $attributes->get('placeholder') }}">
|
||||
@endif
|
||||
@if (!$label && $helper)
|
||||
<x-helper :helper="$helper" />
|
||||
|
||||
@@ -24,11 +24,25 @@
|
||||
|
||||
<body>
|
||||
@livewireScripts
|
||||
<x-toaster-hub />
|
||||
<main>
|
||||
{{ $slot }}
|
||||
</main>
|
||||
<x-version class="fixed left-2 bottom-1" />
|
||||
<script>
|
||||
Livewire.on('info', (message) => {
|
||||
if (message) Toaster.info(message)
|
||||
})
|
||||
Livewire.on('error', (message) => {
|
||||
if (message) Toaster.error(message)
|
||||
})
|
||||
Livewire.on('warning', (message) => {
|
||||
if (message) Toaster.warning(message)
|
||||
})
|
||||
Livewire.on('success', (message) => {
|
||||
if (message) Toaster.success(message)
|
||||
})
|
||||
|
||||
function changePasswordFieldType(event) {
|
||||
let element = event.target
|
||||
for (let i = 0; i < 10; i++) {
|
||||
@@ -47,6 +61,7 @@
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
@if ($pull_request_id !== 0)
|
||||
Pull Request #{{ $pull_request_id }} of {{ $name }} (<a target="_blank"
|
||||
href="{{ $fqdn }}">{{ $fqdn }}</a>) deployment failed:
|
||||
@else
|
||||
Deployment failed of {{ $name }} (<a target="_blank" href="{{ $fqdn }}">{{ $fqdn }}</a>):
|
||||
@endif
|
||||
|
||||
<a target="_blank" href="{{ $deployment_url }}">View Deployment Logs</a><br><br>
|
||||
@@ -1,7 +0,0 @@
|
||||
@if ($pull_request_id !== 0)
|
||||
Pull Request #{{ $pull_request_id }} of {{ $name }} (<a target="_blank" href="{{ $fqdn }}">{{ $fqdn }}</a>) deployment failed:
|
||||
@else
|
||||
Deployment failed of {{ $name }} (<a target="_blank" href="{{ $fqdn }}">{{ $fqdn }}</a>):
|
||||
@endif
|
||||
|
||||
<a target="_blank" href="{{ $deployment_url }}">View Deployment Logs</a><br><br>
|
||||
@@ -0,0 +1,8 @@
|
||||
@if ($pull_request_id === 0)
|
||||
A new version of <a target="_blank" href="{{ $fqdn }}">{{ $fqdn }}</a> is available:
|
||||
@else
|
||||
Pull request #{{ $pull_request_id }} of {{ $name }} deployed successfully: <a target="_blank"
|
||||
href="{{ $fqdn }}">Application Link</a> |
|
||||
@endif
|
||||
<a target="_blank" href="{{ $deployment_url }}">View
|
||||
Deployment Logs</a><br><br>
|
||||
@@ -1,7 +0,0 @@
|
||||
@if ($pull_request_id === 0)
|
||||
A new version of <a target="_blank" href="{{ $fqdn }}">{{ $fqdn }}</a> is available:
|
||||
@else
|
||||
Pull request #{{ $pull_request_id }} of {{ $name }} deployed successfully: <a target="_blank" href="{{ $fqdn }}">Application Link</a> |
|
||||
@endif
|
||||
<a target="_blank" href="{{ $deployment_url }}">View
|
||||
Deployment Logs</a><br><br>
|
||||
@@ -1,8 +1,6 @@
|
||||
Hello,<br><br>
|
||||
|
||||
A password reset requested for your email address on "{{ config('app.name') }}".<br><br>
|
||||
|
||||
Please click the following link to reset your password: <a target="_blank" href="{{ $url }}">Password
|
||||
Reset</a><br><br>
|
||||
|
||||
This password reset link will expire in "{{ $count }}" minutes.
|
||||
This password reset link will expire in {{ $count }} minutes.
|
||||
|
||||
4
resources/views/emails/waitlist-confirmation.blade.php
Normal file
4
resources/views/emails/waitlist-confirmation.blade.php
Normal file
@@ -0,0 +1,4 @@
|
||||
Someone added this email to the Coolify Cloud's waitlist.
|
||||
<br>
|
||||
<a href="{{ $confirmation_url }}">Click here to confirm</a>! The link will expire in {{config('constants.waitlist.confirmation_valid_for_minutes')}} minutes.<br><br>
|
||||
You have no idea what <a href="https://cloud.coolify.io">Coolify Cloud</a> is or this waitlist? <a href="{{ $cancel_url }}">Click here to remove</a> you from the waitlist.
|
||||
18
resources/views/livewire/force-password-reset.blade.php
Normal file
18
resources/views/livewire/force-password-reset.blade.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<div class="min-h-screen hero">
|
||||
<div class="w-96 min-w-fit">
|
||||
<div class="flex flex-col items-center pb-8">
|
||||
<a href="{{ route('dashboard') }}">
|
||||
<div class="text-5xl font-bold tracking-tight text-center text-white">Coolify</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="flex items-center justify-center pb-4 text-center">
|
||||
<h2>Set your initial password</h2>
|
||||
</div>
|
||||
<form class="flex flex-col gap-2" wire:submit.prevent='submit'>
|
||||
<x-forms.input id="email" type="email" placeholder="Email" readonly />
|
||||
<x-forms.input id="password" type="password" placeholder="New Password" />
|
||||
<x-forms.input id="password_confirmation" type="password" placeholder="Confirm New Password" />
|
||||
<x-forms.button type="submit">Reset Password</x-forms.button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
23
resources/views/livewire/waitlist.blade.php
Normal file
23
resources/views/livewire/waitlist.blade.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<div class="min-h-screen hero">
|
||||
<div class="w-96 min-w-fit">
|
||||
<div class="flex items-center justify-center pb-4 text-center">
|
||||
<h2>Start self-hosting in the
|
||||
<svg class="inline-block w-8 h-8 text-warning width="512" height="512" viewBox="0 0 20 20"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<g fill="currentColor" fill-rule="evenodd" clip-rule="evenodd">
|
||||
<path
|
||||
d="M13 4h-1a4.002 4.002 0 0 0-3.874 3H8a4 4 0 1 0 0 8h8a4 4 0 0 0 .899-7.899A4.002 4.002 0 0 0 13 4Z"
|
||||
opacity=".2" />
|
||||
<path
|
||||
d="M11 3h-1a4.002 4.002 0 0 0-3.874 3H6a4 4 0 1 0 0 8h8a4 4 0 0 0 .899-7.899A4.002 4.002 0 0 0 11 3ZM6.901 7l.193-.75A3.002 3.002 0 0 1 10 4h1c1.405 0 2.614.975 2.924 2.325l.14.61l.61.141A3.001 3.001 0 0 1 14 13H6a3 3 0 1 1 0-6h.901Z" />
|
||||
</g>
|
||||
</svg>
|
||||
</h2>
|
||||
</div>
|
||||
<form class="flex items-end gap-2" wire:submit.prevent='submit'>
|
||||
<x-forms.input id="email" type="email" label="Email" placeholder="youareawesome@protonmail.com" />
|
||||
<x-forms.button type="submit">Join Waitlist</x-forms.button>
|
||||
</form>
|
||||
Waiting: {{$waiting_in_line}}
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user