From 4543a7e5cf43feeec020616237d5c277ca5ed6a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=86=E3=82=AF=E3=83=8B=E3=82=AB=E3=83=AB=E8=AB=8F?= =?UTF-8?q?=E8=A8=AA=E5=AD=90?= Date: Thu, 10 Feb 2022 00:33:21 +0900 Subject: [PATCH] =?UTF-8?q?=E3=81=93=E3=81=AE=E3=82=A2=E3=83=97=E3=83=AA?= =?UTF-8?q?=E3=81=AB=E3=81=A4=E3=81=84=E3=81=A6=E3=83=9A=E3=83=BC=E3=82=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Engine.php | 3 +- app/Http/Controllers/Peertube/About.php | 52 +++- app/helpers.php | 29 ++ public/css/about.css | 260 ++++++++++++++++++ .../peertube/about/components/about.blade.php | 22 ++ .../about/components/about/admin.blade.php | 13 + .../about/components/about/business.blade.php | 9 + .../about/components/about/cock.blade.php | 9 + .../about/components/about/creation.blade.php | 9 + .../about/components/about/features.blade.php | 102 +++++++ .../components/about/information.blade.php | 13 + .../about/components/about/instance.blade.php | 202 ++++++++++++++ .../about/components/about/ippan.blade.php | 15 + .../components/about/mentelife.blade.php | 9 + .../components/about/moderation.blade.php | 13 + .../about/components/about/other.blade.php | 5 + .../components/about/other/hardware.blade.php | 9 + .../about/components/about/terms.blade.php | 9 + .../about/components/features.blade.php | 110 ++++++++ .../about/components/isfeature.blade.php | 1 + .../about/components/lightpeer.blade.php | 6 + .../peertube/about/components/menu.blade.php | 7 + .../about/components/network.blade.php | 17 ++ .../about/components/statcard.blade.php | 8 + .../about/components/statistics.blade.php | 21 ++ .../pages/peertube/about/follows.blade.php | 10 + .../pages/peertube/about/instance.blade.php | 16 ++ .../pages/peertube/about/lightpeer.blade.php | 12 + routes/web.php | 7 +- 29 files changed, 987 insertions(+), 11 deletions(-) create mode 100644 public/css/about.css create mode 100644 resources/views/pages/peertube/about/components/about.blade.php create mode 100644 resources/views/pages/peertube/about/components/about/admin.blade.php create mode 100644 resources/views/pages/peertube/about/components/about/business.blade.php create mode 100644 resources/views/pages/peertube/about/components/about/cock.blade.php create mode 100644 resources/views/pages/peertube/about/components/about/creation.blade.php create mode 100644 resources/views/pages/peertube/about/components/about/features.blade.php create mode 100644 resources/views/pages/peertube/about/components/about/information.blade.php create mode 100644 resources/views/pages/peertube/about/components/about/instance.blade.php create mode 100644 resources/views/pages/peertube/about/components/about/ippan.blade.php create mode 100644 resources/views/pages/peertube/about/components/about/mentelife.blade.php create mode 100644 resources/views/pages/peertube/about/components/about/moderation.blade.php create mode 100644 resources/views/pages/peertube/about/components/about/other.blade.php create mode 100644 resources/views/pages/peertube/about/components/about/other/hardware.blade.php create mode 100644 resources/views/pages/peertube/about/components/about/terms.blade.php create mode 100644 resources/views/pages/peertube/about/components/features.blade.php create mode 100644 resources/views/pages/peertube/about/components/isfeature.blade.php create mode 100644 resources/views/pages/peertube/about/components/lightpeer.blade.php create mode 100644 resources/views/pages/peertube/about/components/menu.blade.php create mode 100644 resources/views/pages/peertube/about/components/network.blade.php create mode 100644 resources/views/pages/peertube/about/components/statcard.blade.php create mode 100644 resources/views/pages/peertube/about/components/statistics.blade.php create mode 100644 resources/views/pages/peertube/about/follows.blade.php create mode 100644 resources/views/pages/peertube/about/instance.blade.php create mode 100644 resources/views/pages/peertube/about/lightpeer.blade.php diff --git a/app/Http/Controllers/Engine.php b/app/Http/Controllers/Engine.php index 8ab9b80..bafa7bb 100644 --- a/app/Http/Controllers/Engine.php +++ b/app/Http/Controllers/Engine.php @@ -5,6 +5,7 @@ use Illuminate\Support\Facades\DB; class Engine { public $user = 0; + public $version = '0.1'; public $err = ''; public $warn = ''; public $info = ''; @@ -108,4 +109,4 @@ class Engine { return array_merge((array)$grouppermblg[0], (array)$grouppermusr[0]); } } -} \ No newline at end of file +} diff --git a/app/Http/Controllers/Peertube/About.php b/app/Http/Controllers/Peertube/About.php index 1838197..72258b7 100644 --- a/app/Http/Controllers/Peertube/About.php +++ b/app/Http/Controllers/Peertube/About.php @@ -8,22 +8,56 @@ use App\Http\Controllers\Peertube\Common; class About extends Common { private $common; + private $res; public function __construct () { $this->common = new Common; - } - - public function index () { - $res = [ + $this->res = [ 'page' => 'about', - 'style' => 'dummy', + 'style' => 'about', 'userinfo' => $this->common->user, + 'version' => $this->common->version, ]; - // $res['owner'] = $this->getOwner($id); - return view('pages.peertube.notyet', ['res' => $res]); } - function getOwner ($id) { - return $this->ptapi('/api/v1/accounts/'.$id); + public function instance () { + $this->res['about'] = $this->getAbout(); + $this->res['plugins'] = $this->getPlugins(); + $this->res['stats'] = $this->getStats(); + + return view('pages.peertube.about.instance', ['res' => $this->res]); + } + + public function lightpeer () { + $this->res['about'] = $this->getAbout(); + + return view('pages.peertube.about.lightpeer', ['res' => $this->res]); + } + + public function follows () { + $this->res['follower'] = $this->getFollower(); + $this->res['following'] = $this->getFollowing(); + + return view('pages.peertube.about.follows', ['res' => $this->res]); + } + + function getAbout () { + return $this->ptapi('/api/v1/config/about'); + } + + function getPlugins () { + return $this->ptapi('/api/v1/plugins/peertube-plugin-custome-page/public-settings'); + } + + function getStats () { + return $this->ptapi('/api/v1/server/stats'); + } + + function getFollower () { + return $this->ptapi('/api/v1/server/followers?start=0&count=100&sort=-createdAt&state=accepted'); + } + + function getFollowing () { + return $this->ptapi('/api/v1/server/following?start=0&count=100&sort=-createdAt&state=accepted'); } } diff --git a/app/helpers.php b/app/helpers.php index 0370839..56875a0 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -72,6 +72,35 @@ function ptComeSrc ($v) { return $res; } +function ptGetCatId ($i) { + $res = ''; + $i = (int)$i; + + switch ($i) { + case 1: $res = "音楽"; break; + case 2: $res = "映画"; break; + case 3: $res = "乗り物"; break; + case 4: $res = "芸術"; break; + case 5: $res = "スポーツ"; break; + case 6: $res = "旅行"; break; + case 7: $res = "ゲーム"; break; + case 8: $res = "人物"; break; + case 9: $res = "コメディ"; break; + case 10: $res = "エンターテインメント"; break; + case 11: $res = "ニュースや政治"; break; + case 12: $res = "ハウツー"; break; + case 13: $res = "教育"; break; + case 14: $res = "アクティビズム"; break; + case 15: $res = "科学やテクノロジー"; break; + case 16: $res = "動物"; break; + case 17: $res = "子ども向け"; break; + case 18: $res = "食べ物"; break; + default: break; + } + + return $res; +} + function ptFullHandle ($v) { return $v->name.($v->host != str_replace('https://', '', env('PEER_URI')) ? '@'.$v->host : ''); } diff --git a/public/css/about.css b/public/css/about.css new file mode 100644 index 0000000..ae5914b --- /dev/null +++ b/public/css/about.css @@ -0,0 +1,260 @@ +.about-instance-title { + display: flex; + justify-content: space-between; +} + +.about-instance-title .title { + font-size: 20px; + font-weight: 600; +} + +.about-instance-title .contact-admin, .about-instance-title .contact-admin:active, .about-instance-title .contact-admin:focus { + color: #fff; + background-color: var(--mainColor); +} + +.about-instance-title .contact-admin { + padding-inline-end: 17px; + padding-inline-start: 13px; + padding-top: 0; + padding-bottom: 0; + border: 0; + font-weight: 600; + font-size: 15px; + height: 30px; + line-height: 30px; + border-radius: 3px !important; + text-align: center; + cursor: pointer; + display: inline-block; + height: -moz-fit-content; + height: fit-content; +} + +.instance-badges { + font-size: 16px; + margin-bottom: 20px; +} + +.instance-badges .badge.category { + background-color: var(--mainColor); +} + +.instance-badges .badge { + margin-inline-end: 5px; + font-size: 12px; + font-weight: 600; +} + +.badge-primary { + color: #fcfcfc; + background-color: #007bff; +} + +.badge { + display: inline-block; + padding: .25em .4em; + font-size: 75%; + font-weight: 700; + line-height: 1.1; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border-radius: .25rem; + transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out; +} + +.badge-secondary { + color: #fcfcfc; + background-color: #6c757d; +} + +.short-description { + margin-top: 10px; +} + +.block { + margin-bottom: 75px; + font-size: 15px; +} + +.offset-content .anchor { + top: -151px; +} + +.anchor { + position: relative; + top: -70px; +} + +.anchor-link { + position: relative; +} + +.anchor-link .middle-title, .anchor-link .section-title { + display: inline-block; +} + +.middle-title { + text-transform: uppercase; + color: var(--mainColor); + font-weight: 700; + font-size: 13px; + margin-top: 0; + margin-bottom: 25px; +} + +.section-title { + font-weight: 600; + font-size: 16px !important; + margin-bottom: 5px; + display: flex; + align-items: center; +} + +table caption { + caption-side: top; + font-size: 15px; + font-weight: 600; + color: var(--mainForegroundColor); +} + +table { + font-size: 14px; + color: var(--mainForegroundColor); + border-collapse: collapse; +} + +.table { + width: 100%; + margin-bottom: 1rem; + color: #212529; +} + +table .label.label, table .sub-label.label { + font-weight: 600; +} + +table td { + vertical-align: middle; +} + +.table th, .table td { + padding: .75rem; + vertical-align: top; + border-top: 1px solid #dee2e6; +} + +th { + text-align: inherit; + text-align: -webkit-match-parent; +} + +*, *:before, *:after { + box-sizing: border-box; +} + +article, aside, figcaption, figure, footer, header, hgroup, main, nav, section { + display: block; +} + +h3 { + font-size: 1.25rem !important; +} + +.row { + margin: 0!important; +} + +.row { + display: flex; + flex-wrap: wrap; +} + +@media (min-width: 1200px) { + .col-xl-3 { + flex: 0 0 25%; + max-width: 25%; + } +} + +@media (min-width: 900px) { + .col-lg-4 { + flex: 0 0 33.33333333%; + max-width: 33.33333333%; + } +} + +.col-6 { + flex: 0 0 50%; + max-width: 50%; +} + +.col-uhd, .col-uhd-auto, .col-uhd-12, .col-uhd-11, .col-uhd-10, .col-uhd-9, .col-uhd-8, .col-uhd-7, .col-uhd-6, .col-uhd-5, .col-uhd-4, .col-uhd-3, .col-uhd-2, .col-uhd-1, .col-qhd, .col-qhd-auto, .col-qhd-12, .col-qhd-11, .col-qhd-10, .col-qhd-9, .col-qhd-8, .col-qhd-7, .col-qhd-6, .col-qhd-5, .col-qhd-4, .col-qhd-3, .col-qhd-2, .col-qhd-1, .col-fhd, .col-fhd-auto, .col-fhd-12, .col-fhd-11, .col-fhd-10, .col-fhd-9, .col-fhd-8, .col-fhd-7, .col-fhd-6, .col-fhd-5, .col-fhd-4, .col-fhd-3, .col-fhd-2, .col-fhd-1, .col-xxl, .col-xxl-auto, .col-xxl-12, .col-xxl-11, .col-xxl-10, .col-xxl-9, .col-xxl-8, .col-xxl-7, .col-xxl-6, .col-xxl-5, .col-xxl-4, .col-xxl-3, .col-xxl-2, .col-xxl-1, .col-xl, .col-xl-auto, .col-xl-12, .col-xl-11, .col-xl-10, .col-xl-9, .col-xl-8, .col-xl-7, .col-xl-6, .col-xl-5, .col-xl-4, .col-xl-3, .col-xl-2, .col-xl-1, .col-lg, .col-lg-auto, .col-lg-12, .col-lg-11, .col-lg-10, .col-lg-9, .col-lg-8, .col-lg-7, .col-lg-6, .col-lg-5, .col-lg-4, .col-lg-3, .col-lg-2, .col-lg-1, .col-md, .col-md-auto, .col-md-12, .col-md-11, .col-md-10, .col-md-9, .col-md-8, .col-md-7, .col-md-6, .col-md-5, .col-md-4, .col-md-3, .col-md-2, .col-md-1, .col-sm, .col-sm-auto, .col-sm-12, .col-sm-11, .col-sm-10, .col-sm-9, .col-sm-8, .col-sm-7, .col-sm-6, .col-sm-5, .col-sm-4, .col-sm-3, .col-sm-2, .col-sm-1, .col, .col-auto, .col-12, .col-11, .col-10, .col-9, .col-8, .col-7, .col-6, .col-5, .col-4, .col-3, .col-2, .col-1 { + position: relative; + width: 100%; + padding-right: 15px; + padding-left: 15px; +} + +.stat { + text-align: center; + margin-bottom: 1em; + overflow: hidden; +} + +.card { + background-color: var(--mainBackgroundColor); + border-color: #dee2e6; + position: relative; + display: flex; + flex-direction: column; + min-width: 0; + word-wrap: break-word; + background-clip: border-box; + border: 1px solid rgba(0,0,0,.125); + border-radius: .25rem; +} + +.stat .card-body { + z-index: 2; +} + +.card-body { + flex: 1 1 auto; + min-height: 1px; + padding: 1.25rem; +} + +.stat .stat-value { + font-size: 2.25em; + line-height: 1em; + margin: 0; +} + +.stat .stat-label { + font-size: 1.15em; + margin: 0; +} + +table .label.sub-label, table .sub-label.sub-label { + padding-inline-start: 30px; + font-weight: 400; +} + +.subtitle { + font-size: 18px; + font-weight: 600; + margin-bottom: 20px; +} + +a { + display: block; + width: -moz-fit-content; + width: fit-content; + margin-top: 3px; +} + +.main-row.network { + min-height: calc(100vh - 110px) !important; +} diff --git a/resources/views/pages/peertube/about/components/about.blade.php b/resources/views/pages/peertube/about/components/about.blade.php new file mode 100644 index 0000000..101c167 --- /dev/null +++ b/resources/views/pages/peertube/about/components/about.blade.php @@ -0,0 +1,22 @@ +
+
+
+ @include('pages.peertube.about.components.about.ippan') + @include('pages.peertube.about.components.about.admin') + @include('pages.peertube.about.components.about.creation') + @include('pages.peertube.about.components.about.mentelife') + @include('pages.peertube.about.components.about.business') + @include('pages.peertube.about.components.about.information') + @include('pages.peertube.about.components.about.moderation') + @include('pages.peertube.about.components.about.cock') + @include('pages.peertube.about.components.about.terms') + @include('pages.peertube.about.components.about.other') +
+
+ @include('pages.peertube.about.components.features') +
+
+ @include('pages.peertube.about.components.statistics') +
+
+
diff --git a/resources/views/pages/peertube/about/components/about/admin.blade.php b/resources/views/pages/peertube/about/components/about/admin.blade.php new file mode 100644 index 0000000..9d51f34 --- /dev/null +++ b/resources/views/pages/peertube/about/components/about/admin.blade.php @@ -0,0 +1,13 @@ +
+ +

管理者とインスタンスの持続可能性

+
+
+
+ +

運営者について

+
+
+ instance->administrator); ?> +
+
diff --git a/resources/views/pages/peertube/about/components/about/business.blade.php b/resources/views/pages/peertube/about/components/about/business.blade.php new file mode 100644 index 0000000..05853fb --- /dev/null +++ b/resources/views/pages/peertube/about/components/about/business.blade.php @@ -0,0 +1,9 @@ +
+
+ +

このインスタンスを維持するための資金をどうやって確保しているか

+
+
+ instance->businessModel); ?> +
+
diff --git a/resources/views/pages/peertube/about/components/about/cock.blade.php b/resources/views/pages/peertube/about/components/about/cock.blade.php new file mode 100644 index 0000000..cd1e350 --- /dev/null +++ b/resources/views/pages/peertube/about/components/about/cock.blade.php @@ -0,0 +1,9 @@ +
+
+ +

行動規範

+
+
+ instance->codeOfConduct); ?> +
+
diff --git a/resources/views/pages/peertube/about/components/about/creation.blade.php b/resources/views/pages/peertube/about/components/about/creation.blade.php new file mode 100644 index 0000000..9d8881f --- /dev/null +++ b/resources/views/pages/peertube/about/components/about/creation.blade.php @@ -0,0 +1,9 @@ +
+
+ +

なぜこのインスタンスを建てたのか

+
+
+ instance->creationReason); ?> +
+
diff --git a/resources/views/pages/peertube/about/components/about/features.blade.php b/resources/views/pages/peertube/about/components/about/features.blade.php new file mode 100644 index 0000000..f765383 --- /dev/null +++ b/resources/views/pages/peertube/about/components/about/features.blade.php @@ -0,0 +1,102 @@ +
+ + + + + + + + + @php + $censorloli = '不明'; + if ($conf->instance->defaultNSFWPolicy == 'display') $censorloli = '表示する(ロリは安全)'; + else if ($conf->instance->defaultNSFWPolicy == 'blur') $censorloli = '検閲する(自分で選べる)'; + else if ($conf->instance->defaultNSFWPolicy == 'do_not_list') $censorloli = 'BANする(インスタンス主は子供)'; + @endphp + + + + + @include('pages.peertube.about.components.isfeature', ['check' => $conf->signup->allowed]) + + + + + + + @include('pages.peertube.about.components.isfeature', ['check' => count($conf->transcoding->enabledResolutions) != 0]) + + + + + + + + + + + + + + + @include('pages.peertube.about.components.isfeature', ['check' => $conf->live->enabled]) + + + + @include('pages.peertube.about.components.isfeature', ['check' => $conf->live->transcoding->enabled && count($conf->live->transcoding->enabledResolutions) > 1]) + + + + + + + + + + + @include('pages.peertube.about.components.isfeature', ['check' => $conf->import->videos->http->enabled]) + + + + @include('pages.peertube.about.components.isfeature', ['check' => $conf->import->videos->torrent->enabled]) + + + + + + + @include('pages.peertube.about.components.isfeature', ['check' => $conf->tracker->enabled]) + + + + + + + @include('pages.peertube.about.components.isfeature', ['check' => $conf->search->searchIndex->enabled]) + + + + + + + + + + + + +
このインスタンスの特徴
PeerTubeバージョン{{ $conf->serverVersion }}
+
デフォルトのNSFW/センシティブな動画へのポリシー
+
ユーザーは設定変更ができます
+
{{ $censorloli }}
新規ユーザー登録
動画のアップロード
複数の解像度へのトランスコーディング
動画のアップロード + {{ $conf->autoBlacklist->videos->ofUsers->enabled ? '手動で管理者に確認する事が必要です。' : '自動的に投稿されます' }} +
動画容量の制限 {{ $conf->user->videoQuota / 1024 / 1024 / 1024 }} GiB ({{ $conf->user->videoQuota / 1024 / 1024 / 1024 }} GiB per day)
ライブ配信
ライブ配信
複数の解像度でのライブ配信のトランスコーディング
同時ライブ配信の最大{{ $conf->live->maxUserLives }} ユーザー / {{ $conf->live->maxInstanceLives }} インスタンス
インポート
HTTP でのインポート (YouTube、Vimeo、ダイレクトURLなど)
Torrent でのインポート
プレーヤー
P2P機能
検索
他のインスタンスのコンテンツ
Plugins & Themes
Available themes + @foreach ($conf->theme->registered as $them) + {{ $them->name }} + @endforeach +
Plugins enabled + @foreach ($conf->plugin->registered as $plug) + {{ $plug->name }} + @endforeach +
+
diff --git a/resources/views/pages/peertube/about/components/about/information.blade.php b/resources/views/pages/peertube/about/components/about/information.blade.php new file mode 100644 index 0000000..6e16480 --- /dev/null +++ b/resources/views/pages/peertube/about/components/about/information.blade.php @@ -0,0 +1,13 @@ +
+ +

インスタンス情報

+
+
+
+ +

説明

+
+
+ instance->description); ?> +
+
diff --git a/resources/views/pages/peertube/about/components/about/instance.blade.php b/resources/views/pages/peertube/about/components/about/instance.blade.php new file mode 100644 index 0000000..b02f174 --- /dev/null +++ b/resources/views/pages/peertube/about/components/about/instance.blade.php @@ -0,0 +1,202 @@ + +
+
+
+

{{ $res['about']->instance->name }}について

+ Contact us +
+
+ @foreach ($res['about']->instance->categories as $cat) + {{ ptGetCatId($cat) }} + @endforeach + @foreach ($res['about']->instance->languages as $lan) + {{ $lan }} + @endforeach +
+
+
{{ $res['about']->instance->shortDescription }}
+
+
+ +

管理者とインスタンスの持続可能性

+
+
+
+ +

運営者について

+
+
+ instance->administrator); ?> +
+
+
+
+ +

なぜこのインスタンスを建てたのか

+
+
+ instance->creationReason); ?> +
+
+ + +
+ +

インスタンス情報

+
+
+
+ +

説明

+
+ +
+
+ instance->description); ?> +
+
+
+
+
+ +

モデレーション

+
+
+
+ +

モデレーションについて

+
+
+ instance->moderationInformation); ?> +
+
+
+
+ +

行動規範

+
+
+ instance->codeOfConduct); ?> +
+
+
+
+ +

利用規約

+
+
+ instance->terms); ?> +
+
+ @include('pages.peertube.about.components.about.other') +
+
+

特徴

+
+ @include('pages.peertube.about.components.about.features') +
+
+ +

統計

+
+ +
+

ローカル

+
+
+
+
+

{{ $res['stats']->totalUsers }}

+

ユーザー

+
+
+
+
+
+
+

{{ $res['stats']->totalLocalVideos }}

+

動画

+
+
+
+
+
+
+

{{ $res['stats']->totalLocalVideoViews }}

+

動画視聴回数

+
+
+
+
+
+
+

{{ $res['stats']->totalLocalVideoComments }}

+

動画のコメント

+
+
+
+
+
+
+

{{ $res['stats']->totalLocalVideoFilesSize / 1024 / 1024 / 1024 }} GiB

+

合計アップロードサイズ

+
+
+
+
+

他インスタンスとの連合

+
+
+
+
+

{{ $res['stats']->totalVideos }}

+

動画

+
+
+
+
+
+
+

{{ $res['stats']->totalVideoComments }}

+

動画のコメント

+
+
+
+
+
+
+

{{ $res['stats']->totalInstanceFollowers }}

+

フォロワー

+
+
+
+
+
+
+

{{ $res['stats']->totalInstanceFollowing }}

+

フォロー

+
+
+
+
+
+
+
+
+
diff --git a/resources/views/pages/peertube/about/components/about/ippan.blade.php b/resources/views/pages/peertube/about/components/about/ippan.blade.php new file mode 100644 index 0000000..e7c2d19 --- /dev/null +++ b/resources/views/pages/peertube/about/components/about/ippan.blade.php @@ -0,0 +1,15 @@ +
+

{{ $res['about']->instance->name }}について

+ 打ち合わせ +
+
+ @foreach ($res['about']->instance->categories as $cat) + {{ ptGetCatId($cat) }} + @endforeach + @foreach ($res['about']->instance->languages as $lan) + {{ $lan }} + @endforeach +
+
+
{{ $res['about']->instance->shortDescription }}
+
diff --git a/resources/views/pages/peertube/about/components/about/mentelife.blade.php b/resources/views/pages/peertube/about/components/about/mentelife.blade.php new file mode 100644 index 0000000..e828f26 --- /dev/null +++ b/resources/views/pages/peertube/about/components/about/mentelife.blade.php @@ -0,0 +1,9 @@ +
+
+ +

このインスタンスを運営者はどれぐらいの期間続ける予定か

+
+
+ instance->maintenanceLifetime); ?> +
+
diff --git a/resources/views/pages/peertube/about/components/about/moderation.blade.php b/resources/views/pages/peertube/about/components/about/moderation.blade.php new file mode 100644 index 0000000..397106e --- /dev/null +++ b/resources/views/pages/peertube/about/components/about/moderation.blade.php @@ -0,0 +1,13 @@ +
+ +

モデレーション

+
+
+
+ +

モデレーションについて

+
+
+ instance->moderationInformation); ?> +
+
diff --git a/resources/views/pages/peertube/about/components/about/other.blade.php b/resources/views/pages/peertube/about/components/about/other.blade.php new file mode 100644 index 0000000..2cbf769 --- /dev/null +++ b/resources/views/pages/peertube/about/components/about/other.blade.php @@ -0,0 +1,5 @@ +
+ +

その他の情報

+
+@include('pages.peertube.about.components.about.other.hardware') diff --git a/resources/views/pages/peertube/about/components/about/other/hardware.blade.php b/resources/views/pages/peertube/about/components/about/other/hardware.blade.php new file mode 100644 index 0000000..2d82120 --- /dev/null +++ b/resources/views/pages/peertube/about/components/about/other/hardware.blade.php @@ -0,0 +1,9 @@ +
+
+ +

ハードウェアについて

+
+
+ instance->hardwareInformation); ?> +
+
diff --git a/resources/views/pages/peertube/about/components/about/terms.blade.php b/resources/views/pages/peertube/about/components/about/terms.blade.php new file mode 100644 index 0000000..9aaca5d --- /dev/null +++ b/resources/views/pages/peertube/about/components/about/terms.blade.php @@ -0,0 +1,9 @@ +
+
+ +

利用規約

+
+
+ instance->terms); ?> +
+
diff --git a/resources/views/pages/peertube/about/components/features.blade.php b/resources/views/pages/peertube/about/components/features.blade.php new file mode 100644 index 0000000..6fbae26 --- /dev/null +++ b/resources/views/pages/peertube/about/components/features.blade.php @@ -0,0 +1,110 @@ + +

特徴

+ +
+ + + + + + + + + + + + + + + + + @include('pages.peertube.about.components.isfeature', ['check' => $conf->signup->allowed]) + + + + + + + @include('pages.peertube.about.components.isfeature', ['check' => count($conf->transcoding->enabledResolutions) != 0]) + + + + + + + + + + + + + + + @include('pages.peertube.about.components.isfeature', ['check' => $conf->live->enabled]) + + + + @include('pages.peertube.about.components.isfeature', ['check' => $conf->live->transcoding->enabled && count($conf->live->transcoding->enabledResolutions) > 1]) + + + + + + + + + + + @include('pages.peertube.about.components.isfeature', ['check' => $conf->import->videos->http->enabled]) + + + + @include('pages.peertube.about.components.isfeature', ['check' => $conf->import->videos->torrent->enabled]) + + + + + + + @include('pages.peertube.about.components.isfeature', ['check' => $conf->tracker->enabled]) + + + + + + + @include('pages.peertube.about.components.isfeature', ['check' => $conf->search->searchIndex->enabled]) + + + + + + + + + + + + +
このインスタンスの特徴
PeerTubeバージョン{{ $conf->serverVersion }}
LightPeerバージョン{{ $res['version'] }}
+
デフォルトのNSFW/センシティブな動画へのポリシー
+
ユーザーは設定変更ができます
+
+ @if ($conf->instance->defaultNSFWPolicy == 'display') 表示する(ロリは安全) + @elseif ($conf->instance->defaultNSFWPolicy == 'blur') 検閲する(自分で選べる) + @elseif ($conf->instance->defaultNSFWPolicy == 'do_not_list') BANする(インスタンス主は子供) + @else 不明 + @endif +
新規ユーザー登録
動画のアップロード
複数の解像度へのトランスコーディング
動画のアップロード + {{ $conf->autoBlacklist->videos->ofUsers->enabled ? '手動で管理者に確認する事が必要です。' : '自動的に投稿されます' }} +
動画容量の制限 {{ $conf->user->videoQuota / 1024 / 1024 / 1024 }} GiB ({{ $conf->user->videoQuota / 1024 / 1024 / 1024 }} GiB per day)
ライブ配信
ライブ配信
複数の解像度でのライブ配信のトランスコーディング
同時ライブ配信の最大{{ $conf->live->maxUserLives }} ユーザー / {{ $conf->live->maxInstanceLives }} インスタンス
インポート
HTTP でのインポート (YouTube、Vimeo、ダイレクトURLなど)
Torrent でのインポート
プレーヤー
P2P機能
検索
他のインスタンスのコンテンツ
Plugins & Themes
Available themes + @foreach ($conf->theme->registered as $them) + {{ $them->name }} + @endforeach +
Plugins enabled + @foreach ($conf->plugin->registered as $plug) + {{ $plug->name }} + @endforeach +
+
+
diff --git a/resources/views/pages/peertube/about/components/isfeature.blade.php b/resources/views/pages/peertube/about/components/isfeature.blade.php new file mode 100644 index 0000000..acde4ef --- /dev/null +++ b/resources/views/pages/peertube/about/components/isfeature.blade.php @@ -0,0 +1 @@ +{{ $check ? '可' : '不可' }} diff --git a/resources/views/pages/peertube/about/components/lightpeer.blade.php b/resources/views/pages/peertube/about/components/lightpeer.blade.php new file mode 100644 index 0000000..987d083 --- /dev/null +++ b/resources/views/pages/peertube/about/components/lightpeer.blade.php @@ -0,0 +1,6 @@ +
+ PeerTube {{ $res['userinfo']['config']->serverVersion }}はChocobozzzさんのプロジェクトです。
+ PeerTubeは一番好みな動画SNSですが、強制JSに反対しますので、LightPeer {{ $res['version'] }}を作りました。

+ + 現在、LightPeerは076動画というインスタンス向けフロントエンドですが、全てのインスタンスに対応予定です。 +
diff --git a/resources/views/pages/peertube/about/components/menu.blade.php b/resources/views/pages/peertube/about/components/menu.blade.php new file mode 100644 index 0000000..3425f9c --- /dev/null +++ b/resources/views/pages/peertube/about/components/menu.blade.php @@ -0,0 +1,7 @@ + diff --git a/resources/views/pages/peertube/about/components/network.blade.php b/resources/views/pages/peertube/about/components/network.blade.php new file mode 100644 index 0000000..491e425 --- /dev/null +++ b/resources/views/pages/peertube/about/components/network.blade.php @@ -0,0 +1,17 @@ +
+
+

フォロー

+
+

フォロワーのインスタンス({{ $res['follower']->total }})

+ @foreach ($res['follower']->data as $x) + {{ $x->follower->host }} + @endforeach +
+
+

フォローしてるインスタンス({{ $res['following']->total }})

+ @foreach ($res['following']->data as $y) + {{ $y->following->host }} + @endforeach +
+
+
diff --git a/resources/views/pages/peertube/about/components/statcard.blade.php b/resources/views/pages/peertube/about/components/statcard.blade.php new file mode 100644 index 0000000..3d99d65 --- /dev/null +++ b/resources/views/pages/peertube/about/components/statcard.blade.php @@ -0,0 +1,8 @@ +
+
+
+

{{ $value }}

+

{{ $label }}

+
+
+
diff --git a/resources/views/pages/peertube/about/components/statistics.blade.php b/resources/views/pages/peertube/about/components/statistics.blade.php new file mode 100644 index 0000000..4619683 --- /dev/null +++ b/resources/views/pages/peertube/about/components/statistics.blade.php @@ -0,0 +1,21 @@ +
+ +

統計

+
+
+

ローカル

+
+ @include('pages.peertube.about.components.statcard', ['value' => $res['stats']->totalUsers, 'label' => 'ユーザー']) + @include('pages.peertube.about.components.statcard', ['value' => $res['stats']->totalLocalVideos, 'label' => '動画']) + @include('pages.peertube.about.components.statcard', ['value' => $res['stats']->totalLocalVideoViews, 'label' => '動画視聴回数']) + @include('pages.peertube.about.components.statcard', ['value' => $res['stats']->totalLocalVideoComments, 'label' => '動画のコメント']) + @include('pages.peertube.about.components.statcard', ['value' => round($res['stats']->totalLocalVideoFilesSize / 1024 / 1024 / 1024, 1).' GiB', 'label' => '合計アップロードサイズ']) +
+

他インスタンスとの連合

+
+ @include('pages.peertube.about.components.statcard', ['value' => $res['stats']->totalVideos, 'label' => '動画']) + @include('pages.peertube.about.components.statcard', ['value' => $res['stats']->totalVideoComments, 'label' => '動画のコメント']) + @include('pages.peertube.about.components.statcard', ['value' => $res['stats']->totalInstanceFollowers, 'label' => 'フォロワー']) + @include('pages.peertube.about.components.statcard', ['value' => $res['stats']->totalInstanceFollowing, 'label' => 'フォロー']) +
+
diff --git a/resources/views/pages/peertube/about/follows.blade.php b/resources/views/pages/peertube/about/follows.blade.php new file mode 100644 index 0000000..de92055 --- /dev/null +++ b/resources/views/pages/peertube/about/follows.blade.php @@ -0,0 +1,10 @@ +@extends('layout') + +@section('content') +
+
+ @include('pages.peertube.about.components.menu', ['active' => 'follows']) + @include('pages.peertube.about.components.network') +
+
+@endsection diff --git a/resources/views/pages/peertube/about/instance.blade.php b/resources/views/pages/peertube/about/instance.blade.php new file mode 100644 index 0000000..d451a4c --- /dev/null +++ b/resources/views/pages/peertube/about/instance.blade.php @@ -0,0 +1,16 @@ +@extends('layout') + +@php + $conf = $res['userinfo']['config']; +@endphp + +@section('content') +
+
+
+ @include('pages.peertube.about.components.menu', ['active' => 'instance']) + @include('pages.peertube.about.components.about') +
+
+
+@endsection diff --git a/resources/views/pages/peertube/about/lightpeer.blade.php b/resources/views/pages/peertube/about/lightpeer.blade.php new file mode 100644 index 0000000..81440b4 --- /dev/null +++ b/resources/views/pages/peertube/about/lightpeer.blade.php @@ -0,0 +1,12 @@ +@extends('layout') + +@section('content') +
+
+
+ @include('pages.peertube.about.components.menu', ['active' => 'lightpeer']) + @include('pages.peertube.about.components.lightpeer') +
+
+
+@endsection diff --git a/routes/web.php b/routes/web.php index 5139dd0..3edfbaa 100644 --- a/routes/web.php +++ b/routes/web.php @@ -16,7 +16,12 @@ Route::group(['prefix' => 'login'], function () { }); Route::any('/signup', 'Peertube\Signup@index'); -Route::any('/about', 'Peertube\About@index'); +Route::group(['prefix' => 'about'], function () { + Route::any('/', 'Peertube\About@instance'); + Route::any('/instance', 'Peertube\About@instance'); + Route::any('/lightpeer', 'Peertube\About@lightpeer'); + Route::any('/follows', 'Peertube\About@follows'); +}); Route::group(['prefix' => 'my-account'], function () { Route::any('/', 'Peertube\Myaccount\Settings@index');