Skip to content

Commit 092bd91

Browse files
authored
Merge pull request #4306 from coollabsio/next
v4.0.0-beta.370
2 parents 73af96e + 1fc4c78 commit 092bd91

File tree

9 files changed

+39
-25
lines changed

9 files changed

+39
-25
lines changed

app/Models/PrivateKey.php

+3-4
Original file line numberDiff line numberDiff line change
@@ -219,15 +219,14 @@ public static function generateFingerprint($privateKey)
219219
private static function fingerprintExists($fingerprint, $excludeId = null)
220220
{
221221
$query = self::query()
222-
->where('fingerprint', $fingerprint);
222+
->where('fingerprint', $fingerprint)
223+
->where('id', '!=', $excludeId);
223224

224225
if (currentTeam()) {
225226
$query->where('team_id', currentTeam()->id);
226227
}
227228

228-
return $query
229-
->when($excludeId, fn ($query) => $query->where('id', '!=', $excludeId))
230-
->exists();
229+
return $query->exists();
231230
}
232231

233232
public static function cleanupUnusedKeys()

app/View/Components/Forms/Checkbox.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,14 @@ public function __construct(
1717
public ?string $value = null,
1818
public ?string $label = null,
1919
public ?string $helper = null,
20+
public string|bool|null $checked = false,
2021
public string|bool $instantSave = false,
2122
public bool $disabled = false,
2223
public string $defaultClass = 'dark:border-neutral-700 text-coolgray-400 focus:ring-warning dark:bg-coolgray-100 rounded cursor-pointer dark:disabled:bg-base dark:disabled:cursor-not-allowed',
2324
) {
24-
//
25+
if ($this->disabled) {
26+
$this->defaultClass .= ' opacity-40';
27+
}
2528
}
2629

2730
/**

bootstrap/helpers/docker.php

+16-8
Original file line numberDiff line numberDiff line change
@@ -227,13 +227,17 @@ function generateServiceSpecificFqdns(ServiceApplication|Application $resource)
227227
$MINIO_BROWSER_REDIRECT_URL = $variables->where('key', 'MINIO_BROWSER_REDIRECT_URL')->first();
228228
$MINIO_SERVER_URL = $variables->where('key', 'MINIO_SERVER_URL')->first();
229229

230-
if (str($MINIO_BROWSER_REDIRECT_URL->value)->isEmpty()) {
231-
$MINIO_BROWSER_REDIRECT_URL?->update([
230+
if (is_null($MINIO_BROWSER_REDIRECT_URL) || is_null($MINIO_SERVER_URL)) {
231+
return collect([]);
232+
}
233+
234+
if (str($MINIO_BROWSER_REDIRECT_URL->value ?? '')->isEmpty()) {
235+
$MINIO_BROWSER_REDIRECT_URL->update([
232236
'value' => generateFqdn($server, 'console-'.$uuid, true),
233237
]);
234238
}
235-
if (str($MINIO_SERVER_URL->value)->isEmpty()) {
236-
$MINIO_SERVER_URL?->update([
239+
if (str($MINIO_SERVER_URL->value ?? '')->isEmpty()) {
240+
$MINIO_SERVER_URL->update([
237241
'value' => generateFqdn($server, 'minio-'.$uuid, true),
238242
]);
239243
}
@@ -246,13 +250,17 @@ function generateServiceSpecificFqdns(ServiceApplication|Application $resource)
246250
$LOGTO_ENDPOINT = $variables->where('key', 'LOGTO_ENDPOINT')->first();
247251
$LOGTO_ADMIN_ENDPOINT = $variables->where('key', 'LOGTO_ADMIN_ENDPOINT')->first();
248252

249-
if (str($LOGTO_ENDPOINT?->value)->isEmpty()) {
250-
$LOGTO_ENDPOINT?->update([
253+
if (is_null($LOGTO_ENDPOINT) || is_null($LOGTO_ADMIN_ENDPOINT)) {
254+
return collect([]);
255+
}
256+
257+
if (str($LOGTO_ENDPOINT->value ?? '')->isEmpty()) {
258+
$LOGTO_ENDPOINT->update([
251259
'value' => generateFqdn($server, 'logto-'.$uuid),
252260
]);
253261
}
254-
if (str($LOGTO_ADMIN_ENDPOINT?->value)->isEmpty()) {
255-
$LOGTO_ADMIN_ENDPOINT?->update([
262+
if (str($LOGTO_ADMIN_ENDPOINT->value ?? '')->isEmpty()) {
263+
$LOGTO_ADMIN_ENDPOINT->update([
256264
'value' => generateFqdn($server, 'logto-admin-'.$uuid),
257265
]);
258266
}

config/constants.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
return [
44
'coolify' => [
5-
'version' => '4.0.0-beta.369',
5+
'version' => '4.0.0-beta.370',
66
'self_hosted' => env('SELF_HOSTED', true),
7-
'autoupdate' => env('AUTOUPDATE', false),
7+
'autoupdate' => env('AUTOUPDATE'),
88
'base_config_path' => env('BASE_CONFIG_PATH', '/data/coolify'),
99
'helper_image' => env('HELPER_IMAGE', 'ghcr.io/coollabsio/coolify-helper'),
1010
'is_windows_docker_desktop' => env('IS_WINDOWS_DOCKER_DESKTOP', false),

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.369';
3+
return '4.0.0-beta.370';

resources/views/components/forms/checkbox.blade.php

+8-4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
'disabled' => false,
66
'instantSave' => false,
77
'value' => null,
8+
'checked' => false,
89
'hideLabel' => false,
910
'fullWidth' => false,
1011
])
@@ -14,7 +15,9 @@
1415
'w-full' => $fullWidth,
1516
])>
1617
@if (!$hideLabel)
17-
<label @class(['flex gap-4 items-center px-0 min-w-fit label w-full cursor-pointer', 'opacity-40' => $disabled])>
18+
<label @class([
19+
'flex gap-4 items-center px-0 min-w-fit label w-full cursor-pointer',
20+
])>
1821
<span class="flex flex-grow gap-2">
1922
@if ($label)
2023
{!! $label !!}
@@ -26,9 +29,10 @@
2629
@endif
2730
</span>
2831
@endif
29-
<input @disabled($disabled) type="checkbox" {{ $attributes->merge(['class' => $defaultClass]) }}
30-
@if ($instantSave) wire:loading.attr="disabled" wire:click='{{ $instantSave === 'instantSave' || $instantSave == '1' ? 'instantSave' : $instantSave }}'
31-
wire:model={{ $id }} @else wire:model={{ $value ?? $id }} @endif />
32+
<input @disabled($disabled) type="checkbox" {{ $attributes->merge(['class' => $defaultClass]) }}
33+
@if ($instantSave) wire:loading.attr="disabled" wire:click='{{ $instantSave === 'instantSave' || $instantSave == '1' ? 'instantSave' : $instantSave }}'
34+
@if ($checked) checked @endif
35+
wire:model={{ $id }} @else wire:model={{ $value ?? $id }} @endif />
3236
@if (!$hideLabel)
3337
</label>
3438
@endif

resources/views/components/modal-input.blade.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class="relative w-auto h-auto" wire:ignore>
2727
@endif
2828
<template x-teleport="body">
2929
<div x-show="modalOpen"
30-
class="fixed top-0 left-0 lg:px-0 px-4 z-[99] flex items-center justify-center w-screen h-screen" x-cloak>
30+
class="fixed top-0 left-0 lg:px-0 px-4 z-[99] flex items-center justify-center w-screen h-screen">
3131
<div x-show="modalOpen" x-transition:enter="ease-out duration-100" x-transition:enter-start="opacity-0"
3232
x-transition:enter-end="opacity-100" x-transition:leave="ease-in duration-100"
3333
x-transition:leave-start="opacity-100" x-transition:leave-end="opacity-0"

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class="px-4 py-2 text-gray-800 cursor-pointer hover:bg-gray-100 dark:hover:bg-co
103103
@if (!is_null(config('constants.coolify.autoupdate', null)))
104104
<div class="text-right md:w-96">
105105
<x-forms.checkbox instantSave helper="AUTOUPDATE is set in .env file, you need to modify it there."
106-
disabled id="is_auto_update_enabled" label="Enabled" />
106+
disabled checked="{{ config('constants.coolify.autoupdate') }}" label="Auto Update Enabled" />
107107
</div>
108108
@else
109109
<x-forms.checkbox instantSave id="is_auto_update_enabled" label="Auto Update Enabled" />

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.369"
4+
"version": "4.0.0-beta.370"
55
},
66
"nightly": {
7-
"version": "4.0.0-beta.370"
7+
"version": "4.0.0-beta.371"
88
},
99
"helper": {
1010
"version": "1.0.4"
@@ -16,4 +16,4 @@
1616
"version": "0.0.15"
1717
}
1818
}
19-
}
19+
}

0 commit comments

Comments
 (0)