feat(bpview): add outdated version warning

This commit is contained in:
purple 2023-11-06 13:29:40 +01:00
parent 8097ec517a
commit a0c0bc8ca7
2 changed files with 3 additions and 7 deletions

View file

@ -45,9 +45,6 @@ class BlueprintExtensionController extends Controller
public function index(): View
{
Artisan::call("bp:sync");
$verlatest = Artisan::call("bp:latest");
if($this->bp->version() != $verlatest) { $outdated = true; }
return $this->view->make(
'admin.extensions.blueprint.index', [
'version' => $this->version,
@ -55,8 +52,7 @@ class BlueprintExtensionController extends Controller
'bp' => $this->bp,
'bplib' => $this->bplib,
'telemetry' => $this->telemetry,
'verlatest' => $verlatest,
'veroutdated' => $outdated,
'versionLatest' => $this->bp->latestVersion(),
'root' => "/admin/extensions/blueprint",
]

View file

@ -20,12 +20,12 @@
<div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
<!-- Overview -->
<div class="box @if($veroutdated) box-danger @endif">
<div class="box @if($versionLatest != $bp->version()) box-danger @endif">
<div class="box-header with-border">
<h3 class="box-title"><i class='bx bxs-shapes' style='margin-right:5px;'></i></i>Overview</h3>
</div>
<div class="box-body">
<p>You are currently using version <code>{{ $bp->version() }}</code>.</p>
<p>You are currently using version <code>{{ $bp->version() }}</code>@if($versionLatest != $bp->version()) which is outdated. Please update to a newer release shortly. @else. @endif</p>
</div>
</div>