peliprint/resources/views/admin/extensions/blueprint/index.blade.php

146 lines
8.3 KiB
PHP
Raw Normal View History

@extends('layouts.admin')
@section('title')
Blueprint
@endsection
@section('content-header')
<img src="/assets/extensions/blueprint/logo.jpg" alt="logo" style="float:left;width:30px;height:30px;border-radius:3px;margin-right:5px;">
<h1 ext-title>Blueprint<tag mg-left blue>{{ $bp->version() }}</tag></h1>
<ol class="breadcrumb">
<li><a href="{{ route('admin.index') }}">Admin</a></li>
<li><a href="{{ route('admin.extensions') }}">Extensions</a></li>
<li class="active">Blueprint</li>
</ol>
@endsection
@section('content')
{{ $bp->rlKey() }}
2023-04-11 15:54:57 -04:00
{{ $telemetry->send("SERVE_BLUEPRINT_ADMIN") }}
<p>Blueprint is the framework that powers all Blueprint-compatible extensions, enabling multiple extensions to be installed and used simultaneously.</p>
<div class="row">
<div class="col-xs-3">
<!-- Overview -->
<div class="box">
<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>
</div>
</div>
2023-04-09 15:15:11 -04:00
<!-- Terminal -->
@if ($c)
@if($bp->dbGet('developer') == "true")
<div class="box">
<div class="box-header with-border">
<h3 class="box-title"><i class='bx bxs-terminal' style='margin-right:5px;'></i>Terminal</h3>
</div>
<div class="box-body">
<form action="" method="POST">
2023-04-09 15:15:11 -04:00
<div class="col-xs-12" style="padding-top:5px;">
<input type="text" required name="developer:cmd" id="developer:cmd" value="{{ $bp->dbGet('developer:cmd') }}" class="form-control" style="height:40px;width:100%;"/>
{{ csrf_field() }}
<button type="submit" name="_method" value="PATCH" class="btn btn-gray-alt btn-sm pull-right" style="display:none;">Send</button>
</div>
2023-04-09 15:15:11 -04:00
<div class="col-xs-12" style="padding-top:10px;">
@if($bp->dbGet('developer:log') != "")
<code>{{ $bp->dbGet('developer:log') }}</code>
@endif
</div>
</form>
</div>
</div>
2023-04-09 15:15:11 -04:00
{{ $bp->dbSet('developer:log', '') }}
{{ $bp->dbSet('developer:cmd', '') }}
@endif
@endif
<!-- License -->
<div class="box">
<div class="box-header with-border">
<h3 class="box-title"><i class='bx bxs-pen' style='margin-right:5px;'></i>License</h3>
</div>
<div class="box-body">
@if ($b)
<input type="text" id="license" value="{{ $bp->licenseKeyCensored() }}" class="form-control" style="letter-spacing: 3px;" readonly/>
<p class="text-muted small">Your license key is valid. <a data-toggle="modal" data-target="#licenseMoreInfo">Learn more</a></p>
@else
<input type="text" id="license" value="{{ $bp->licenseKeyCensored() }}" class="form-control" style="letter-spacing: 3px;" readonly/>
<p class="text-muted small">Your license key could not be validated. <a data-toggle="modal" data-target="#licenseMoreInfo">Learn more</a></p>
@endif
</div>
</div>
</div>
<div class="col-xs-9">
<form action="" method="POST">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title"><i class='bx bxs-cog' style='margin-right:5px;'></i>Configuration</h3>
</div>
<div class="box-body">
<div class="row">
<div class="col-xs-4">
2023-04-10 15:59:20 -04:00
<label class="control-label">Telemetry</label>
<select class="form-control" name="telemetry">
<option value="true">Enabled</option>
<option value="false" @if($bp->dbGet('telemetry') == "false") selected @endif>Disabled</option>
</select>
<p class="text-muted small">Automatically share anonymous usage data with Blueprint.</p>
</div>
<div class="col-xs-4">
2023-04-09 15:59:41 -04:00
<label class="control-label">Endpoint</label>
<select class="form-control" name="api:endpoint">
<option value="api.ptero.shop">api.ptero.shop (default)</option>
<option value="blueprint.prpl.wtf" @if($bp->dbGet('api:endpoint') == "blueprint.prpl.wtf") selected @endif>blueprint.prpl.wtf</option>
</select>
2023-04-09 15:59:41 -04:00
<p class="text-muted small">Select your preferred API endpoint.</p>
</div>
<div class="col-xs-4">
<label class="control-label">Developer Mode</label>
<select class="form-control" name="developer">
<option value="true">Enabled</option>
<option value="false" @if($bp->dbGet('developer') != "true") selected @endif>Disabled</option>
</select>
<p class="text-muted small">Enable or disable developer-oriented features.</p>
</div>
</div>
</div>
<div class="box-footer">
@if ($a)
{{ csrf_field() }}
<button type="submit" name="_method" value="PATCH" class="btn btn-gray-alt btn-sm pull-right">Save</button>
@else
<p class="text-muted small">You are required to have a valid license key attached in order to save any settings.</p>
@endif
</div>
</div>
</form>
</div>
</div>
<div class="modal fade" id="licenseMoreInfo" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<i class='bx bxs-pen' style='margin-right:6px;float:left;font-size:23px;'></i><h4 class="modal-title" style="font-size:19px;">License</h4>
</div>
<div class="modal-body">
<p>
Every purchase comes with a unique license key pre-installed into your Blueprint files, which allows our license system to function without requiring any user input.
Most of the time, this system does not affect the user experience. However, in rare cases, our validation server may be offline and unable to validate licenses.
If this occurs, it should automatically resolve itself within 24 hours.
<br><br>
Some data, such as IP addresses and licenses, may be shared with the Blueprint team to enable our license system to function properly. This also allows us to revoke licenses remotely in case of abuse or piracy.
</p>
</div>
<div class="modal-footer">
<button class="btn btn-gray-alt btn-sm pull-right" data-dismiss="modal" aria-label="Close">Close</button>
</div>
</div>
</div>
</div>
@endsection