2022-05-24 15:30:22 +02:00
|
|
|
@extends('layouts.updater')
|
|
|
|
|
|
|
|
@Push('updater-body')
|
2022-05-26 11:10:05 +02:00
|
|
|
<div class="container">
|
2022-05-25 16:19:20 +02:00
|
|
|
|
|
|
|
<?php // Requests newest version from server and sets it as variable
|
2022-05-30 11:39:39 +02:00
|
|
|
$Vgit = file_get_contents("https://julianprieber.github.io/littlelink-custom/version.json");
|
2022-05-25 16:19:20 +02:00
|
|
|
|
|
|
|
// Requests current version from the local version file and sets it as variable
|
2022-06-01 21:06:47 +02:00
|
|
|
$Vlocal = file_get_contents(base_path("version.json"));
|
2022-05-25 16:19:20 +02:00
|
|
|
?>
|
2022-05-28 14:03:49 +02:00
|
|
|
@if(auth()->user()->role == 'admin' and $Vgit > $Vlocal or env('JOIN_BETA') === true)
|
2022-05-25 16:19:20 +02:00
|
|
|
|
|
|
|
@if($_SERVER['QUERY_STRING'] === '')
|
|
|
|
<?php //landing page ?>
|
2022-05-26 11:10:05 +02:00
|
|
|
|
2022-05-24 15:30:22 +02:00
|
|
|
<div class="logo-container fadein">
|
2022-05-30 11:39:39 +02:00
|
|
|
<img class="logo-img" src="{{ asset('littlelink/images/just-gear.svg') }}" alt="Logo">
|
2022-05-24 15:30:22 +02:00
|
|
|
<div class="logo-centered">l</div>
|
|
|
|
</div>
|
2022-05-26 11:10:05 +02:00
|
|
|
<h1>Updater</h1>
|
2022-05-26 11:16:46 +02:00
|
|
|
@if(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN')
|
|
|
|
<h4 class="">The updater only works on Linux based systems.</h4>
|
2022-05-30 11:39:39 +02:00
|
|
|
<a class="btn" href="https://littlelink-custom.com/update"><button><i class="fa-solid fa-download btn"></i> Update manually</button></a>
|
2022-05-26 11:16:46 +02:00
|
|
|
@else
|
2022-05-28 14:03:49 +02:00
|
|
|
@if(env('JOIN_BETA') === true)
|
|
|
|
<p><?php echo "latest beta version= " . file_get_contents("https://update.littlelink-custom.com/beta/vbeta.json"); ?></p>
|
2022-05-30 12:10:11 +02:00
|
|
|
<p><?php if(file_exists(base_path("vbeta.json"))) {echo "Installed beta version= " . file_get_contents(base_path("vbeta.json"));} else {echo "Installed beta version= none";} ?></p>
|
2022-05-28 14:03:49 +02:00
|
|
|
<p><?php if($Vgit > $Vlocal) {echo "You need to update to the latest mainline release";} else {echo "You're running the latest mainline release";} ?></p>
|
|
|
|
@else
|
2022-05-25 16:19:20 +02:00
|
|
|
<h4 class="">You can update your installation automatically or download the update and install it manually:</h4>
|
2022-05-28 14:03:49 +02:00
|
|
|
@endif
|
2022-05-25 16:19:20 +02:00
|
|
|
<br><div class="row">
|
2022-05-30 11:39:39 +02:00
|
|
|
@if(env('SKIP_UPDATE_BACKUP') == true)
|
|
|
|
 <a class="btn" href="{{url()->current()}}/?updating"><button><i class="fa-solid fa-user-gear btn"></i> Update automatically</button></a> 
|
|
|
|
@else
|
|
|
|
 <a class="btn" href="{{url()->current()}}/?backup"><button><i class="fa-solid fa-user-gear btn"></i> Update automatically</button></a> 
|
|
|
|
@endif
|
2022-05-30 12:07:07 +02:00
|
|
|
 <a class="btn" href="https://littlelink-custom.com/update" target="_blank"><button><i class="fa-solid fa-download btn"></i> Update manually</button></a> 
|
2022-05-25 16:19:20 +02:00
|
|
|
</div>
|
2022-05-26 11:16:46 +02:00
|
|
|
@endif
|
2022-05-26 11:10:05 +02:00
|
|
|
|
2022-05-24 15:30:22 +02:00
|
|
|
@endif
|
|
|
|
|
|
|
|
@if($_SERVER['QUERY_STRING'] === 'backup')
|
|
|
|
<?php //creating backup... ?>
|
|
|
|
@Push('updater-head')
|
|
|
|
<meta http-equiv="refresh" content="2; URL={{url()->current()}}/?backups" />
|
|
|
|
@endpush
|
|
|
|
<div class="logo-container fadein">
|
2022-05-30 11:39:39 +02:00
|
|
|
<img class="logo-img loading" src="{{ asset('littlelink/images/just-gear.svg') }}" alt="Logo">
|
2022-05-24 15:30:22 +02:00
|
|
|
<div class="logo-centered">l</div>
|
|
|
|
</div>
|
2022-05-26 11:10:05 +02:00
|
|
|
<h1 class="loadingtxt">Creating backup</h1>
|
2022-05-24 15:30:22 +02:00
|
|
|
@endif
|
|
|
|
|
|
|
|
@if($_SERVER['QUERY_STRING'] === 'backups')
|
2022-05-25 17:00:21 +02:00
|
|
|
<?php Artisan::call('backup:clean');
|
|
|
|
Artisan::call('backup:run', ['--only-files' => true]);
|
2022-05-24 17:26:12 +02:00
|
|
|
$tst = base_path('backups/');
|
|
|
|
file_put_contents($tst.'CANUPDATE', '');
|
2022-05-24 16:13:00 +02:00
|
|
|
$URL = Route::current()->getName();
|
2022-05-25 16:19:20 +02:00
|
|
|
header("Location: ".$URL."?updating");
|
2022-05-24 15:30:22 +02:00
|
|
|
exit(); ?>
|
|
|
|
@endif
|
|
|
|
|
2022-05-30 11:39:39 +02:00
|
|
|
@if($_SERVER['QUERY_STRING'] === 'updating' and (file_exists(base_path("backups/CANUPDATE")) or env('SKIP_UPDATE_BACKUP') == true))
|
2022-05-25 16:19:20 +02:00
|
|
|
<?php //updating... ?>
|
2022-05-24 15:30:22 +02:00
|
|
|
<div class="logo-container fadein">
|
2022-05-30 11:39:39 +02:00
|
|
|
<img class="logo-img loading" src="{{ asset('littlelink/images/just-gear.svg') }}" alt="Logo">
|
2022-05-24 15:30:22 +02:00
|
|
|
<div class="logo-centered">l</div>
|
|
|
|
</div>
|
2022-05-26 11:10:05 +02:00
|
|
|
<h1 class="loadingtxt">Updating</h1>
|
2022-05-25 16:19:20 +02:00
|
|
|
@Push('updater-head')
|
|
|
|
<meta http-equiv="refresh" content="2; URL={{url()->current()}}/../updating" />
|
|
|
|
@endpush
|
|
|
|
@endif
|
|
|
|
|
2022-05-30 10:42:40 +02:00
|
|
|
@elseif($_SERVER['QUERY_STRING'] === '')
|
2022-05-30 11:48:05 +02:00
|
|
|
<?php //if no new version available ?>
|
2022-05-30 10:42:40 +02:00
|
|
|
|
|
|
|
<div class="logo-container fadein">
|
2022-05-30 11:39:39 +02:00
|
|
|
<img class="logo-img" src="{{ asset('littlelink/images/just-gear.svg') }}" alt="Logo">
|
2022-05-30 10:42:40 +02:00
|
|
|
<div class="logo-centered">l</div>
|
|
|
|
</div>
|
|
|
|
<h1>No new version</h1>
|
|
|
|
<h4 class="">There is no new version available</h4>
|
|
|
|
<br><div class="row">
|
2022-05-30 11:39:39 +02:00
|
|
|
 <a class="btn" href="{{ route('studioIndex') }}"><button><i class="fa-solid fa-house-laptop btn"></i> Admin Panel</button></a> 
|
2022-05-30 10:42:40 +02:00
|
|
|
</div>
|
|
|
|
|
2022-05-24 15:30:22 +02:00
|
|
|
@endif
|
|
|
|
|
2022-05-25 20:53:32 +02:00
|
|
|
@if($_SERVER['QUERY_STRING'] === 'finishing')
|
2022-05-30 11:48:05 +02:00
|
|
|
<?php //finishing up update ?>
|
2022-05-25 20:53:32 +02:00
|
|
|
<div class="logo-container fadein">
|
2022-05-30 11:39:39 +02:00
|
|
|
<img class="logo-img loading" src="{{ asset('littlelink/images/just-gear.svg') }}" alt="Logo">
|
2022-05-25 20:53:32 +02:00
|
|
|
<div class="logo-centered">l</div>
|
|
|
|
</div>
|
2022-05-26 11:10:05 +02:00
|
|
|
<h1 class="loadingtxt">Finishing up</h1>
|
2022-05-25 20:53:32 +02:00
|
|
|
|
2022-06-30 10:39:40 +02:00
|
|
|
@include('components.finishing')
|
2022-05-25 20:53:32 +02:00
|
|
|
@endif
|
2022-05-25 16:19:20 +02:00
|
|
|
|
|
|
|
@if($_SERVER['QUERY_STRING'] === 'success')
|
2022-05-30 11:48:05 +02:00
|
|
|
<?php //after successfully updating ?>
|
2022-05-26 11:10:05 +02:00
|
|
|
|
2022-05-24 15:30:22 +02:00
|
|
|
<div class="logo-container fadein">
|
2022-05-30 11:39:39 +02:00
|
|
|
<img class="logo-img" src="{{ asset('littlelink/images/just-gear.svg') }}" alt="Logo">
|
2022-05-24 15:30:22 +02:00
|
|
|
<div class="logo-centered">l</div>
|
|
|
|
</div>
|
2022-05-26 11:10:05 +02:00
|
|
|
<h1>Success!</h1>
|
2022-05-30 12:07:07 +02:00
|
|
|
@if(env('JOIN_BETA') === true)
|
|
|
|
<p><?php echo "latest beta version= " . file_get_contents("https://update.littlelink-custom.com/beta/vbeta.json"); ?></p>
|
2022-05-30 12:10:11 +02:00
|
|
|
<p><?php if(file_exists(base_path("vbeta.json"))) {echo "Installed beta version= " . file_get_contents(base_path("vbeta.json"));} else {echo "Installed beta version= none";} ?></p>
|
2022-05-30 12:07:07 +02:00
|
|
|
<p><?php if($Vgit > $Vlocal) {echo "You need to update to the latest mainline release";} else {echo "You're running the latest mainline release";} ?></p>
|
|
|
|
@else
|
2022-06-10 12:39:08 +02:00
|
|
|
<h4 class="">The update was successful, you can now return to the Admin Panel.</h4>
|
|
|
|
<style>.noteslink:hover{color:#006fd5;text-shadow:0px 6px 7px rgba(23,10,6,0.66);}</style>
|
|
|
|
<a class="noteslink" href="https://github.com/JulianPrieber/littlelink-custom/releases/latest" target="_blank"><i class="fa-solid fa-up-right-from-square"></i> View the release notes</a>
|
|
|
|
<br>
|
2022-05-30 12:07:07 +02:00
|
|
|
@endif
|
2022-05-24 15:30:22 +02:00
|
|
|
<br><div class="row">
|
2022-05-30 11:39:39 +02:00
|
|
|
 <a class="btn" href="{{ route('studioIndex') }}"><button><i class="fa-solid fa-house-laptop btn"></i> Admin Panel</button></a> 
|
2022-05-30 12:07:07 +02:00
|
|
|
|
|
|
|
@if(env('JOIN_BETA') === true)
|
|
|
|
 <a class="btn" href="{{url()->current()}}/"><button><i class="fa-solid fa-arrow-rotate-right btn"></i> Run again</button></a> 
|
|
|
|
@endif
|
2022-05-24 15:30:22 +02:00
|
|
|
</div>
|
2022-05-26 11:10:05 +02:00
|
|
|
|
2022-05-24 15:30:22 +02:00
|
|
|
@endif
|
|
|
|
|
2022-05-26 12:12:29 +02:00
|
|
|
@if($_SERVER['QUERY_STRING'] === 'error')
|
2022-05-30 11:48:05 +02:00
|
|
|
<?php //on error ?>
|
2022-05-26 12:12:29 +02:00
|
|
|
|
|
|
|
<div class="logo-container fadein">
|
2022-05-30 11:39:39 +02:00
|
|
|
<img class="logo-img" src="{{ asset('littlelink/images/just-gear.svg') }}" alt="Logo">
|
2022-05-26 12:12:29 +02:00
|
|
|
<div class="logo-centered">l</div>
|
|
|
|
</div>
|
|
|
|
<h1>Error</h1>
|
|
|
|
<h4 class="">Something went wrong with the update :(</h4>
|
|
|
|
<br><div class="row">
|
2022-05-30 11:39:39 +02:00
|
|
|
 <a class="btn" href="{{ route('studioIndex') }}"><button><i class="fa-solid fa-house-laptop btn"></i> Admin Panel</button></a> 
|
2022-05-26 12:12:29 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
@endif
|
|
|
|
|
2022-05-26 11:10:05 +02:00
|
|
|
</div>
|
2022-05-24 15:30:22 +02:00
|
|
|
@endpush
|