a lot hehe

This commit is contained in:
Andras Bacsai
2023-06-01 12:15:33 +02:00
parent c8f70a4e3b
commit 0aa816b4f2
42 changed files with 570 additions and 249 deletions

View File

@@ -55,11 +55,14 @@ h1 {
@apply text-3xl font-bold pb-4 text-white;
}
h2 {
@apply text-2xl font-bold pb-4 text-white;
@apply text-2xl font-bold py-4 text-white;
}
h3 {
@apply text-xl font-bold py-4 text-white;
}
h4 {
@apply text-base font-bold pb-4 text-white;
}
a {
@apply text-neutral-400 hover:text-white text-sm link link-hover hover:bg-transparent;
}

View File

@@ -0,0 +1,28 @@
<x-layout-simple>
<div class="flex items-center justify-center h-screen">
<div>
<div class="flex flex-col items-center pb-8">
<div class="text-5xl font-bold tracking-tight text-center text-white">Coolify</div>
<x-version />
</div>
<div class="w-96">
<form action="/user/confirm-password" method="POST" class="flex flex-col gap-2">
@csrf
<x-forms.input required type="password" name="password " label="{{ __('input.password') }}"
autofocus />
<x-forms.button type="submit">{{ __('auth.confirm_password') }}</x-forms.button>
</form>
@if ($errors->any())
<div class="text-center text-error">
<span>{{ __('auth.failed') }}</span>
</div>
@endif
@if (session('status'))
<div class="mb-4 text-sm font-medium text-green-600">
{{ session('status') }}
</div>
@endif
</div>
</div>
</div>
</x-layout-simple>

View File

@@ -1,50 +1,32 @@
<x-layout-simple>
Forgot Password
<form>
@csrf
<x-forms.input required value="test@example.com" type="email" name="email" label="{{ __('input.email') }}"
autofocus />
</form>
@if (session('status'))
<div class="mb-4 text-sm font-medium text-green-600">
{{ session('status') }}
</div>
@endif
{{-- <div class="flex items-center justify-center h-screen">
<div class="flex items-center justify-center h-screen">
<div>
<div class="pb-8 text-5xl font-bold tracking-tight text-center text-white">Coolify</div>
<div class="flex flex-col items-center pb-8">
<div class="text-5xl font-bold tracking-tight text-center text-white">Coolify</div>
<x-version />
</div>
<div class="flex items-center gap-2">
<h1 class="pb-0">{{ __('auth.login') }}</h1>
@if ($is_registration_enabled)
<a href="/register" class="flex justify-center pt-2 hover:no-underline">
<button
class="normal-case rounded-none btn btn-sm btn-primary bg-coollabs-gradient">{{ __('auth.register-now') }}</button>
</a>
@endif
<h1 class="pb-0">{{ __('auth.forgot_password') }}</h1>
</div>
<div class="w-96">
<form action="/login" method="POST" class="flex flex-col gap-2">
<form action="/forgot-password" method="POST" class="flex flex-col gap-2">
@csrf
@env('local')
<x-forms.input required value="test@example.com" type="email" name="email"
label="{{ __('input.email') }}" autofocus />
<x-forms.input required value="password" type="password" name="password"
label="{{ __('input.password') }}" />
@else
<x-forms.input required type="email" name="email" label="{{ __('input.email') }}" autofocus />
<x-forms.input required type="password" name="password" label="{{ __('input.password') }}" />
@endenv
@if ($errors->any())
<div class="text-center text-error">
<span>{{ __('auth.failed') }}</span>
</div>
@endif
<x-forms.button type="submit">{{ __('auth.login') }}</x-forms.button>
@if (!$is_registration_enabled)
<div class="text-sm text-center">{{ __('auth.registration_disabled') }}</div>
@endif
<x-forms.button type="submit">{{ __('auth.forgot_password_send_email') }}</x-forms.button>
</form>
@if ($errors->any())
<div class="text-center text-error">
<span>{{ __('auth.failed') }}</span>
</div>
@endif
@if (session('status'))
<div class="mb-4 text-sm font-medium text-green-600">
{{ session('status') }}
</div>
@endif
</div>
</div>
</div> --}}
</div>
</x-layout-simple>

View File

@@ -1,13 +1,16 @@
<x-layout-simple>
<div class="flex items-center justify-center h-screen">
<div>
<div class="pb-8 text-5xl font-bold tracking-tight text-center text-white">Coolify</div>
<div class="flex flex-col items-center pb-8">
<div class="text-5xl font-bold tracking-tight text-center text-white">Coolify</div>
<x-version />
</div>
<div class="flex items-center gap-2">
<h1 class="pb-0">{{ __('auth.login') }}</h1>
@if ($is_registration_enabled)
<a href="/register" class="flex justify-center pt-2 hover:no-underline">
<button
class="normal-case rounded-none btn btn-sm btn-primary bg-coollabs-gradient">{{ __('auth.register-now') }}</button>
class="normal-case rounded-none btn btn-sm btn-primary bg-coollabs-gradient">{{ __('auth.register_now') }}</button>
</a>
@endif
</div>
@@ -17,6 +20,17 @@
@env('local')
<x-forms.input required value="test@example.com" type="email" name="email"
label="{{ __('input.email') }}" autofocus />
{{-- @if (config('mail.default'))
{{ dd('mailer configured') }}
@else
{{ dd('mailer not configured') }}
@endif --}}
@if (!config('mail.default'))
<a href="/forgot-password" class="text-xs">
{{ __('auth.forgot_password') }}?
</a>
@endif
<x-forms.input required value="password" type="password" name="password"
label="{{ __('input.password') }}" />
@else
@@ -28,6 +42,11 @@
<span>{{ __('auth.failed') }}</span>
</div>
@endif
@if (session('status'))
<div class="mb-4 text-sm font-medium text-green-600">
{{ session('status') }}
</div>
@endif
<x-forms.button type="submit">{{ __('auth.login') }}</x-forms.button>
@if (!$is_registration_enabled)
<div class="text-sm text-center">{{ __('auth.registration_disabled') }}</div>

View File

@@ -1,12 +1,15 @@
<x-layout-simple>
<div class="flex items-center justify-center min-h-screen">
<div>
<div class="pb-8 text-5xl font-bold tracking-tight text-center text-white">Coolify</div>
<div class="flex flex-col items-center pb-8">
<div class="text-5xl font-bold tracking-tight text-center text-white">Coolify</div>
<x-version />
</div>
<div class="flex items-center gap-2">
<h1 class="pb-0">{{ __('auth.register') }}</h1>
<a href="/login" class="flex justify-center pt-2 hover:no-underline">
<button
class="normal-case rounded-none btn btn-sm btn-primary bg-coollabs-gradient">{{ __('auth.already-registered') }}</button>
class="normal-case rounded-none btn btn-sm btn-primary bg-coollabs-gradient">{{ __('auth.already_registered') }}</button>
</a>
</div>
<form action="/register" method="POST" class="flex flex-col gap-2">

View File

@@ -0,0 +1,38 @@
<x-layout-simple>
<div class="flex items-center justify-center h-screen mx-auto">
<div>
<div class="flex flex-col items-center pb-8">
<div class="text-5xl font-bold tracking-tight text-center text-white">Coolify</div>
<x-version />
</div>
<div class="flex items-center gap-2">
<h1 class="pb-0">{{ __('auth.reset_password') }}</h1>
</div>
<div>
<form action="/reset-password" method="POST" class="flex flex-col gap-2">
@csrf
<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">
<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"
label="{{ __('input.password.again') }}" />
</div>
<x-forms.button type="submit">{{ __('auth.reset_password') }}</x-forms.button>
</form>
@if ($errors->any())
<div class="text-center text-error">
<span>{{ __('auth.failed') }}</span>
</div>
@endif
@if (session('status'))
<div class="mb-4 text-sm font-medium text-green-600">
{{ session('status') }}
</div>
@endif
</div>
</div>
</div>
</x-layout-simple>

View File

@@ -0,0 +1,46 @@
<x-layout-simple>
<div class="flex items-center justify-center h-screen">
<div>
<div class="flex flex-col items-center pb-8">
<div class="text-5xl font-bold tracking-tight text-center text-white">Coolify</div>
<x-version />
</div>
<div class="w-96" x-data="{ showRecovery: false }">
<form action="/two-factor-challenge" method="POST" class="flex flex-col gap-2">
@csrf
<template x-if="!showRecovery">
<div>
<x-forms.input required type="number" name="code" label="{{ __('input.code') }}"
autofocus />
<div class="pt-2 text-xs cursor-pointer hover:underline hover:text-white"
x-on:click="showRecovery = !showRecovery">Use
Recovery Code
</div>
</div>
</template>
<template x-if="showRecovery">
<div>
<x-forms.input required type="text" name="recovery_code "
label="{{ __('input.recovery_code') }}" />
<div class="pt-2 text-xs cursor-pointer hover:underline hover:text-white"
x-on:click="showRecovery = !showRecovery">Use
One-Time Code
</div>
</div>
</template>
<x-forms.button type="submit">{{ __('auth.login') }}</x-forms.button>
</form>
@if ($errors->any())
<div class="text-center text-error">
<span>{{ __('auth.failed') }}</span>
</div>
@endif
@if (session('status'))
<div class="mb-4 text-sm font-medium text-green-600">
{{ session('status') }}
</div>
@endif
</div>
</div>
</div>
</x-layout-simple>

View File

@@ -25,8 +25,7 @@
<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>
<x-version class="fixed left-2 bottom-1" />
</body>
</html>

View File

@@ -35,8 +35,7 @@
<main>
{{ $slot }}
</main>
<a
class="fixed text-xs cursor-pointer right-2 bottom-1 opacity-60 hover:opacity-100 hover:text-white">v{{ config('version') }}</a>
<x-version class="fixed left-2 bottom-1" />
@auth
<script>
window.addEventListener("keydown", function(event) {

View File

@@ -0,0 +1,2 @@
<a
{{ $attributes->merge(['class' => 'text-xs cursor-pointer opacity-20 hover:opacity-100 hover:text-white']) }}>v{{ config('version') }}</a>

View File

@@ -1,23 +1,19 @@
<div class="">
<div class="text-xl">Discord</div>
<div class="mt-2"></div>
<div>
<form wire:submit.prevent='submit' class="flex flex-col">
<div class="flex flex-col gap-2 xl:flex-row w-96">
<x-inputs.input type="checkbox" id="model.extra_attributes.discord_active" label="Active?" />
<div class="flex items-center gap-2">
<h3>Discord</h3>
<x-forms.button class="w-16 mt-4" type="submit">
Save
</x-forms.button>
</div>
<div class="flex flex-col gap-2 xl:flex-row w-96">
<x-inputs.input id="model.extra_attributes.discord_webhook" label="Discord Webhook" />
<x-forms.checkbox instantSave id="model.smtp_attributes.discord_active" label="Notification Enabled" />
</div>
<div class="flex flex-col gap-2 xl:flex-row w-96">
<x-forms.input required id="model.smtp_attributes.discord_webhook" label="Webhook" />
</div>
<div>
<x-inputs.button class="w-16 mt-4" type="submit">
Submit
</x-inputs.button>
<x-inputs.button
class="mt-4 btn btn-xs no-animation normal-case text-white btn-primary"
wire:click="sendTestNotification"
>
Send test message
</x-inputs.button>
</div>
</form>
</div>

View File

@@ -1,45 +1,35 @@
<div class="mt-10">
<div class="text-xl">E-mail - SMTP</div>
<div class="mt-2"></div>
<form wire:submit.prevent='submit' class="flex flex-col">
<div>
<form wire:submit.prevent='submit' class="flex flex-col mt-2">
<div class="flex items-center gap-2">
<h3>E-mail (SMTP)</h3>
<x-forms.button class="w-16 mt-4" type="submit">
Save
</x-forms.button>
</div>
<div class="flex flex-col w-96">
<x-inputs.input type="checkbox" id="model.extra_attributes.smtp_active" label="Active?" />
<x-forms.checkbox instantSave id="model.smtp_attributes.smtp_active" label="Notification Enabled" />
</div>
<div class="flex flex-col gap-2 xl:flex-row">
<div class="flex flex-col w-96">
<x-inputs.textarea
id="model.extra_attributes.recipients"
helper="E-mails, one per line"
<x-forms.textarea required id="model.smtp_attributes.recipients" helper="E-mails, one per line"
label="Recipients" />
</div>
</div>
<div class="flex flex-col gap-2 xl:flex-row">
<div class="flex flex-col w-96">
<x-inputs.input id="model.extra_attributes.smtp_host" label="Host" />
<x-inputs.input id="model.extra_attributes.smtp_port" label="Port" />
<x-inputs.input id="model.extra_attributes.smtp_encryption" label="Encryption" />
<x-forms.input required id="model.smtp_attributes.smtp_host" label="Host" />
<x-forms.input required id="model.smtp_attributes.smtp_port" label="Port" />
<x-forms.input id="model.smtp_attributes.smtp_encryption" label="Encryption" />
</div>
<div class="flex flex-col w-96">
<x-inputs.input id="model.extra_attributes.smtp_username" label="Username" />
<x-inputs.input id="model.extra_attributes.smtp_password" label="Password" />
<x-inputs.input id="model.extra_attributes.smtp_timeout" label="Timeout" />
<x-forms.input id="model.smtp_attributes.smtp_username" label="Username" />
<x-forms.input id="model.smtp_attributes.smtp_password" label="Password" />
<x-forms.input id="model.smtp_attributes.smtp_timeout" label="Timeout" />
</div>
<div class="flex flex-col w-96">
<x-inputs.input id="model.extra_attributes.from_address" label="From Address" />
<x-inputs.input id="model.extra_attributes.from_name" label="From Name" />
<x-inputs.input id="model.extra_attributes.test_address" label="Send test e-mails to" />
<x-forms.input required id="model.smtp_attributes.from_address" label="From Address" />
<x-forms.input required id="model.smtp_attributes.from_name" label="From Name" />
</div>
</div>
<div class="flex">
<x-inputs.button class="w-16 mt-4" type="submit">
Submit
</x-inputs.button>
<x-inputs.button
class="mt-4 btn btn-xs no-animation normal-case text-white btn-primary"
wire:click="sendTestNotification"
>
Send test message
</x-inputs.button>
</div>
</form>
</div>

View File

@@ -0,0 +1,4 @@
<x-forms.button isHighlighted class="mt-4 text-white normal-case btn btn-xs no-animation btn-primary"
wire:click="sendTestNotification">
Send Test Notifications
</x-forms.button>

View File

@@ -1,10 +1,12 @@
<div>
<form wire:submit.prevent='submit'>
<form wire:submit.prevent='submit' class="flex flex-col">
<div class="flex items-center gap-2">
<h3>Profile</h3>
<h3>General</h3>
<x-forms.button type="submit" label="Save">Save</x-forms.button>
</div>
<x-forms.input id="name" label="Name" required />
<x-forms.input id="email" label="Email" readonly />
<div class="flex gap-2">
<x-forms.input id="name" label="Name" required />
<x-forms.input id="email" label="Email" readonly />
</div>
</form>
</div>

View File

@@ -0,0 +1,18 @@
<form>
<div class="flex flex-col gap-2">
<div class="flex gap-2">
<x-forms.input id="model.extra_attributes.smtp_host" label="Host" />
<x-forms.input id="model.extra_attributes.smtp_port" label="Port" />
<x-forms.input id="model.extra_attributes.smtp_encryption" label="Encryption" />
</div>
<div class="flex gap-2">
<x-forms.input id="model.extra_attributes.smtp_username" label="Username" />
<x-forms.input id="model.extra_attributes.smtp_password" label="Password" />
<x-forms.input id="model.extra_attributes.smtp_timeout" label="Timeout" />
</div>
<div class="flex gap-2">
<x-forms.input id="model.extra_attributes.from_address" label="From Address" />
<x-forms.input id="model.extra_attributes.from_name" label="From Name" />
</div>
</div>
</form>

View File

@@ -6,8 +6,7 @@
Save
</x-forms.button>
</div>
<div class="pb-4 text-sm">Instance wide settings for Coolify.
</div>
<div class="pb-4 text-sm">Instance wide settings for Coolify.</div>
<div class="flex flex-col gap-2">
<div class="flex gap-2">
<x-forms.input id="settings.fqdn" label="Coolify's Domain" />
@@ -22,7 +21,6 @@
</div>
</div>
</form>
<h3>Advanced</h3>
<div class="flex flex-col text-right w-52">
<x-forms.checkbox instantSave id="is_auto_update_enabled" label="Auto Update Coolify" />
@@ -30,7 +28,5 @@
{{-- <x-forms.checkbox instantSave id="is_https_forced" label="Force https?" /> --}}
<x-forms.checkbox instantSave id="do_not_track" label="Do Not Track" />
</div>
@if (auth()->user()->isPartOfRootTeam())
<livewire:force-upgrade />
@endif
</div>

View File

@@ -1,12 +1,9 @@
<div class="pt-4">
<h3>Switch Team</h3>
@if (auth()->user()->otherTeams()->count() > 0)
<div class="flex gap-2">
@foreach (auth()->user()->otherTeams() as $team)
<x-forms.button isHighlighted wire:key="{{ $team->id }}"
wire:click="switch_to('{{ $team->id }}')">
{{ $team->name }}</x-forms.button>
@endforeach
</div>
@endif
<div class="flex gap-2">
@foreach (auth()->user()->otherTeams() as $team)
<x-forms.button isHighlighted wire:key="{{ $team->id }}" wire:click="switch_to('{{ $team->id }}')">
{{ $team->name }}</x-forms.button>
@endforeach
</div>
</div>

View File

@@ -1,3 +1,73 @@
<x-layout>
<livewire:profile.form />
<h1>Profile</h1>
<livewire:profile.form :request="$request" />
<h3>2FA</h3>
@if (session('status') == 'two-factor-authentication-enabled')
<div class="mb-4 text-sm font-medium">
Please finish configuring two factor authentication below. Read the QR code or enter the secret key
manually.
</div>
<div class="flex flex-col gap-2">
<form action="/user/confirmed-two-factor-authentication" method="POST" class="flex items-end w-32 gap-2">
@csrf
<x-forms.input type="number" id="code" label="One-time code" required />
<x-forms.button type="submit">Validate 2FA</x-forms.button>
</form>
<div>
<div>{!! $request->user()->twoFactorQrCodeSvg() !!}</div>
<div x-data="{ showCode: false }">
<x-forms.button x-on:click="showCode = !showCode">Show secret key to manually enter</x-forms.button>
<template x-if="showCode">
<div class="text-sm">{!! decrypt($request->user()->two_factor_secret) !!}</div>
</template>
</div>
</div>
</div>
@elseif(session('status') == 'two-factor-authentication-confirmed')
<div class="mb-4 text-sm">
Two factor authentication confirmed and enabled successfully.
</div>
<div>
<div class="pb-6 text-sm">Here are the recovery codes for your account. Please store them in a secure
location.</div>
<div class="text-white">
@foreach ($request->user()->recoveryCodes() as $code)
<div>{{ $code }}</div>
@endforeach
</div>
</div>
@else
@if ($request->user()->two_factor_confirmed_at)
<div class="text-sm"> Two factor authentication is <span class="text-helper">enabled</span>.</div>
<div class="flex gap-2">
<form action="/user/two-factor-authentication" method="POST">
@csrf
@method ('DELETE')
<x-forms.button type="submit">Disable</x-forms.button>
</form>
<form action="/user/two-factor-recovery-codes" method="POST">
@csrf
<x-forms.button type="submit">Regenerate Recovery Codes</x-forms.button>
</form>
</div>
@if (session('status') == 'recovery-codes-generated')
<div>
<div class="py-6 text-sm">Here are the recovery codes for your account. Please store them in a
secure
location.</div>
<div class="text-white">
@foreach ($request->user()->recoveryCodes() as $code)
<div>{{ $code }}</div>
@endforeach
</div>
</div>
@endif
@else
<div class="text-sm">Two factor authentication is <span class="text-helper">disabled</span>.</div>
<form action="/user/two-factor-authentication" method="POST">
@csrf
<x-forms.button type="submit">Configure 2FA</x-forms.button>
</form>
@endif
@endif
</x-layout>

View File

@@ -1,4 +1,10 @@
<x-layout>
<h1>Settings</h1>
<livewire:settings.form :settings="$settings" />
@if (auth()->user()->isPartOfRootTeam())
<livewire:force-upgrade />
@endif
<h3 class="pb-0">Notification</h3>
<div class="pb-4 text-sm">Notification (email, discord, etc) settings for Coolify.</div>
<h4>Email</h4>
<livewire:settings.email :model="$settings" />
</x-layout>

View File

@@ -1,13 +1,12 @@
<x-layout>
<div>
<h3>Current Team</h3>
<p>Name: {{ session('currentTeam.name') }}</p>
<h1>Team</h1>
<p>Current Team: {{ session('currentTeam.name') }}</p>
@if (auth()->user()->otherTeams()->count() > 0)
<livewire:switch-team />
<div class="h-12"></div>
<h3>Notifications</h3>
<livewire:notifications.discord-settings :model="session('currentTeam')" />
<livewire:notifications.email-settings :model="session('currentTeam')" />
<div class="h-12"></div>
</div>
<livewire:switch-team>
@endif
<h2>Notifications</h2>
<livewire:notifications.test :model="session('currentTeam')" />
<livewire:notifications.email-settings :model="session('currentTeam')" />
<livewire:notifications.discord-settings :model="session('currentTeam')" />
<div class="h-12"></div>
</x-layout>