Skip to content

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.

fix

Andras Bacsai9d6557bacb92
diff --git a/app/Http/Livewire/Project/Application/Previews.php b/app/Http/Livewire/Project/Application/Previews.php
index da1f0da751..8b26b7bc28 100644
--- a/app/Http/Livewire/Project/Application/Previews.php
+++ b/app/Http/Livewire/Project/Application/Previews.php
@@ -87,4 +87,10 @@ class Previews extends Component
return general_error_handler(err: $e, that: $this);
}
}
+ public function previewRefresh()
+ {
+ $this->application->previews->each(function ($preview) {
+ $preview->refresh();
+ });
+ }
}
diff --git a/app/Http/Livewire/Upgrade.php b/app/Http/Livewire/Upgrade.php
index 3e8c7b6af4..8d3930bc49 100644
--- a/app/Http/Livewire/Upgrade.php
+++ b/app/Http/Livewire/Upgrade.php
@@ -24,6 +24,9 @@ class Upgrade extends Component
public function upgrade()
{
try {
+ if ($this->showProgress) {
+ return;
+ }
$this->showProgress = true;
resolve(UpdateCoolify::class)(true);
Toaster::success("Upgrading to {$this->latestVersion} version...");
diff --git a/config/version.php b/config/version.php
index 5aee348872..6fa9f0eb6f 100644
--- a/config/version.php
+++ b/config/version.php
@@ -1,3 +1,3 @@
<?php
-return '4.0.0-nightly.21';
+return '4.0.0-nightly.22';
diff --git a/resources/views/components/forms/input.blade.php b/resources/views/components/forms/input.blade.php
index e20e890779..647139ad59 100644
--- a/resources/views/components/forms/input.blade.php
+++ b/resources/views/components/forms/input.blade.php
@@ -17,9 +17,9 @@
@if ($type === 'password')
<div class="w-full rounded join" x-data>
<input {{ $attributes }} class="join-item" wire:model.defer={{ $id }}
- wire:dirty.class="input-warning" @readonly($readonly) @disabled($disabled)
- type={{ $type }} id={{ $id }} name={{ $name }}
- @isset($value) value={{ $value }} @endisset
+ wire:dirty.class="input-warning" wire:loading.attr='disabled' @readonly($readonly)
+ @disabled($disabled) type={{ $type }} id={{ $id }}
+ name={{ $name }} @isset($value) value={{ $value }} @endisset
@isset($placeholder) placeholder={{ $placeholder }} @endisset>
@if (!$cannotPeakPassword)
<span x-on:click="changePasswordFieldType" x-cloak @class([
@@ -41,8 +41,9 @@
</div>
@else
<input {{ $attributes }} id={{ $id }} name={{ $name }}
- wire:model.defer={{ $id }} wire:dirty.class="input-warning" @readonly($readonly)
- @disabled($disabled) @isset($value) value={{ $value }} @endisset
+ wire:model.defer={{ $id }} wire:dirty.class="input-warning" wire:loading.attr='disabled'
+ @readonly($readonly) @disabled($disabled)
+ @isset($value) value={{ $value }} @endisset
@isset($placeholder) placeholder={{ $placeholder }} @endisset>
@endif
@if (!$label && $helper)
diff --git a/resources/views/components/layout.blade.php b/resources/views/components/layout.blade.php
index d051a2ff30..5d6f107968 100644
--- a/resources/views/components/layout.blade.php
+++ b/resources/views/components/layout.blade.php
@@ -66,6 +66,7 @@
}
function revive() {
+ if (checkHealthInterval) return true;
console.log('Checking server\'s health...')
checkHealthInterval = setInterval(() => {
fetch('/api/health')
@@ -85,6 +86,7 @@
}
function upgrade() {
+ if (checkIfIamDeadInterval) return true;
console.log('Update initiated.')
checkIfIamDeadInterval = setInterval(() => {
fetch('/api/health')
diff --git a/resources/views/components/naked-modal.blade.php b/resources/views/components/naked-modal.blade.php
index 203f041e8d..426fe1876e 100644
--- a/resources/views/components/naked-modal.blade.php
+++ b/resources/views/components/naked-modal.blade.php
@@ -29,7 +29,7 @@
</div>
</div>
<div class="gap-4 pt-10 sm:mt-4 sm:flex">
- <x-forms.button class="w-24 bg-coolgray-100 hover:bg-coolgray-100"
+ <x-forms.button class="w-24 bg-coolgray-200 hover:bg-coolgray-100"
x-on:click="{{ $show }} = false" type="button">Cancel
</x-forms.button>
<div class="flex-1"></div>
diff --git a/resources/views/livewire/project/application/previews.blade.php b/resources/views/livewire/project/application/previews.blade.php
index 4f0f24a6df..85ea12b020 100644
--- a/resources/views/livewire/project/application/previews.blade.php
+++ b/resources/views/livewire/project/application/previews.blade.php
@@ -48,7 +48,7 @@
@endif
</div>
@if ($application->previews->count() > 0)
- <h4 class="pt-4">Preview Deployments</h4>
+ <h4 class="py-4" wire:poll.10000ms='previewRefresh'>Deployed Previews</h4>
<div class="flex gap-6 ">
@foreach ($application->previews as $preview)
<div class="flex flex-col p-4 bg-coolgray-200 " x-init="$wire.loadStatus('{{ data_get($preview, 'pull_request_id') }}')">
diff --git a/resources/views/livewire/upgrade.blade.php b/resources/views/livewire/upgrade.blade.php
index 354c511fe8..3d9b76d9c5 100644
--- a/resources/views/livewire/upgrade.blade.php
+++ b/resources/views/livewire/upgrade.blade.php
@@ -1,6 +1,6 @@
<li title="New version available" x-init="$wire.checkUpdate" x-data>
@if ($isUpgradeAvailable)
- <div wire:click='upgrade' class="hover:bg-transparent focus:bg-transparent" x-on:click="upgrade" <button>
+ <button wire:click='upgrade' class="hover:bg-transparent focus:bg-transparent" x-on:click="upgrade">
@if ($showProgress)
<svg xmlns="http://www.w3.org/2000/svg"
class="w-6 h-6 text-pink-500 transition-colors hover:text-pink-300 lds-heart" viewBox="0 0 24 24"
@@ -21,7 +21,7 @@
<path d="M9 18h6" />
</svg>
@endif
- </button>
+ </button>
</div>
@endif
</li>
diff --git a/versions.json b/versions.json
index 698749b353..3b0f5dc071 100644
--- a/versions.json
+++ b/versions.json
@@ -4,7 +4,7 @@
"version": "3.12.32"
},
"v4": {
- "version": "4.0.0-nightly.21"
+ "version": "4.0.0-nightly.22"
}
}
}
\ No newline at end of file