ディスカバー
このコミットが含まれているのは:
コミット
6f0a6d9860
|
@ -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');
|
||||
|
|
新しいイシューから参照