Fixed images on rtl mode
This commit is contained in:
@@ -8,6 +8,8 @@ use App\Models\Comic;
|
||||
use App\Models\Image;
|
||||
use App\Remote\CopyManga;
|
||||
use App\Remote\ImageFetcher;
|
||||
use Exception;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Illuminate\Contracts\Routing\ResponseFactory;
|
||||
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||
use Illuminate\Foundation\Application;
|
||||
@@ -118,6 +120,13 @@ class ComicController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param Request $request
|
||||
* @return Response
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function index(Request $request): Response
|
||||
{
|
||||
$params = [];
|
||||
@@ -152,7 +161,7 @@ class ComicController extends Controller
|
||||
{
|
||||
$comics = $this->copyManga->search($search, 30, $request->header('offset', 0));
|
||||
|
||||
// Seacrh API is limited, no upsert
|
||||
// Search API is limited, no upsert
|
||||
|
||||
return Inertia::render('Comic/Index', [
|
||||
'comics' => $comics,
|
||||
@@ -163,7 +172,7 @@ class ComicController extends Controller
|
||||
public function chapters(Request $request, string $pathword = ''): Response
|
||||
{
|
||||
$comic = $this->copyManga->comic($pathword);
|
||||
$chapters = $this->copyManga->chapters($pathword, 200, 0, [], $request->get('group', 'default'));
|
||||
$chapters = $this->copyManga->chapters($pathword, 200, $request->header('offset', 0), [], $request->get('group', 'default'));
|
||||
|
||||
// Get the comic object and fill other parameters
|
||||
try {
|
||||
@@ -221,7 +230,8 @@ class ComicController extends Controller
|
||||
return Inertia::render('Comic/Chapters', [
|
||||
'comic' => $comic,
|
||||
'chapters' => $chapters,
|
||||
'histories' => $histories
|
||||
'histories' => $histories,
|
||||
'offset' => $request->header('offset', 0)
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -276,7 +286,7 @@ class ComicController extends Controller
|
||||
{
|
||||
// Get history
|
||||
$histories = $request->user()->readingHistories()->with(['comic:id,name,pathword'])->orderByDesc('reading_histories.created_at')
|
||||
->select(['reading_histories.id as hid', 'reading_histories.created_at', 'chapters.comic_id', 'chapters.name'])->paginate(50)->toArray();
|
||||
->select(['reading_histories.id as hid', 'reading_histories.created_at as read_at', 'chapters.comic_id', 'chapters.name'])->paginate(50)->toArray();
|
||||
|
||||
return Inertia::render('Comic/Histories', [
|
||||
'histories' => $histories
|
||||
|
||||
Reference in New Issue
Block a user