This commit is contained in:
Andras Bacsai 2023-06-16 21:16:30 +02:00
parent a4c5105d78
commit 9d6557bacb
9 changed files with 23 additions and 11 deletions

View File

@ -87,4 +87,10 @@ public function stop(int $pull_request_id)
return general_error_handler(err: $e, that: $this);
}
}
public function previewRefresh()
{
$this->application->previews->each(function ($preview) {
$preview->refresh();
});
}
}

View File

@ -24,6 +24,9 @@ public function checkUpdate()
public function upgrade()
{
try {
if ($this->showProgress) {
return;
}
$this->showProgress = true;
resolve(UpdateCoolify::class)(true);
Toaster::success("Upgrading to {$this->latestVersion} version...");

View File

@ -1,3 +1,3 @@
<?php
return '4.0.0-nightly.21';
return '4.0.0-nightly.22';

View File

@ -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)

View File

@ -66,6 +66,7 @@ function changePasswordFieldType(event) {
}
function revive() {
if (checkHealthInterval) return true;
console.log('Checking server\'s health...')
checkHealthInterval = setInterval(() => {
fetch('/api/health')
@ -85,6 +86,7 @@ function revive() {
}
function upgrade() {
if (checkIfIamDeadInterval) return true;
console.log('Update initiated.')
checkIfIamDeadInterval = setInterval(() => {
fetch('/api/health')

View File

@ -29,7 +29,7 @@ class="flex items-center justify-center flex-shrink-0 w-12 h-12 mx-auto rounded-
</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>

View File

@ -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') }}')">

View File

@ -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"

View File

@ -4,7 +4,7 @@
"version": "3.12.32"
},
"v4": {
"version": "4.0.0-nightly.21"
"version": "4.0.0-nightly.22"
}
}
}