More WebUI updates.
This commit is contained in:
@@ -58,7 +58,7 @@ final class Ignore
|
||||
'db' => $db,
|
||||
'id' => $id,
|
||||
'scoped' => null === $scope ? 'No' : 'Yes',
|
||||
'created' => makeDate($date)->format('Y-m-d H:i:s T'),
|
||||
'created' => makeDate($date),
|
||||
];
|
||||
}
|
||||
$apiUrl = $request->getUri()->withHost('')->withPort(0)->withScheme('');
|
||||
|
||||
@@ -303,8 +303,8 @@ final class Index
|
||||
}
|
||||
|
||||
$item['full_title'] = $entity->getName();
|
||||
$item['progress'] = $entity->hasPlayProgress() ? $entity->getPlayProgress() : 'None';
|
||||
$item['event'] = ag($entity->getExtra($entity->via), iState::COLUMN_EXTRA_EVENT, '-');
|
||||
$item['progress'] = $entity->hasPlayProgress() ? $entity->getPlayProgress() : null;
|
||||
$item['event'] = ag($entity->getExtra($entity->via), iState::COLUMN_EXTRA_EVENT, null);
|
||||
|
||||
$item = [
|
||||
...$item,
|
||||
|
||||
@@ -41,10 +41,11 @@ final class Index
|
||||
$url = $apiUrl->withPath(parseConfigValue(self::URL . "/" . basename($file)));
|
||||
|
||||
$builder = [
|
||||
'filename' => basename($file),
|
||||
'type' => $matches[1] ?? '??',
|
||||
'date' => $matches[2] ?? '??',
|
||||
'size' => filesize($file),
|
||||
'modified' => makeDate(filemtime($file))->format('Y-m-d H:i:s T'),
|
||||
'modified' => makeDate(filemtime($file)),
|
||||
'urls' => [
|
||||
'self' => (string)$url,
|
||||
'stream' => (string)$url->withQuery($query),
|
||||
|
||||
@@ -58,7 +58,7 @@ final class Queue
|
||||
'title' => $entity->getName(),
|
||||
'played' => $entity->isWatched() ? 'Yes' : 'No',
|
||||
'via' => $entity->via ?? '??',
|
||||
'date' => makeDate($entity->updated)->format('Y-m-d H:i:s T'),
|
||||
'date' => makeDate($entity->updated),
|
||||
'event' => ag($entity->getExtra($entity->via), iState::COLUMN_EXTRA_EVENT),
|
||||
];
|
||||
}
|
||||
|
||||
21
src/API/System/Version.php
Normal file
21
src/API/System/Version.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\API\System;
|
||||
|
||||
use App\Libs\Attributes\Route\Get;
|
||||
use App\Libs\HTTP_STATUS;
|
||||
use Psr\Http\Message\ResponseInterface as iResponse;
|
||||
use Psr\Http\Message\ServerRequestInterface as iRequest;
|
||||
|
||||
final class Version
|
||||
{
|
||||
public const string URL = '%{api.prefix}/system/version';
|
||||
|
||||
#[Get(self::URL . '[/]', name: 'system.version')]
|
||||
public function __invoke(iRequest $request): iResponse
|
||||
{
|
||||
return api_response(HTTP_STATUS::HTTP_OK, ['version' => getAppVersion()]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user