Check upstream versions and label article-driven components
This commit is contained in:
@@ -17,6 +17,7 @@ use App\Content\Passwords;
|
||||
use App\Content\Repository;
|
||||
use App\Content\SiteDesign;
|
||||
use App\Content\SystemInfo;
|
||||
use App\Content\Updates;
|
||||
use App\Content\View;
|
||||
use App\Http\Request;
|
||||
use RuntimeException;
|
||||
@@ -160,6 +161,18 @@ class AdminController
|
||||
return $this->json(SystemInfo::sample());
|
||||
}
|
||||
|
||||
public function aboutUpdate(Request $request): Response
|
||||
{
|
||||
if ($failure = $this->guard($request)) {
|
||||
return $failure;
|
||||
}
|
||||
try {
|
||||
return $this->json(Updates::check());
|
||||
} catch (RuntimeException $error) {
|
||||
return $this->json(['message' => $error->getMessage()], 502);
|
||||
}
|
||||
}
|
||||
|
||||
public function aboutLicense(Request $request, string $key): Response
|
||||
{
|
||||
if ($failure = $this->guard($request)) {
|
||||
@@ -756,7 +769,7 @@ class AdminController
|
||||
|
||||
return View::render($view, $data + [
|
||||
'token' => $token, 'user' => $this->user, 'adminPath' => $request->path(),
|
||||
'laysiteVersion' => trim(file_get_contents(dirname(__DIR__, 2) . '/VERSION')),
|
||||
'laysiteVersion' => Updates::current(),
|
||||
], $status, true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user