Add more comments and make code more readable.

This commit is contained in:
purple 2023-08-29 14:18:07 +02:00
parent c9ebaaa882
commit bc93e6d4c3
3 changed files with 15 additions and 1 deletions

View file

@ -43,11 +43,14 @@ class BlueprintExtensionController extends Controller
*/
public function index(): View
{
// The following code rerolls the panel identifier used for telemetry
// when the version name changes.
if ($this->settings->get('blueprint::panel:id') == "" || $this->bp->version() != $this->settings->get('blueprint::version:cache')) {
$this->settings->set('blueprint::panel:id', uniqid(rand())."@".$this->bp->version());
$this->settings->set('blueprint::version:cache', $this->bp->version());
$this->bp->config('TELEMETRY_ID',$this->settings->get("blueprint::panel:id"));
};
// Sync developer mode option with the core of Blueprint.
$this->bp->config('DEVELOPER', $this->settings->get('blueprint::developer'));
return $this->view->make(
'admin.extensions.blueprint.index', [

View file

@ -16,8 +16,13 @@
@if(($bp->isInstalled() != "NOTINSTALLED") && ($bp->version() != "&bp.version"."&"))
<div class="col-xs-6 col-sm-3 text-center">
<a href="{{ route('admin.extensions.blueprint.index') }}"><button class="btn btn-gray" style="width:100%;margin-bottom:17px;"><img src="/assets/extensions/blueprint/logo.jpg" alt="logo" class="img-btn"> Blueprint <small>{{ $bp->version() }}</small></button></a>
<a href="{{ route('admin.extensions.blueprint.index') }}">
<button class="btn btn-gray" style="width:100%;margin-bottom:17px;">
<img src="/assets/extensions/blueprint/logo.jpg" alt="logo" class="img-btn"> Blueprint <small>{{ $bp->version() }}</small>
</button>
</a>
</div>
<!--␀replace␀-->
@else

View file

@ -45,6 +45,12 @@
@yield('above-container')
@yield('container')
@yield('below-container')
<!--
Blueprint extensions containing dashboard wrappers
will have their wrapper code injected here.
-->
<!-- wrapper:insert -->
@show
@section('scripts')