コミットを比較

...

4 コミット

作成者 SHA1 メッセージ 日付
守矢諏訪子 261c0af987 アカウントページ 2021-12-15 12:53:09 +09:00
守矢諏訪子 7043c96608 0分でも表示 2021-12-15 12:52:10 +09:00
守矢諏訪子 f066512204 登録ボタンは一致 2021-12-15 12:51:45 +09:00
守矢諏訪子 c74ebfc82e スタイルはCSSに 2021-12-15 12:51:09 +09:00
18個のファイルの変更3492行の追加1520行の削除

42
app/Http/Controllers/Peertube/Account.php ノーマルファイル
ファイルの表示

@ -0,0 +1,42 @@
<?php
namespace App\Http\Controllers\Peertube;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use App\Http\Controllers\Peertube\Common;
// use Illuminate\Support\Facades\Log;
class Account extends Common {
private $common;
public function __construct () {
$this->common = new Common;
}
public function index ($id) {
$res = [];
$res['page'] = 'account';
$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['owner']->totalVideo += $res['channel']->data[$k]->video->total;
}
}
return view('pages.peertube.a', ['res' => $res]);
}
function getOwner ($id) {
return $this->ptapi_get('/api/v1/accounts/'.$id);
}
function getChannel ($id) {
return $this->ptapi_get('/api/v1/accounts/'.$id.'/video-channels?start=0&count=20&sort=-updatedAt&withStats=false');
}
public function getVideo ($id) {
return $this->ptapi_get('/api/v1/video-channels/'.$id.'/videos?start=0&count=5&sort=-publishedAt&nsfw=both');
}
}

1795
public/css/peertube/account.css vendored ノーマルファイル

ファイル差分が大きすぎるため省略します 差分を読み込み

1
public/css/peertube/channel.css vendored ノーマルファイル
ファイルの表示

@ -0,0 +1 @@
/**/

1472
public/css/peertube/common.css vendored ノーマルファイル

ファイル差分が大きすぎるため省略します 差分を読み込み

12
public/css/peertube/watch.css vendored ノーマルファイル
ファイルの表示

@ -0,0 +1,12 @@
.avatar-25 {
--avatarSize: 25px !important;
}
.avatar-and-textarea {
display: flex;
margin-bottom: 10px;
}
.avatar-and-textarea my-actor-avatar {
margin-inline-end: 10px;
}

5
resources/views/pages/peertube/a.blade.php ノーマルファイル
ファイルの表示

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

ファイルの表示

@ -0,0 +1,9 @@
<div id="content" tabindex="-1" class="main-col">
<div class="main-row">
<div class="root ng-star-inserted">
@include('theme.'.env('THEME').'.component.peertube.parts.a.info')
@include('theme.'.env('THEME').'.component.peertube.parts.a.links')
@include('theme.'.env('THEME').'.component.peertube.parts.a.channels')
</div>
</div>
</div>

ファイルの表示

@ -0,0 +1,14 @@
<my-account-video-channels class="ng-star-inserted">
<div class="margin-content">
<div class="channels">
@foreach ($res['channel']->data as $ch)
<?php $fullchan = $ch->name.($ch->host != 'video.076.ne.jp' ? '@'.$ch->host : ''); ?>
<div class="channel ng-star-inserted">
@include('theme.'.env('THEME').'.component.peertube.parts.a.channels.avatar')
@include('theme.'.env('THEME').'.component.peertube.parts.common.subscribe')
@include('theme.'.env('THEME').'.component.peertube.parts.a.channels.videos')
</div>
@endforeach
</div>
</div>
</my-account-video-channels>

ファイルの表示

@ -0,0 +1,16 @@
<div class="channel-avatar-row">
<my-actor-avatar title="この動画チャンネルを見る">
<a title="この動画チャンネルを見る" href="/peertube/c/{{ $fullchan }}" class="ng-star-inserted">
<img class="avatar channel ng-star-inserted" src="https://video.076.ne.jp{{ $ch->avatar->path }}" alt="チャンネルのアバター">
</a>
</my-actor-avatar>
<h2>
<a title="この動画チャンネルを見る" href="/peertube/c/{{ $fullchan }}"> {{ $ch->displayName }} </a>
</h2>
<div class="actor-counters">
<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>
</div>
</div>

ファイルの表示

@ -0,0 +1,54 @@
<div class="videos">
@foreach ($ch->video->data as $v)
<my-video-miniature class="ng-star-inserted">
<div class="video-miniature">
<my-video-thumbnail>
<a class="video-thumbnail ng-star-inserted" href="/peertube/w/{{ $v->shortUUID }}">
<img alt="" aria-label="{{ $v->name }}" src="https://video.076.ne.jp/{{ $v->thumbnailPath }}" class="ng-star-inserted">
<div class="video-thumbnail-label-overlay warning ng-star-inserted"></div>
<div class="video-thumbnail-label-overlay danger ng-star-inserted"></div>
@php
$seconds = $v->duration;
$hours = floor($seconds / 3600);
$seconds -= $hours * 3600;
$minutes = floor($seconds / 60);
$seconds -= $minutes * 60;
@endphp
<div class="video-thumbnail-duration-overlay ng-star-inserted">{{ $hours != 0 ? $hours.':' : '' }}{{ $minutes != 0 ? $minutes.':' : '0:' }}{{ $seconds }}</div>
<div class="play-overlay ng-star-inserted">
<div class="icon"></div>
</div>
<div class="progress-bar ng-star-inserted">
<div style="width: 100%;"></div>
</div>
</a>
</my-video-thumbnail>
<div class="video-bottom">
<div class="video-miniature-information">
<div class="d-flex video-miniature-meta">
<div class="w-100 d-flex flex-column">
<my-link tabindex="-1" class="video-miniature-name" style="max-height: 3em;">
<a tabindex="-1" title="{{ $v->name }}" href="/peertube/w/{{ $v->shortUUID }}" class="ng-star-inserted"> {{ $v->name }} </a>
</my-link>
<span class="video-miniature-created-at-views">
<my-date-toggle class="ng-star-inserted">
<span class="date-toggle" title="{{ date('Y/m/d', strtotime($v->publishedAt)) }}"> {{ date('Y/m/d', strtotime($v->publishedAt)) }} </span>
</my-date-toggle>
<span class="views" title="">
<my-video-views-counter class="ng-star-inserted">
<span title=""> {{ $v->views }} 回視聴</span>
</my-video-views-counter>
</span>
</span>
</div>
</div>
</div>
</div>
</div>
</my-video-miniature>
@endforeach
<div class="miniature-show-channel ng-star-inserted">
<a href="/peertube/c/{{ $fullchan }}">このチャンネルを表示&gt;</a>
</div>
</div>

ファイルの表示

@ -0,0 +1,36 @@
<div class="account-info">
<div class="account-avatar-row">
<my-actor-avatar class="main-avatar">
<img class="account avatar ng-star-inserted" src="https://video.076.ne.jp{{ $res['owner']->avatar->path }}" alt="アカウントのアバター">
</my-actor-avatar>
<div>
<div class="section-label">アカウント</div>
<div class="actor-info">
<div>
<div class="actor-display-name">
<h1 title="Created on {{ date('Y/m/d', strtotime($res['owner']->createdAt)) }}">{{ $res['owner']->displayName }}</h1>
</div>
<div class="actor-handle">
<span>{{ '@'.$res['owner']->name }}{{ $res['owner']->host != 'video.076.ne.jp' ? '@'.$res['owner']->host : '' }}</span>
<button title="Copy account handle" class="btn btn-outline-secondary btn-sm copy-button">
<span class="glyphicon glyphicon-duplicate"></span>
</button>
</div>
<div class="actor-counters">
<span>{{ $res['owner']->followersCount }}人登録者</span><span class="videos-count ng-star-inserted"> {{ $res['owner']->totalVideo }}枚動画 </span>
</div>
</div>
</div>
</div>
</div>
<div class="description">
<div class="description-html">
<p>
{{ $res['owner']->description }}
</p>
</div>
</div>
<div class="buttons">
@include('theme.'.env('THEME').'.component.peertube.parts.common.subscribe')
</div>
</div>

ファイルの表示

@ -0,0 +1,22 @@
<div class="links on-channel-page">
<my-list-overflow>
<div class="d-flex align-items-center text-nowrap w-100 list-overflow-parent">
<span id="pe_0" class="ng-star-inserted" style="visibility: inherit;">
<a routerlinkactive="active" class="title-page ng-star-inserted active" href="/a/world_order/video-channels">チャンネル</a>
</span>
<span id="pe_1" class="ng-star-inserted" style="visibility: inherit;">
<a routerlinkactive="active" class="title-page ng-star-inserted" href="/a/world_order/videos">動画</a>
</span>
</div>
</my-list-overflow>
<my-simple-search-input name="search-videos" icon-title="Search account videos" placeholder="アカウントの動画を検索する">
<div class="root" style="display: flex;">
<div class="input-group has-feedback has-clear">
<input type="text" placeholder="アカウントの動画を検索する" class="ng-untouched ng-pristine ng-valid">
</div>
<my-global-icon class="myglobalicon-alt" iconname="search" aria-label="Search" role="button" title="検索">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>
</my-global-icon>
</div>
</my-simple-search-input>
</div>

ファイルの表示

@ -0,0 +1,7 @@
<my-subscribe-button size="small">
<div class="btn-group-subscribe btn subscribe-button">
<button type="button" role="button" class="btn btn-sm ng-star-inserted">登録</button>
<button type="button" role="button" class="btn btn-sm ng-star-inserted">リモート登録</button>
<button type="button" role="button" class="btn btn-sm ng-star-inserted">RSSで登録</button>
</div>
</my-subscribe-button>

ファイルの表示

@ -21,7 +21,7 @@
</div>
<div class="pt-3 border-top video-info-channel d-flex">
@include('theme.'.env('THEME').'.component.peertube.parts.w.info.channel')
@include('theme.'.env('THEME').'.component.peertube.parts.w.info.subscribe')
@include('theme.'.env('THEME').'.component.peertube.parts.common.subscribe')
</div>
</div>
</div>

ファイルの表示

@ -1,39 +0,0 @@
<my-subscribe-button size="small">
<div class="btn-group-subscribe btn-group subscribe-button">
<button type="button" class="btn btn-sm ng-star-inserted">
<span class="ng-star-inserted">チャンネル登録する</span>
</button>
<!--div autoclose="outside" placement="bottom-right bottom-left" role="group" aria-label="Multiple ways to subscribe to the current channel" class="btn-group dropdown">
<button aria-label="チャンネル登録のドロップダウンメニューを開く" class="dropdown-toggle btn btn-sm dropdown-toggle-split" aria-expanded="false"></button>
<div class="dropdown-menu" x-placement="bottom-right">
<h6 class="dropdown-header">ActivityPubアプリケーションのアカウントを使用</h6>
<button class="dropdown-item">
<span class="ng-star-inserted">ローカルアカウントで登録する</span>
</button>
<button class="dropdown-item dropdown-item-neutral">
<div class="mb-1">リモートアカウントで登録する:</div>
<my-remote-subscribe>
<form novalidate="" class="ng-untouched ng-pristine ng-invalid">
<div class="form-group mb-2">
<input type="email" formcontrolname="text" placeholder="jane_doe@example.com" class="form-control ng-untouched ng-pristine ng-invalid">
</div>
<button type="submit" class="btn btn-sm btn-remote-follow" disabled="">
<span class="ng-star-inserted">リモートアカウントで登録</span>
</button>
<my-help class="ng-star-inserted">
<span role="button" container="body" tabindex="0" popoverclass="help-popover" class="help-tooltip-button" title="ヘルプを表示" aria-pressed="false">
<my-global-icon>
SVG
</my-global-icon>
</span>
</my-help>
</form>
</my-remote-subscribe>
</button>
<div class="dropdown-divider"></div>
<h6 class="dropdown-header">フィードを使用</h6>
<a target="_blank" class="dropdown-item" href="/feeds/videos.xml?videoChannelId=4">RSSで登録する</a>
</div>
</div-->
</div>
</my-subscribe-button>

ファイルの表示

@ -18,7 +18,7 @@
$minutes = floor($seconds / 60);
$seconds -= $minutes * 60;
@endphp
<div class="video-thumbnail-duration-overlay ng-star-inserted">{{ $hours != 0 ? $hours.':' : '' }}{{ $minutes != 0 ? $minutes.':' : '' }}{{ $seconds }}</div>
<div class="video-thumbnail-duration-overlay ng-star-inserted">{{ $hours != 0 ? $hours.':' : '' }}{{ $minutes != 0 ? $minutes.':' : '0:' }}{{ $seconds }}</div>
<div class="play-overlay ng-star-inserted">
<div class="icon"></div>
</div>

ファイルの表示

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