ソースを参照

マンコチンポ

peertube
コミット
6aa0687108
  1. 5
      app/Http/Controllers/Peertube/Account.php
  2. 4
      resources/views/theme/techsuwa/component/peertube/parts/a/channels/avatar.blade.php
  3. 8
      resources/views/theme/techsuwa/component/peertube/parts/c/head/banner.blade.php
  4. 2
      resources/views/theme/techsuwa/component/peertube/parts/c/head/info.blade.php
  5. 2
      routes/view/peertube.php

5
app/Http/Controllers/Peertube/Account.php

@ -13,15 +13,16 @@ class Account extends Common {
$this->common = new Common;
}
public function index ($id) {
public function index ($id, $cat='video-channels') {
$res = [];
$res['page'] = 'account';
$res['cat'] = $cat;
$res['owner'] = $this->getOwner($id);
if (!empty($res['owner'])) $res['owner']->totalVideo = 0;
$res['channel'] = $this->getChannel($id);
if (!empty($res['owner'])) {
foreach ($res['channel']->data as $k => $v) {
$res['channel']->data[$k]->video = $this->getVideo($v->name);
$res['channel']->data[$k]->video = $this->getVideo($v->name.'@'.$v->host);
$res['owner']->totalVideo += $res['channel']->data[$k]->video->total;
}
}

4
resources/views/theme/techsuwa/component/peertube/parts/a/channels/avatar.blade.php

@ -11,6 +11,8 @@
<div class="followers">{{ $ch->followersCount }}人登録者</div><span class="videos-count ng-star-inserted"> {{ $ch->video->total }}枚動画 </span>
</div>
<div class="description-html">
<p>ダンスパフォーマンスユニット「{{ $ch->displayName }}」の非公式チャンネルです。</p>
<p>
<?php echo $ch->description; ?>
</p>
</div>
</div>

8
resources/views/theme/techsuwa/component/peertube/parts/c/head/banner.blade.php

@ -1,3 +1,5 @@
<div class="banner ng-star-inserted">
<img alt="Channel banner" src="https://video.076.ne.jp{{ $res['channel']->banner->path }}">
</div>
@if (!is_null($res['channel']->banner))
<div class="banner ng-star-inserted">
<img alt="Channel banner" src="https://video.076.ne.jp{{ $res['channel']->banner->path }}">
</div>
@endif

2
resources/views/theme/techsuwa/component/peertube/parts/c/head/info.blade.php

@ -11,7 +11,7 @@
<h1 title="Channel created on {{ date('Y/m/d', strtotime($res['channel']->createdAt)) }}">{{ $res['channel']->displayName }}</h1>
</div>
<div class="actor-handle">
<span>@worldorder</span>
<span>{{ '@'.$res['channel']->name }}{{ $res['channel']->host != 'video.076.ne.jp' ? '@'.$res['channel']->host : '' }}</span>
</div>
<div class="actor-counters">
<span>{{ $res['channel']->followersCount }}人登録者</span>

2
routes/view/peertube.php

@ -1,7 +1,7 @@
<?php
Route::group(['prefix' => 'peertube'], function () {
Route::any('/a/{id}', 'Peertube\Account@index');
Route::any('/a/{id}/{cat?}', 'Peertube\Account@index');
Route::any('/c/{id}/{cat?}/{page?}', 'Peertube\Channel@index');
Route::any('/w/{id}', 'Peertube\Watch@index');
});

読み込み中…
キャンセル
保存