Skip to content

Commit 83f3d86

Browse files
authored
Merge pull request #4193 from coollabsio/next
v4.0.0-beta.364
2 parents d19b0ea + 15c00bc commit 83f3d86

File tree

16 files changed

+62
-64
lines changed

16 files changed

+62
-64
lines changed

app/Livewire/Project/Application/Preview/Form.php

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace App\Livewire\Project\Application\Preview;
44

55
use App\Models\Application;
6+
use Livewire\Attributes\Validate;
67
use Livewire\Component;
78
use Spatie\Url\Url;
89

app/Livewire/SettingsBackup.php

+8
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,14 @@ public function addCoolifyDatabase()
9999
$this->database->refresh();
100100
$this->backup->refresh();
101101
$this->s3s = S3Storage::whereTeamId(0)->get();
102+
103+
$this->uuid = $this->database->uuid;
104+
$this->name = $this->database->name;
105+
$this->description = $this->database->description;
106+
$this->postgres_user = $this->database->postgres_user;
107+
$this->postgres_password = $this->database->postgres_password;
108+
$this->executions = $this->backup->executions;
109+
102110
} catch (\Exception $e) {
103111
return handleError($e, $this);
104112
}

app/Livewire/SettingsEmail.php

+2
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ public function syncData(bool $toModel = false)
6363
$this->settings->smtp_username = $this->smtpUsername;
6464
$this->settings->smtp_password = $this->smtpPassword;
6565
$this->settings->smtp_timeout = $this->smtpTimeout;
66+
$this->settings->smtp_from_address = $this->smtpFromAddress;
67+
$this->settings->smtp_from_name = $this->smtpFromName;
6668

6769
$this->settings->resend_enabled = $this->resendEnabled;
6870
$this->settings->resend_api_key = $this->resendApiKey;

app/Livewire/Source/Github/Create.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Create extends Component
2323

2424
public function mount()
2525
{
26-
$this->name = substr(generate_random_name(), 0, 34); // GitHub Apps names can only be 34 characters long
26+
$this->name = substr(generate_random_name(), 0, 30);
2727
}
2828

2929
public function createGitHubApp()

bootstrap/helpers/docker.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -359,8 +359,11 @@ function fqdnLabelsForTraefik(string $uuid, Collection $domains, bool $is_force_
359359
$https_label = "https-{$loop}-{$uuid}-{$service_name}";
360360
}
361361
if (str($image)->contains('ghost')) {
362-
$labels->push("traefik.http.middlewares.redir-ghost.redirectregex.regex=^{$path}/(.*)");
363-
$labels->push('traefik.http.middlewares.redir-ghost.redirectregex.replacement=/$1');
362+
$labels->push("traefik.http.middlewares.redir-ghost-{$uuid}.redirectregex.regex=^{$path}/(.*)");
363+
$labels->push("traefik.http.middlewares.redir-ghost-{$uuid}.redirectregex.replacement=/$1");
364+
$labels->push("caddy_{$loop}.handle_path.{$loop}_redir-ghost-{$uuid}.handler=rewrite");
365+
$labels->push("caddy_{$loop}.handle_path.{$loop}_redir-ghost-{$uuid}.rewrite.regexp=^{$path}/(.*)");
366+
$labels->push("caddy_{$loop}.handle_path.{$loop}_redir-ghost-{$uuid}.rewrite.replacement=/$1");
364367
}
365368

366369
$to_www_name = "{$loop}-{$uuid}-to-www";

config/sentry.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
// The release version of your application
99
// Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
10-
'release' => '4.0.0-beta.363',
10+
'release' => '4.0.0-beta.364',
1111

1212
// When left empty or `null` the Laravel environment will be used
1313
'environment' => config('app.env'),

config/version.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<?php
22

3-
return '4.0.0-beta.363';
3+
return '4.0.0-beta.364';

resources/views/livewire/project/application/general.blade.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
</div>
7171
<div class="flex items-end gap-2">
7272
<x-forms.select label="Direction" id="application.redirect" required
73-
helper="You need to add both the www and non-www A DNS records pointing to your server.">
73+
helper="You must need to add www and non-www as an A DNS record. Make sure the www domain is added under Domains.">
7474
<option value="both">Allow www & non-www.</option>
7575
<option value="www">Redirect to www.</option>
7676
<option value="non-www">Redirect to non-www.</option>

resources/views/livewire/project/new/github-private-repository.blade.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div>
22
<div class="flex items-end gap-2">
33
<h1>Create a new Application</h1>
4-
<x-modal-input buttonTitle="+ Add GitHub App" title="New GitHub App">
4+
<x-modal-input buttonTitle="+ Add GitHub App" title="New GitHub App" closeOutside="false">
55
<livewire:source.github.create />
66
</x-modal-input>
77
@if ($repositories->count() > 0)

resources/views/livewire/project/shared/scheduled-task/all.blade.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<div>
22
<div class="flex gap-2">
33
<h2>Scheduled Tasks</h2>
4-
<x-modal-input buttonTitle="+ Add" title="New Scheduled Task" :closeOutside=false>
4+
<x-modal-input buttonTitle="+ Add" title="New Scheduled Task" :closeOutside="false">
55
@if ($resource->type() == 'application')
6-
<livewire:project.shared.scheduled-task.add :type="$resource->type()" :containerNames="$containerNames"/>
6+
<livewire:project.shared.scheduled-task.add :type="$resource->type()" :containerNames="$containerNames" />
77
@elseif ($resource->type() == 'service')
8-
<livewire:project.shared.scheduled-task.add :type="$resource->type()" :containerNames="$containerNames"/>
8+
<livewire:project.shared.scheduled-task.add :type="$resource->type()" :containerNames="$containerNames" />
99
@endif
1010
</x-modal-input>
1111
</div>

resources/views/livewire/server/show.blade.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class="overflow-auto overflow-x-hidden absolute z-50 mt-1 w-64 max-h-60 bg-white
124124
<template
125125
x-for="timezone in timezones.filter(tz => tz.toLowerCase().includes(search.toLowerCase()))"
126126
:key="timezone">
127-
<div @click="search = timezone; open = false; $wire.set('server.settings.server_timezone', timezone)"
127+
<div @click="search = timezone; open = false; $wire.set('serverTimezone', timezone)"
128128
class="px-4 py-2 text-gray-800 cursor-pointer hover:bg-gray-100 dark:hover:bg-coolgray-300 dark:text-gray-200"
129129
x-text="timezone"></div>
130130
</template>

resources/views/livewire/settings/index.blade.php

+33-23
Original file line numberDiff line numberDiff line change
@@ -130,29 +130,39 @@ class="px-4 py-2 cursor-pointer hover:bg-gray-100 dark:hover:bg-coolgray-300 tex
130130
</div>
131131

132132
<h4 class="py-4">Confirmation Settings</h4>
133-
@if ($disable_two_step_confirmation)
134-
<div class="md:w-96 pb-4">
135-
<x-forms.checkbox instantSave id="disable_two_step_confirmation" label="Disable Two Step Confirmation"
136-
helper="When disabled, you will not need to confirm actions with a text and user password. This significantly reduces security and may lead to accidental deletions or unwanted changes. Use with extreme caution, especially on production servers." />
137-
</div>
138-
@else
139-
<div class="md:w-96 pb-4">
140-
<x-modal-confirmation title="Disable Two Step Confirmation?"
141-
buttonTitle="Disable Two Step Confirmation" isErrorButton submitAction="toggleTwoStepConfirmation"
142-
:actions="[
143-
'Tow Step confimation will be disabled globally.',
144-
'Disabling two step confirmation reduces security (as anyone can easily delete anything).',
145-
'The risk of accidental actions will increase.',
146-
]" confirmationText="DISABLE TWO STEP CONFIRMATION"
147-
confirmationLabel="Please type the confirmation text to disable two step confirmation."
148-
shortConfirmationLabel="Confirmation text" step3ButtonText="Disable Two Step Confirmation" />
149-
</div>
150-
<div class="p-4 mb-4 text-white border-l-4 border-red-500 bg-error md:w-[40rem] w-full mb-32">
151-
<p class="font-bold">Warning!</p>
152-
<p>Disabling two step confirmation reduces security (as anyone can easily delete anything) and increases
153-
the
154-
risk of accidental actions. This is not recommended for production servers.</p>
133+
<div x-data="{ open: false }" class="mb-32 md:w-[40rem]">
134+
<button type="button" @click.prevent="open = !open" class="flex items-center justify-between w-full p-4 bg-coolgray-100 hover:bg-coolgray-200 rounded-md">
135+
<span class="font-medium">Two-Step Confirmation Settings</span>
136+
<svg class="w-5 h-5 transition-transform" :class="{ 'rotate-180': open }" fill="none" stroke="currentColor" viewBox="0 0 24 24">
137+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7" />
138+
</svg>
139+
</button>
140+
141+
<div x-show="open" x-transition class="mt-4">
142+
@if ($disable_two_step_confirmation)
143+
<div class="md:w-96 pb-4">
144+
<x-forms.checkbox instantSave id="disable_two_step_confirmation" label="Disable Two Step Confirmation"
145+
helper="When disabled, you will not need to confirm actions with a text and user password. This significantly reduces security and may lead to accidental deletions or unwanted changes. Use with extreme caution, especially on production servers." />
146+
</div>
147+
@else
148+
<div class="md:w-96 pb-4">
149+
<x-modal-confirmation title="Disable Two Step Confirmation?"
150+
buttonTitle="Disable Two Step Confirmation" isErrorButton submitAction="toggleTwoStepConfirmation"
151+
:actions="[
152+
'Tow Step confimation will be disabled globally.',
153+
'Disabling two step confirmation reduces security (as anyone can easily delete anything).',
154+
'The risk of accidental actions will increase.',
155+
]" confirmationText="DISABLE TWO STEP CONFIRMATION"
156+
confirmationLabel="Please type the confirmation text to disable two step confirmation."
157+
shortConfirmationLabel="Confirmation text" step3ButtonText="Disable Two Step Confirmation" />
158+
</div>
159+
<div class="w-full px-4 py-2 mb-4 text-white rounded-sm border-l-4 border-red-500 bg-error">
160+
<p class="font-bold">Warning!</p>
161+
<p>Disabling two step confirmation reduces security (as anyone can easily delete anything) and increases
162+
the risk of accidental actions. This is not recommended for production servers.</p>
163+
</div>
164+
@endif
155165
</div>
156-
@endif
166+
</div>
157167
</form>
158168
</div>

resources/views/source/all.blade.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
</x-slot>
55
<div class="flex items-start gap-2">
66
<h1>Sources</h1>
7-
<x-modal-input buttonTitle="+ Add" title="New GitHub App">
7+
<x-modal-input buttonTitle="+ Add" title="New GitHub App" :closeOutside="false">
88
<livewire:source.github.create />
99
</x-modal-input>
1010
</div>

resources/views/source/github/new.blade.php

-4
This file was deleted.

resources/views/source/new.blade.php

-22
This file was deleted.

versions.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"coolify": {
33
"v4": {
4-
"version": "4.0.0-beta.363"
4+
"version": "4.0.0-beta.364"
55
},
66
"nightly": {
7-
"version": "4.0.0-beta.364"
7+
"version": "4.0.0-beta.365"
88
},
99
"helper": {
1010
"version": "1.0.3"
@@ -16,4 +16,4 @@
1616
"version": "0.0.15"
1717
}
1818
}
19-
}
19+
}

0 commit comments

Comments
 (0)