ディスカバー

このコミットが含まれているのは:
守矢諏訪子 2021-12-16 15:42:24 +09:00
コミット 6f0a6d9860
7個のファイルの変更61行の追加8行の削除

ファイルの表示

@ -13,17 +13,18 @@ class Overview extends Common {
$this->common = new Common;
}
public function index () {
public function index ($page=1) {
$res = [
'page' => 'dummy',
'page' => 'videoslist',
'paginate' => $page,
'pagetotal' => 500,
'userinfo' => $this->common->user,
];
// $res['owner'] = $this->getOwner($id);
return view('pages.peertube.notyet', ['res' => $res]);
$res['video'] = $this->getVideo($page);
return view('pages.peertube.videos.overview', ['res' => $res]);
}
function getOwner ($id) {
//https://video.076.ne.jp/api/v1/overviews/videos?page=1
return $this->ptapi_get('/api/v1/accounts/'.$id);
function getVideo ($page) {
return $this->ptapi_get('/api/v1/overviews/videos?page='.$page);
}
}

ファイルの表示

@ -0,0 +1,5 @@
@extends('theme.'.env('THEME').'.peertube')
@section('content')
@include('theme.'.env('THEME').'.component.peertube.videos.overview')
@endsection

ファイルの表示

@ -0,0 +1,8 @@
<div class="section videos ng-star-inserted">
<h1 class="section-title">
<a routerlink="/search" href="/peertube/search?categoryOneOf={{ $res['video']->categories[0]->category->id }}">{{ $res['video']->categories[0]->category->label }}</a>
</h1>
@foreach ($res['video']->categories[0]->videos as $k => $v)
@include('theme.'.env('THEME').'.component.peertube.parts.common.videominature')
@endforeach
</div>

ファイルの表示

@ -0,0 +1,13 @@
<div class="section channel videos ng-star-inserted">
<div class="section-title">
<a href="/peertube/c/{{ $res['video']->channels[0]->channel->name }}{{ $res['video']->channels[0]->channel->host != 'video.076.ne.jp' ? '@'.$res['video']->channels[0]->channel->host : '' }}">
<my-actor-avatar>
<img class="avatar channel ng-star-inserted" src="{{ !is_null($res['video']->channels[0]->channel->avatar) ? 'https://video.076.ne.jp'.$res['video']->channels[0]->channel->avatar->path : '/img/noicon.jpg' }}" alt="チャンネルのアバター">
</my-actor-avatar>
<h2 class="section-title">{{ $res['video']->channels[0]->channel->displayName }}</h2>
</a>
</div>
@foreach ($res['video']->channels[0]->videos as $k => $v)
@include('theme.'.env('THEME').'.component.peertube.parts.common.videominature')
@endforeach
</div>

ファイルの表示

@ -0,0 +1,8 @@
<div class="section videos ng-star-inserted">
<h2 class="section-title">
<a routerlink="/search" href="/peertube/search?tagsOneOf=vampiros">{{ '#'.$res['video']->tags[0]->tag }}</a>
</h2>
@foreach ($res['video']->tags[0]->videos as $k => $v)
@include('theme.'.env('THEME').'.component.peertube.parts.common.videominature')
@endforeach
</div>

ファイルの表示

@ -0,0 +1,18 @@
<div id="content" tabindex="-1" class="main-col">
<div class="main-row">
<ng-component class="ng-star-inserted">
<ng-component class="ng-star-inserted">
<h1 class="sr-only">ディスカバー</h1>
<div class="margin-content">
@if (!empty($res['video']->categories)) @include('theme.'.env('THEME').'.component.peertube.parts.videos.categories') @endif
@if (!empty($res['video']->tags)) @include('theme.'.env('THEME').'.component.peertube.parts.videos.tags') @endif
@if (!empty($res['video']->channels)) @include('theme.'.env('THEME').'.component.peertube.parts.videos.channels') @endif
<div style="margin-top: 16px;"></div>
@include('theme.'.env('THEME').'.component.peertube.parts.common.paginate', [
'root' => '/peertube/videos/overview'
])
</div>
</div>
</div>
</div>
</div>

ファイルの表示

@ -36,7 +36,7 @@ Route::group(['prefix' => 'peertube'], function () {
Route::group(['prefix' => 'videos'], function () {
Route::any('/', 'Peertube\Videos\Local@index');
Route::any('/subscriptions', 'Peertube\Videos\Subscriptions@index');
Route::any('/overview', 'Peertube\Videos\Overview@index');
Route::any('/overview/{page?}', 'Peertube\Videos\Overview@index');
Route::any('/trending/{page?}', 'Peertube\Videos\Trending@index');
Route::any('/recently-added/{page?}', 'Peertube\Videos\Recentlyadded@index');
Route::any('/local/{page?}', 'Peertube\Videos\Local@index');