トレンド
このコミットが含まれているのは:
コミット
57259da0cc
|
@ -8,22 +8,25 @@ use App\Http\Controllers\Peertube\Common;
|
||||||
|
|
||||||
class Trending extends Common {
|
class Trending extends Common {
|
||||||
private $common;
|
private $common;
|
||||||
|
private $count;
|
||||||
|
|
||||||
public function __construct () {
|
public function __construct () {
|
||||||
$this->common = new Common;
|
$this->common = new Common;
|
||||||
|
$this->count = 25;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function index () {
|
public function index ($page=0) {
|
||||||
$res = [
|
$res = [
|
||||||
'page' => 'dummy',
|
'page' => 'videoslist',
|
||||||
|
'paginate' => $page,
|
||||||
|
'pagetotal' => 500,
|
||||||
'userinfo' => $this->common->user,
|
'userinfo' => $this->common->user,
|
||||||
];
|
];
|
||||||
// $res['owner'] = $this->getOwner($id);
|
$res['video'] = $this->getVideo(($page*$this->count), $this->count);
|
||||||
return view('pages.peertube.notyet', ['res' => $res]);
|
return view('pages.peertube.videos.trending', ['res' => $res]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getOwner ($id) {
|
function getVideo ($start, $count) {
|
||||||
//https://video.076.ne.jp/api/v1/videos/?start=0&count=25&sort=-trending&skipCount=true&nsfw=both
|
return $this->ptapi_get('/api/v1/videos/?start='.$start.'&count='.$count.'&sort=-trending&skipCount=true&nsfw=both');
|
||||||
return $this->ptapi_get('/api/v1/accounts/'.$id);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
@extends('theme.'.env('THEME').'.peertube')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
@include('theme.'.env('THEME').'.component.peertube.videos.trending')
|
||||||
|
@endsection
|
|
@ -0,0 +1,34 @@
|
||||||
|
<div _ngcontent-jba-c138="" id="content" tabindex="-1" class="main-col">
|
||||||
|
<div _ngcontent-jba-c138="" class="main-row">
|
||||||
|
<ng-component class="ng-star-inserted">
|
||||||
|
<ng-component class="ng-star-inserted">
|
||||||
|
<my-videos-list _nghost-jba-c163="">
|
||||||
|
<div _ngcontent-jba-c163="" class="margin-content">
|
||||||
|
<div _ngcontent-jba-c163="" class="videos-header">
|
||||||
|
<h1 _ngcontent-jba-c163="" placement="bottom" container="body" class="title ng-star-inserted"> トレンド </h1>
|
||||||
|
<div _ngcontent-jba-c163="" class="title-subscription ng-star-inserted">
|
||||||
|
Subscribe to RSS feed "トレンド"
|
||||||
|
<my-feed _ngcontent-jba-c163="" _nghost-jba-c77="">
|
||||||
|
<div _ngcontent-jba-c77="" class="feed">
|
||||||
|
<my-global-icon _ngcontent-jba-c77="" role="button" aria-label="Open syndication dropdown" placement="bottom left auto" iconname="syndication" class="icon-syndication ng-star-inserted" _nghost-jba-c71="">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="feather feather-rss"><path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle></svg>
|
||||||
|
</my-global-icon>
|
||||||
|
</div>
|
||||||
|
</my-feed>
|
||||||
|
</div>
|
||||||
|
<div _ngcontent-jba-c163="" class="action-block"></div>
|
||||||
|
</div>
|
||||||
|
<div class="videos">
|
||||||
|
@foreach ($res['video']->data as $v)
|
||||||
|
@include('theme.'.env('THEME').'.component.peertube.parts.common.videominature')
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
@include('theme.'.env('THEME').'.component.peertube.parts.common.paginate', [
|
||||||
|
'root' => '/peertube/videos/trending'
|
||||||
|
])
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -37,9 +37,9 @@ Route::group(['prefix' => 'peertube'], function () {
|
||||||
Route::any('/', 'Peertube\Videos\Local@index');
|
Route::any('/', 'Peertube\Videos\Local@index');
|
||||||
Route::any('/subscriptions', 'Peertube\Videos\Subscriptions@index');
|
Route::any('/subscriptions', 'Peertube\Videos\Subscriptions@index');
|
||||||
Route::any('/overview', 'Peertube\Videos\Overview@index');
|
Route::any('/overview', 'Peertube\Videos\Overview@index');
|
||||||
Route::any('/trending', 'Peertube\Videos\Trending@index');
|
Route::any('/trending/{page?}', 'Peertube\Videos\Trending@index');
|
||||||
Route::any('/recently-added', 'Peertube\Videos\Recentlyadded@index');
|
Route::any('/recently-added/{page?}', 'Peertube\Videos\Recentlyadded@index');
|
||||||
Route::any('/local', 'Peertube\Videos\Local@index');
|
Route::any('/local/{page?}', 'Peertube\Videos\Local@index');
|
||||||
Route::any('/upload', 'Peertube\Videos\Upload@index');
|
Route::any('/upload', 'Peertube\Videos\Upload@index');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
新しいイシューから参照