mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-25 00:50:32 +00:00
update
This commit is contained in:
parent
93558a2b74
commit
8cb73da74c
2 changed files with 20 additions and 0 deletions
|
@ -4,6 +4,7 @@ namespace Modules\Microweber\Filament\Clusters\Microweber\Pages;
|
|||
|
||||
use App\ShellApi;
|
||||
use Filament\Pages\Page;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use MicroweberPackages\ComposerClient\Client;
|
||||
use MicroweberPackages\SharedServerScripts\MicroweberAppPathHelper;
|
||||
use MicroweberPackages\SharedServerScripts\MicroweberDownloader;
|
||||
|
@ -35,6 +36,8 @@ class Version extends Page
|
|||
|
||||
public $supportedLanguages = [];
|
||||
|
||||
public $downloadingNow = false;
|
||||
|
||||
protected function getViewData(): array
|
||||
{
|
||||
$mwComposerClientHelper = new MicroweberComposerClientHelper();
|
||||
|
@ -48,6 +51,11 @@ class Version extends Page
|
|||
$this->currentVersionOfApp = $sharedPath->getCurrentVersion();
|
||||
$this->latestDownloadDateOfApp = $sharedPath->getCreatedAt();
|
||||
|
||||
$findJob = DB::table('jobs')->where('payload', 'like', '%DownloadMicroweber%')->get();
|
||||
if ($findJob->count() > 0) {
|
||||
$this->downloadingNow = true;
|
||||
}
|
||||
|
||||
return [
|
||||
'appVersion' => $this->currentVersionOfApp,
|
||||
'latestAppVersion' => $this->latestVersionOfApp,
|
||||
|
|
|
@ -35,8 +35,20 @@
|
|||
Your app and templates is up-to-date!
|
||||
</div>--}}
|
||||
|
||||
@if($downloadingNow)
|
||||
<div class="flex gap-2 items-center p-4 text-white rounded bg-green-500/90 dark:bg-green-500/30">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
|
||||
<path fill="none" stroke="currentColor" stroke-dasharray="15" stroke-dashoffset="15" stroke-linecap="round" stroke-width="2" d="M12 3C16.9706 3 21 7.02944 21 12">
|
||||
<animate fill="freeze" attributeName="stroke-dashoffset" dur="0.3s" values="15;0" />
|
||||
<animateTransform attributeName="transform" dur="1.5s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12" />
|
||||
</path>
|
||||
</svg>
|
||||
Downloading new app version...
|
||||
</div>
|
||||
@else
|
||||
<x-filament::button wire:click="checkForUpdates" class="w-[16rem]">
|
||||
Check for updates
|
||||
</x-filament::button>
|
||||
@endif
|
||||
|
||||
</x-filament-panels::page>
|
||||
|
|
Loading…
Reference in a new issue