diff --git a/app/Http/Controllers/Peertube/About.php b/app/Http/Controllers/Peertube/About.php
index 54d3d08..1838197 100644
--- a/app/Http/Controllers/Peertube/About.php
+++ b/app/Http/Controllers/Peertube/About.php
@@ -24,6 +24,6 @@ class About extends Common {
}
function getOwner ($id) {
- return $this->ptapi_get('/api/v1/accounts/'.$id);
+ return $this->ptapi('/api/v1/accounts/'.$id);
}
}
diff --git a/app/Http/Controllers/Peertube/Account.php b/app/Http/Controllers/Peertube/Account.php
index dc62945..aa53ac5 100644
--- a/app/Http/Controllers/Peertube/Account.php
+++ b/app/Http/Controllers/Peertube/Account.php
@@ -33,14 +33,14 @@ class Account extends Common {
}
function getOwner ($id) {
- return $this->ptapi_get('/api/v1/accounts/'.$id);
+ return $this->ptapi('/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');
+ return $this->ptapi('/api/v1/accounts/'.$id.'/video-channels?start=0&count=20&sort=-updatedAt&withStats=false');
}
function getVideo ($id) {
- return $this->ptapi_get('/api/v1/video-channels/'.$id.'/videos?start=0&count=5&sort=-publishedAt&nsfw=both');
+ return $this->ptapi('/api/v1/video-channels/'.$id.'/videos?start=0&count=5&sort=-publishedAt&nsfw=both');
}
}
diff --git a/app/Http/Controllers/Peertube/Admin/Users.php b/app/Http/Controllers/Peertube/Admin/Users.php
index fc912b5..a659f08 100644
--- a/app/Http/Controllers/Peertube/Admin/Users.php
+++ b/app/Http/Controllers/Peertube/Admin/Users.php
@@ -14,10 +14,11 @@ class Users extends Common {
}
public function index () {
- if (!isset($this->common->user->me) || is_null($this->common->user->me)) {
- if ($this->common->user->me->adminFlags != 1) {
+ if (!isset($this->common->user['me']) || is_null($this->common->user['me'])) {
+ if ($this->common->user['me']->adminFlags != 1) {
return redirect('/peertube/videos/local');
}
+ return redirect('/peertube/login');
}
$res = [
@@ -30,6 +31,6 @@ class Users extends Common {
}
function getOwner ($id) {
- return $this->ptapi_get('/api/v1/accounts/'.$id);
+ return $this->ptapi('/api/v1/accounts/'.$id);
}
}
diff --git a/app/Http/Controllers/Peertube/Channel.php b/app/Http/Controllers/Peertube/Channel.php
index 8e8e0fc..d7d0f8f 100644
--- a/app/Http/Controllers/Peertube/Channel.php
+++ b/app/Http/Controllers/Peertube/Channel.php
@@ -31,14 +31,14 @@ class Channel extends Common {
}
function getChannel ($id) {
- return $this->ptapi_get('/api/v1/video-channels/'.$id);
+ return $this->ptapi('/api/v1/video-channels/'.$id);
}
function getVideo ($id, $start, $count) {
- return $this->ptapi_get('/api/v1/video-channels/'.$id.'/videos?start='.$start.'&count='.$count.'&sort=-publishedAt&skipCount=false&nsfw=both');
+ return $this->ptapi('/api/v1/video-channels/'.$id.'/videos?start='.$start.'&count='.$count.'&sort=-publishedAt&skipCount=false&nsfw=both');
}
function getPlaylist ($id, $start, $count) {
- return $this->ptapi_get('/api/v1/video-channels/'.$id.'/video-playlists?start='.$start.'&count='.$count);
+ return $this->ptapi('/api/v1/video-channels/'.$id.'/video-playlists?start='.$start.'&count='.$count);
}
}
diff --git a/app/Http/Controllers/Peertube/Common.php b/app/Http/Controllers/Peertube/Common.php
index fb7d8ea..82f54b6 100644
--- a/app/Http/Controllers/Peertube/Common.php
+++ b/app/Http/Controllers/Peertube/Common.php
@@ -9,33 +9,64 @@ use App\Http\Controllers\Engine;
class Common extends Engine {
public $user = [];
private $engine;
+ private $access_token;
+ private $refresh_token;
public function __construct () {
+ $this->access_token = isset($_COOKIE['access_token']) ? $_COOKIE['access_token'] : null;
+ $this->refresh_token = isset($_COOKIE['refresh_token']) ? $_COOKIE['refresh_token'] : null;
$this->user['local'] = $this->getLocal();
- $this->user['me'] = $this->getMe();
+ $this->user['me'] = $this->getMe($this->user['local']);
+ $this->user['config'] = $this->getConfig();
$this->user['notify'] = $this->getNotify();
$this->engine = new Engine;
}
public function getLocal () {
- return null;
- return $this->ptapi_get('/api/v1/oauth-clients/local');
+ return $this->ptapi('/api/v1/oauth-clients/local');
}
- public function getMe () {
+ public function getMe ($param) {
+ if (!isset($_COOKIE['access_token']) && isset($_COOKIE['refresh_token'])) {
+ $r = new Request;
+ $login = new \App\Http\Controllers\Peertube\Login;
+ $r->client_id = $param->client_id;
+ $r->client_secret = $param->client_secret;
+ $r->refresh_token = $this->refresh_token;
+ $this->login($r);
+ $this->access_token = $_COOKIE['access_token'];
+ $this->refresh_token = $_COOKIE['refresh_token'];
+ }
+
+ if (isset($_COOKIE['access_token']) && isset($_COOKIE['refresh_token'])) return $this->ptapi('/api/v1/users/me');
return null;
- return $this->ptapi_get('/api/v1/users/me');
+ }
+
+ public function getConfig () {
+ return $this->ptapi('/api/v1/config/');
}
public function getNotify () {
+ if (isset($_COOKIE['access_token']) && isset($_COOKIE['refresh_token'])) return $this->ptapi('/api/v1/users/me/notifications?start=0&count=0&unread=true');
return null;
- return $this->ptapi_get('/api/v1/users/me/notifications?start=0&count=0&unread=true');
}
- public function ptapi_get ($url) {
+ public function ptapi ($url, $param='', $method='get', $contenttype='json') {
+ $this->access_token = isset($_COOKIE['access_token']) ? $_COOKIE['access_token'] : null;
+ $this->refresh_token = isset($_COOKIE['refresh_token']) ? $_COOKIE['refresh_token'] : null;
+ $header = ['Content-Type: application/'.$contenttype, 'Host: '.str_replace('https://', '', env('PEER_URI'))];
+
+ if (!is_null($this->access_token)) {
+ $header[] = 'Authorization: Bearer '.$this->access_token;
+ }
+
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, env('PEER_URI').$url);
- curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
+ curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
+ if ($method == 'post') {
+ curl_setopt($ch, CURLOPT_POST, 1);
+ if ($param != '') curl_setopt($ch, CURLOPT_POSTFIELDS, $param);
+ }
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$get = curl_exec($ch);
diff --git a/app/Http/Controllers/Peertube/Home.php b/app/Http/Controllers/Peertube/Home.php
index fe1b2d7..cc6a019 100644
--- a/app/Http/Controllers/Peertube/Home.php
+++ b/app/Http/Controllers/Peertube/Home.php
@@ -19,16 +19,17 @@ class Home extends Common {
'style' => 'videoslist',
'userinfo' => $this->common->user,
];
+
$res['new'] = $this->getNewest();
$res['hot'] = $this->getPopularest();
return view('pages.peertube.home', ['res' => $res]);
}
function getNewest () {
- return $this->ptapi_get('/api/v1/videos?start=0&count=8&sort=-publishedAt&skipCount=true&isLocal=true&nsfw=both');
+ return $this->ptapi('/api/v1/videos?start=0&count=8&sort=-publishedAt&skipCount=true&isLocal=true&nsfw=both');
}
function getPopularest () {
- return $this->ptapi_get('/api/v1/videos?start=0&count=8&sort=-trending&skipCount=true&isLocal=true&nsfw=both');
+ return $this->ptapi('/api/v1/videos?start=0&count=8&sort=-trending&skipCount=true&isLocal=true&nsfw=both');
}
}
diff --git a/app/Http/Controllers/Peertube/Login.php b/app/Http/Controllers/Peertube/Login.php
index 103272f..a6a1336 100644
--- a/app/Http/Controllers/Peertube/Login.php
+++ b/app/Http/Controllers/Peertube/Login.php
@@ -13,21 +13,50 @@ class Login extends Common {
$this->common = new Common;
}
- public function index () {
- if (isset($this->common->user->me) && !is_null($this->common->user->me)) {
- return redirect('/peertube/videos/local');
+ public function index ($err=null) {
+ if (isset($this->common->user['me']) && !is_null($this->common->user['me'])) {
+ return redirect('/peertube/home');
}
$res = [
- 'page' => 'dummy',
- 'style' => 'dummy',
+ 'page' => 'login',
+ 'style' => 'login',
'userinfo' => $this->common->user,
+ 'err' => $err
];
- // $res['owner'] = $this->getOwner($id);
- return view('pages.peertube.notyet', ['res' => $res]);
+
+ return view('pages.peertube.login', ['res' => $res]);
}
- function getOwner ($id) {
- return $this->ptapi_get('/api/v1/accounts/'.$id);
+ public function login (Request $r) {
+ if (isset($this->common->user['me']) && !is_null($this->common->user['me'])) {
+ return redirect('/peertube/videos/local');
+ }
+
+ $param = [
+ 'client_id' => $this->common->user['local']->client_id,
+ 'client_secret' => $this->common->user['local']->client_secret,
+ 'grant_type' => 'password',
+ ];
+
+ if (isset($r->username) && isset($r->password)) {
+ $param['username'] = $r->username;
+ $param['password'] = $r->password;
+ }
+ else if (isset($r->refresh_token)) {
+ $param['refresh_token'] = $r->refresh_token;
+ }
+
+ $res = $this->ptapi('/api/v1/users/token', http_build_query($param), 'post', 'x-www-form-urlencoded');
+ $err = null;
+
+ if (isset($res->access_token) && isset($res->refresh_token)) {
+ setcookie('access_token', $res->access_token, time()+(int)$r->expires_in, '/', $_SERVER['HTTP_HOST'], 0, 1); // 24時間
+ setcookie('refresh_token', $res->refresh_token, time()+(int)$r->refresh_token_expires_in, '/', $_SERVER['HTTP_HOST'], 0, 1); // 14日間
+
+ return redirect('/peertube/videos/local');
+ }
+
+ return $this->index(isset($res->error) ? $res->error : '不正なエラー');
}
}
diff --git a/app/Http/Controllers/Peertube/Logout.php b/app/Http/Controllers/Peertube/Logout.php
index 7d93987..33ca314 100644
--- a/app/Http/Controllers/Peertube/Logout.php
+++ b/app/Http/Controllers/Peertube/Logout.php
@@ -13,21 +13,13 @@ class Logout extends Common {
$this->common = new Common;
}
- public function index () {
- if (!isset($this->common->user->me) || is_null($this->common->user->me)) {
- return redirect('/peertube/login');
- }
+ public function logout () {
+ $this->ptapi('/api/v1/users/revoke-token', '', 'post');
+ unset($_COOKIE['access_token']);
+ unset($_COOKIE['refresh_token']);
+ setcookie('access_token', '', time() - 3600, '/', $_SERVER['HTTP_HOST'], 0, 1);
+ setcookie('refresh_token', '', time() - 3600, '/', $_SERVER['HTTP_HOST'], 0, 1);
- $res = [
- 'page' => 'dummy',
- 'style' => 'dummy',
- 'userinfo' => $this->common->user,
- ];
- // $res['owner'] = $this->getOwner($id);
- return view('pages.peertube.notyet', ['res' => $res]);
- }
-
- function getOwner ($id) {
- return $this->ptapi_get('/api/v1/accounts/'.$id);
+ return redirect('/peertube/home');
}
}
diff --git a/app/Http/Controllers/Peertube/Myaccount.php b/app/Http/Controllers/Peertube/Myaccount.php
index 59e75a6..1a2a1f6 100644
--- a/app/Http/Controllers/Peertube/Myaccount.php
+++ b/app/Http/Controllers/Peertube/Myaccount.php
@@ -14,7 +14,7 @@ class Myaccount extends Common {
}
public function index () {
- if (!isset($this->common->user->me) || is_null($this->common->user->me)) {
+ if (!isset($this->common->user['me']) || is_null($this->common->user['me'])) {
return redirect('/peertube/login');
}
@@ -28,6 +28,6 @@ class Myaccount extends Common {
}
function getOwner ($id) {
- return $this->ptapi_get('/api/v1/accounts/'.$id);
+ return $this->ptapi('/api/v1/accounts/'.$id);
}
}
diff --git a/app/Http/Controllers/Peertube/Myaccount/Abuses.php b/app/Http/Controllers/Peertube/Myaccount/Abuses.php
new file mode 100644
index 0000000..f2e478d
--- /dev/null
+++ b/app/Http/Controllers/Peertube/Myaccount/Abuses.php
@@ -0,0 +1,37 @@
+common = new Common;
+ }
+
+ public function index () {
+ if (!isset($this->common->user['me']) || is_null($this->common->user['me'])) {
+ if ($this->common->user['me']->adminFlags != 1) {
+ return redirect('/peertube/videos/local');
+ }
+ return redirect('/peertube/login');
+ }
+
+ $res = [
+ 'page' => 'dummy',
+ 'style' => 'dummy',
+ 'userinfo' => $this->common->user,
+ ];
+ // $res['owner'] = $this->getOwner($id);
+ return view('pages.peertube.notyet', ['res' => $res]);
+ }
+
+ function getOwner ($id) {
+ //https://video.076.ne.jp/api/v1/users/me/subscriptions?start=0&count=10
+ return $this->ptapi('/api/v1/accounts/'.$id);
+ }
+}
diff --git a/app/Http/Controllers/Peertube/Myaccount/Applications.php b/app/Http/Controllers/Peertube/Myaccount/Applications.php
new file mode 100644
index 0000000..130dbfb
--- /dev/null
+++ b/app/Http/Controllers/Peertube/Myaccount/Applications.php
@@ -0,0 +1,34 @@
+common = new Common;
+ }
+
+ public function index () {
+ if (!isset($this->common->user['me']) || is_null($this->common->user['me'])) {
+ return redirect('/peertube/login');
+ }
+
+ $res = [
+ 'page' => 'dummy',
+ 'style' => 'dummy',
+ 'userinfo' => $this->common->user,
+ ];
+ // $res['owner'] = $this->getOwner($id);
+ return view('pages.peertube.notyet', ['res' => $res]);
+ }
+
+ function getOwner ($id) {
+ //https://video.076.ne.jp/api/v1/users/me/subscriptions?start=0&count=10
+ return $this->ptapi('/api/v1/accounts/'.$id);
+ }
+}
diff --git a/app/Http/Controllers/Peertube/Myaccount/Blocklist/Accounts.php b/app/Http/Controllers/Peertube/Myaccount/Blocklist/Accounts.php
new file mode 100644
index 0000000..d27f6a2
--- /dev/null
+++ b/app/Http/Controllers/Peertube/Myaccount/Blocklist/Accounts.php
@@ -0,0 +1,34 @@
+common = new Common;
+ }
+
+ public function index () {
+ if (!isset($this->common->user['me']) || is_null($this->common->user['me'])) {
+ return redirect('/peertube/login');
+ }
+
+ $res = [
+ 'page' => 'dummy',
+ 'style' => 'dummy',
+ 'userinfo' => $this->common->user,
+ ];
+ // $res['owner'] = $this->getOwner($id);
+ return view('pages.peertube.notyet', ['res' => $res]);
+ }
+
+ function getOwner ($id) {
+ //https://video.076.ne.jp/api/v1/users/me/subscriptions?start=0&count=10
+ return $this->ptapi('/api/v1/accounts/'.$id);
+ }
+}
diff --git a/app/Http/Controllers/Peertube/Myaccount/Blocklist/Servers.php b/app/Http/Controllers/Peertube/Myaccount/Blocklist/Servers.php
new file mode 100644
index 0000000..669dbd8
--- /dev/null
+++ b/app/Http/Controllers/Peertube/Myaccount/Blocklist/Servers.php
@@ -0,0 +1,34 @@
+common = new Common;
+ }
+
+ public function index () {
+ if (!isset($this->common->user['me']) || is_null($this->common->user['me'])) {
+ return redirect('/peertube/login');
+ }
+
+ $res = [
+ 'page' => 'dummy',
+ 'style' => 'dummy',
+ 'userinfo' => $this->common->user,
+ ];
+ // $res['owner'] = $this->getOwner($id);
+ return view('pages.peertube.notyet', ['res' => $res]);
+ }
+
+ function getOwner ($id) {
+ //https://video.076.ne.jp/api/v1/users/me/subscriptions?start=0&count=10
+ return $this->ptapi('/api/v1/accounts/'.$id);
+ }
+}
diff --git a/app/Http/Controllers/Peertube/Myaccount/Notification.php b/app/Http/Controllers/Peertube/Myaccount/Notification.php
new file mode 100644
index 0000000..a92db26
--- /dev/null
+++ b/app/Http/Controllers/Peertube/Myaccount/Notification.php
@@ -0,0 +1,48 @@
+common = new Common;
+ $this->count = 20;
+ }
+
+ public function index ($page=0) {
+ if (!isset($this->common->user['me']) || is_null($this->common->user['me'])) {
+ return redirect('/peertube/login');
+ }
+
+ $res = [
+ 'page' => 'notification',
+ 'style' => 'myaccount',
+ 'paginate' => $page,
+ 'pagetotal' => 500,
+ 'userinfo' => $this->common->user,
+ ];
+
+ $res['notification'] = $this->getNotification(($page*$this->count), $this->count);
+ return view('pages.peertube.my-account.notifications', ['res' => $res]);
+ }
+
+ function getNotification ($start, $count) {
+ return $this->ptapi('/api/v1/users/me/notifications?start='.$start.'&count='.$count.'&sort=-createdAt');
+ }
+
+ public function read (Request $r) {
+ $this->ptapi('/api/v1/users/me/notifications/read', json_encode(['ids' => [(int)$r->id]]), 'post');
+ return redirect('/peertube/my-account/notifications');
+ }
+
+ public function readAll () {
+ $this->ptapi('/api/v1/users/me/notifications/read-all', '', 'post');
+ return redirect('/peertube/my-account/notifications');
+ }
+}
diff --git a/app/Http/Controllers/Peertube/Notification.php b/app/Http/Controllers/Peertube/Myaccount/Settings.php
similarity index 66%
rename from app/Http/Controllers/Peertube/Notification.php
rename to app/Http/Controllers/Peertube/Myaccount/Settings.php
index 24faf63..7638326 100644
--- a/app/Http/Controllers/Peertube/Notification.php
+++ b/app/Http/Controllers/Peertube/Myaccount/Settings.php
@@ -1,12 +1,12 @@
common->user->me) || is_null($this->common->user->me)) {
+ if (!isset($this->common->user['me']) || is_null($this->common->user['me'])) {
return redirect('/peertube/login');
}
@@ -28,6 +28,7 @@ class Notification extends Common {
}
function getOwner ($id) {
- return $this->ptapi_get('/api/v1/accounts/'.$id);
+ //https://video.076.ne.jp/api/v1/users/me/subscriptions?start=0&count=10
+ return $this->ptapi('/api/v1/accounts/'.$id);
}
}
diff --git a/app/Http/Controllers/Peertube/Mylibrary.php b/app/Http/Controllers/Peertube/Mylibrary.php
index de147df..dc65246 100644
--- a/app/Http/Controllers/Peertube/Mylibrary.php
+++ b/app/Http/Controllers/Peertube/Mylibrary.php
@@ -14,7 +14,7 @@ class Mylibrary extends Common {
}
public function index () {
- if (!isset($this->common->user->me) || is_null($this->common->user->me)) {
+ if (!isset($this->common->user['me']) || is_null($this->common->user['me'])) {
return redirect('/peertube/login');
}
@@ -28,6 +28,6 @@ class Mylibrary extends Common {
}
function getOwner ($id) {
- return $this->ptapi_get('/api/v1/accounts/'.$id);
+ return $this->ptapi('/api/v1/accounts/'.$id);
}
}
diff --git a/app/Http/Controllers/Peertube/Mylibrary/History/Videos.php b/app/Http/Controllers/Peertube/Mylibrary/History/Videos.php
index 31bd94c..2ecafd1 100644
--- a/app/Http/Controllers/Peertube/Mylibrary/History/Videos.php
+++ b/app/Http/Controllers/Peertube/Mylibrary/History/Videos.php
@@ -14,7 +14,7 @@ class Videos extends Common {
}
public function index () {
- if (!isset($this->common->user->me) || is_null($this->common->user->me)) {
+ if (!isset($this->common->user['me']) || is_null($this->common->user['me'])) {
return redirect('/peertube/login');
}
@@ -29,6 +29,6 @@ class Videos extends Common {
function getOwner ($id) {
//https://video.076.ne.jp/api/v1/users/me/history/videos?start=0&count=5
- return $this->ptapi_get('/api/v1/accounts/'.$id);
+ return $this->ptapi('/api/v1/accounts/'.$id);
}
}
diff --git a/app/Http/Controllers/Peertube/Mylibrary/Subscriptions.php b/app/Http/Controllers/Peertube/Mylibrary/Subscriptions.php
index b20ac5d..2085f2a 100644
--- a/app/Http/Controllers/Peertube/Mylibrary/Subscriptions.php
+++ b/app/Http/Controllers/Peertube/Mylibrary/Subscriptions.php
@@ -14,7 +14,7 @@ class Subscriptions extends Common {
}
public function index () {
- if (!isset($this->common->user->me) || is_null($this->common->user->me)) {
+ if (!isset($this->common->user['me']) || is_null($this->common->user['me'])) {
return redirect('/peertube/login');
}
@@ -29,6 +29,6 @@ class Subscriptions extends Common {
function getOwner ($id) {
//https://video.076.ne.jp/api/v1/users/me/subscriptions?start=0&count=10
- return $this->ptapi_get('/api/v1/accounts/'.$id);
+ return $this->ptapi('/api/v1/accounts/'.$id);
}
}
diff --git a/app/Http/Controllers/Peertube/Mylibrary/Videochannels.php b/app/Http/Controllers/Peertube/Mylibrary/Videochannels.php
index f2f12a8..19eefbe 100644
--- a/app/Http/Controllers/Peertube/Mylibrary/Videochannels.php
+++ b/app/Http/Controllers/Peertube/Mylibrary/Videochannels.php
@@ -14,7 +14,7 @@ class Videochannels extends Common {
}
public function index () {
- if (!isset($this->common->user->me) || is_null($this->common->user->me)) {
+ if (!isset($this->common->user['me']) || is_null($this->common->user['me'])) {
return redirect('/peertube/login');
}
@@ -29,6 +29,6 @@ class Videochannels extends Common {
function getOwner ($id) {
//https://video.076.ne.jp/api/v1/accounts/techsuwako/video-channels?start=0&count=20&sort=-updatedAt&withStats=true
- return $this->ptapi_get('/api/v1/accounts/'.$id);
+ return $this->ptapi('/api/v1/accounts/'.$id);
}
}
diff --git a/app/Http/Controllers/Peertube/Mylibrary/Videoplaylists.php b/app/Http/Controllers/Peertube/Mylibrary/Videoplaylists.php
index c667dad..f91d80f 100644
--- a/app/Http/Controllers/Peertube/Mylibrary/Videoplaylists.php
+++ b/app/Http/Controllers/Peertube/Mylibrary/Videoplaylists.php
@@ -14,7 +14,7 @@ class Videoplaylists extends Common {
}
public function index () {
- if (!isset($this->common->user->me) || is_null($this->common->user->me)) {
+ if (!isset($this->common->user['me']) || is_null($this->common->user['me'])) {
return redirect('/peertube/login');
}
@@ -29,6 +29,6 @@ class Videoplaylists extends Common {
function getOwner ($id) {
//https://video.076.ne.jp/api/v1/users/me/subscriptions/videos?start=0&count=25&sort=-publishedAt&skipCount=true
- return $this->ptapi_get('/api/v1/accounts/'.$id);
+ return $this->ptapi('/api/v1/accounts/'.$id);
}
}
diff --git a/app/Http/Controllers/Peertube/Mylibrary/Videos.php b/app/Http/Controllers/Peertube/Mylibrary/Videos.php
index 55abde6..bc8d28f 100644
--- a/app/Http/Controllers/Peertube/Mylibrary/Videos.php
+++ b/app/Http/Controllers/Peertube/Mylibrary/Videos.php
@@ -14,7 +14,7 @@ class Videos extends Common {
}
public function index () {
- if (!isset($this->common->user->me) || is_null($this->common->user->me)) {
+ if (!isset($this->common->user['me']) || is_null($this->common->user['me'])) {
return redirect('/peertube/login');
}
@@ -29,6 +29,6 @@ class Videos extends Common {
function getOwner ($id) {
//https://video.076.ne.jp/api/v1/users/me/videos?start=0&count=10&sort=-publishedAt
- return $this->ptapi_get('/api/v1/accounts/'.$id);
+ return $this->ptapi('/api/v1/accounts/'.$id);
}
}
diff --git a/app/Http/Controllers/Peertube/Signup.php b/app/Http/Controllers/Peertube/Signup.php
index 51e2d94..f6c449b 100644
--- a/app/Http/Controllers/Peertube/Signup.php
+++ b/app/Http/Controllers/Peertube/Signup.php
@@ -14,7 +14,7 @@ class Signup extends Common {
}
public function index () {
- if (isset($this->common->user->me) && !is_null($this->common->user->me)) {
+ if (isset($this->common->user['me']) && !is_null($this->common->user['me'])) {
return redirect('/peertube/videos/local');
}
@@ -28,6 +28,6 @@ class Signup extends Common {
}
function getOwner ($id) {
- return $this->ptapi_get('/api/v1/accounts/'.$id);
+ return $this->ptapi('/api/v1/accounts/'.$id);
}
}
diff --git a/app/Http/Controllers/Peertube/Videos/Local.php b/app/Http/Controllers/Peertube/Videos/Local.php
index 1351e65..8824aa5 100644
--- a/app/Http/Controllers/Peertube/Videos/Local.php
+++ b/app/Http/Controllers/Peertube/Videos/Local.php
@@ -28,7 +28,7 @@ class Local extends Common {
}
function getVideo ($start, $count) {
- $get = $this->ptapi_get('/api/v1/videos?start='.$start.'&count='.$count.'&sort=-publishedAt&skipCount=true&isLocal=true&nsfw=both');
+ $get = $this->ptapi('/api/v1/videos?start='.$start.'&count='.$count.'&sort=-publishedAt&skipCount=true&isLocal=true&nsfw=both');
return $this->vidlist($get);
}
}
diff --git a/app/Http/Controllers/Peertube/Videos/Overview.php b/app/Http/Controllers/Peertube/Videos/Overview.php
index 96f99e6..53653d5 100644
--- a/app/Http/Controllers/Peertube/Videos/Overview.php
+++ b/app/Http/Controllers/Peertube/Videos/Overview.php
@@ -26,6 +26,6 @@ class Overview extends Common {
}
function getVideo ($page) {
- return $this->ptapi_get('/api/v1/overviews/videos?page='.$page);
+ return $this->ptapi('/api/v1/overviews/videos?page='.$page);
}
}
diff --git a/app/Http/Controllers/Peertube/Videos/Recentlyadded.php b/app/Http/Controllers/Peertube/Videos/Recentlyadded.php
index 24fbe25..7a36165 100644
--- a/app/Http/Controllers/Peertube/Videos/Recentlyadded.php
+++ b/app/Http/Controllers/Peertube/Videos/Recentlyadded.php
@@ -28,7 +28,7 @@ class Recentlyadded extends Common {
}
function getVideo ($start, $count) {
- $get = $this->ptapi_get('/api/v1/videos/?start='.$start.'&count='.$count.'&sort=-publishedAt&skipCount=true&nsfw=both');
+ $get = $this->ptapi('/api/v1/videos/?start='.$start.'&count='.$count.'&sort=-publishedAt&skipCount=true&nsfw=both');
return $this->vidlist($get);
}
}
diff --git a/app/Http/Controllers/Peertube/Videos/Subscriptions.php b/app/Http/Controllers/Peertube/Videos/Subscriptions.php
index d491648..7fd93fc 100644
--- a/app/Http/Controllers/Peertube/Videos/Subscriptions.php
+++ b/app/Http/Controllers/Peertube/Videos/Subscriptions.php
@@ -14,7 +14,7 @@ class Subscriptions extends Common {
}
public function index () {
- if (!isset($this->common->user->me) || is_null($this->common->user->me)) {
+ if (!isset($this->common->user['me']) || is_null($this->common->user['me'])) {
return redirect('/peertube/login');
}
@@ -29,6 +29,6 @@ class Subscriptions extends Common {
function getOwner ($id) {
//https://video.076.ne.jp/api/v1/users/me/subscriptions/videos?start=0&count=25&sort=-publishedAt&skipCount=true
- return $this->ptapi_get('/api/v1/accounts/'.$id);
+ return $this->ptapi('/api/v1/accounts/'.$id);
}
}
diff --git a/app/Http/Controllers/Peertube/Videos/Trending.php b/app/Http/Controllers/Peertube/Videos/Trending.php
index 1141448..a4c1a71 100644
--- a/app/Http/Controllers/Peertube/Videos/Trending.php
+++ b/app/Http/Controllers/Peertube/Videos/Trending.php
@@ -28,6 +28,6 @@ class Trending extends Common {
}
function getVideo ($start, $count) {
- return $this->ptapi_get('/api/v1/videos/?start='.$start.'&count='.$count.'&sort=-trending&skipCount=true&nsfw=both');
+ return $this->ptapi('/api/v1/videos/?start='.$start.'&count='.$count.'&sort=-trending&skipCount=true&nsfw=both');
}
}
diff --git a/app/Http/Controllers/Peertube/Videos/Upload.php b/app/Http/Controllers/Peertube/Videos/Upload.php
index 6badda2..b73906d 100644
--- a/app/Http/Controllers/Peertube/Videos/Upload.php
+++ b/app/Http/Controllers/Peertube/Videos/Upload.php
@@ -24,6 +24,6 @@ class Upload extends Common {
}
function getOwner ($id) {
- return $this->ptapi_get('/api/v1/accounts/'.$id);
+ return $this->ptapi('/api/v1/accounts/'.$id);
}
}
diff --git a/app/Http/Controllers/Peertube/Watch.php b/app/Http/Controllers/Peertube/Watch.php
index 239b002..dcc6514 100644
--- a/app/Http/Controllers/Peertube/Watch.php
+++ b/app/Http/Controllers/Peertube/Watch.php
@@ -26,7 +26,7 @@ class Watch extends Common {
}
function getDetail ($id) {
- return $this->ptapi_get('/api/v1/videos/'.$id);
+ return $this->ptapi('/api/v1/videos/'.$id);
}
function getRecommend ($tags) {
@@ -34,10 +34,10 @@ class Watch extends Common {
foreach ($tags as $t) {
$tag .= 'tagsOneOf='.urlencode($t).'&';
}
- return $this->ptapi_get('/api/v1/search/videos?start=0&count=6&nsfw=both&'.$tag.'sort=-publishedAt&searchTarget=local');
+ return $this->ptapi('/api/v1/search/videos?start=0&count=6&nsfw=both&'.$tag.'sort=-publishedAt&searchTarget=local');
}
function getComment ($id) {
- return $this->ptapi_get('/api/v1/videos/'.$id.'/comment-threads');
+ return $this->ptapi('/api/v1/videos/'.$id.'/comment-threads');
}
}
diff --git a/public/css/peertube/account.css b/public/css/peertube/account.css
index b5c54c9..2391fa6 100644
--- a/public/css/peertube/account.css
+++ b/public/css/peertube/account.css
@@ -686,13 +686,6 @@ menu.is-logged-in .block-title {
padding: 10px;
}
-my-notification {
- margin-inline-end: 15px;
-}
-my-notification {
- margin-inline-start: auto;
-}
-
.logged-in-menu a {
font-size: 14px;
width: 100%;
@@ -1092,36 +1085,6 @@ h2 {
.owner-description, .icon.icon-logo {
display: none !important;
}
-.peertube-title .instance-name {
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
-}
-
-.instance-name {
- background-image: url(/img/favicon.jpeg) !important;
- background-position: top !important;
- border-radius: 10px !important;
- padding: 2px !important;
- color: #fcfcfc !important;
- text-indent: 100%;
- width: 34px !important;
- height: 34px !important;
-}
-
-.instance-name {
- background-color: #5e3c62 !important;
- background-image: url('/img/favicon.jpeg') !important;
- background-position: top !important;
- border-radius: 10px !important;
- padding: 2px !important;
- color: #fcfcfc !important;
- text-indent: 100%;
- white-space: nowrap;
- overflow: hidden;
- width: 34px !important;
- height: 34px !important;
-}
#video-wrapper {
background-color: transparent !important;
diff --git a/public/css/peertube/common.css b/public/css/peertube/common.css
index 65c1fb4..85872b2 100644
--- a/public/css/peertube/common.css
+++ b/public/css/peertube/common.css
@@ -111,15 +111,15 @@ input {
font-weight: 600;
font-size: 15px;
}
+
img, svg {
vertical-align: middle;
}
+
img {
border-style: none;
}
-*, :after, :before {
- box-sizing: border-box;
-}
+
.dropdown-toggle {
white-space: nowrap;
}
@@ -641,10 +641,6 @@ my-search-typeahead {
padding-bottom: 20px;
}
-*, :after, :before {
- box-sizing: border-box;
-}
-
.header {
background-color: #421a46 !important;
height: 50px;
@@ -962,8 +958,6 @@ menu.is-logged-in .block-title {
my-notification {
margin-inline-end: 15px;
-}
-my-notification {
margin-inline-start: auto;
}
@@ -1597,4 +1591,36 @@ p {
.comment-actions .dropdown-toggle, .comment-actions .comment-action-reply {
color: var(--greyForegroundColor);
cursor: pointer;
+}
+
+.notification-inbox-popover, .notification-inbox-link {
+ cursor: pointer;
+ position: relative;
+}
+
+.notification-inbox-popover, .notification-inbox-link a {
+ transition: all .1s ease-in-out;
+ border-radius: 25px;
+ cursor: pointer;
+}
+
+.notification-inbox-popover {
+ padding: 10px;
+}
+
+.notification-inbox-popover .unread-notifications, .notification-inbox-link .unread-notifications {
+ position: absolute;
+ top: 6px;
+ left: 0;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ background-color: var(--mainColor);
+ color: #fff;
+ font-size: 10px;
+ font-weight: 600;
+ border-radius: 15px;
+ width: 15px;
+ height: 15px;
+ margin-inline-start: 20px;
}
\ No newline at end of file
diff --git a/public/css/peertube/custom.css b/public/css/peertube/custom.css
index 8956da3..e346e27 100644
--- a/public/css/peertube/custom.css
+++ b/public/css/peertube/custom.css
@@ -14,20 +14,6 @@ menu { background-color: #421a46 !important; }
.owner-description, .icon.icon-logo { display: none !important; }
.view-account short { margin-top: 0px !important; }
-.instance-name {
- background-color: #5e3c62 !important;
- background-image: url('/img/favicon.jpeg') !important;
- background-position: top !important;
- border-radius: 10px !important;
- padding: 2px !important;
- color: #fcfcfc !important;
- text-indent: 100%;
- white-space: nowrap;
- overflow: hidden;
- width: 34px !important;
- height: 34px !important;
-}
-
.owner-block {
background-color: rgba(48, 26, 48, 0.6) !important;
padding: 10px !important;
diff --git a/public/css/peertube/login.css b/public/css/peertube/login.css
new file mode 100644
index 0000000..cab59b5
--- /dev/null
+++ b/public/css/peertube/login.css
@@ -0,0 +1,430 @@
+.main-row {
+ min-height: calc(100vh - 110px);
+}
+
+@media screen and (max-width: 1600px) {
+ .main-col {
+ --horizontalMarginContent: 15px;
+ --videosHorizontalMarginContent: 30px;
+ }
+}
+
+.main-col .margin-content {
+ margin: 0 var(--horizontalMarginContent);
+ flex-grow: 1;
+}
+
+.title-page.active, .title-page:hover, .title-page:active, .title-page:focus, .title-page.title-page-single {
+ opacity: 1;
+ outline: 0 hidden!important;
+}
+
+.title-page.title-page-single {
+ font-size: 125%;
+ margin-top: 30px;
+ margin-bottom: 25px;
+}
+
+.block-title, .title-page {
+ background: radial-gradient(ellipse at top, #db34d3, transparent), radial-gradient(ellipse at bottom, #232629, transparent);
+ margin-inline-end: 0px;
+ margin-inline-start: 0px;
+ padding: 5px;
+ border-radius: 4px;
+ border: 2px solid #fd95ff;
+ border-right-color: #fed9ff;
+ border-bottom-color: #fed9ff;
+ text-align: center;
+}
+
+.title-page {
+ margin-inline-end: 55px;
+ opacity: .6;
+ color: var(--mainForegroundColor);
+ font-size: 16px;
+ display: inline-block;
+ font-weight: 600;
+ border-bottom: 2px solid transparent;
+}
+
+.wrapper {
+ display: flex;
+ justify-content: space-around;
+ flex-wrap: wrap;
+ margin-inline-end: 0;
+ width: auto;
+}
+
+.wrapper .login-form-and-externals {
+ margin-inline-end: 10px;
+ margin-inline-start: 10px;
+ display: flex;
+ flex-wrap: wrap;
+ font-size: 15px;
+ max-width: 450px;
+ margin-bottom: 40px;
+}
+
+.wrapper > div {
+ flex: 1 1;
+}
+
+.wrapper .login-form-and-externals form, .wrapper .login-form-and-externals form input {
+ width: 100%;
+}
+
+.wrapper .login-form-and-externals .signup-link {
+ display: inline-block;
+}
+
+.wrapper .login-form-and-externals form .additionnal-links .forgot-password-button, .wrapper .login-form-and-externals form .additionnal-links .create-an-account {
+ padding: 4px;
+ display: inline-block;
+ color: var(--mainColor);
+}
+
+.create-an-account, .forgot-password-button {
+ color: var(--mainForegroundColor);
+ cursor: pointer;
+ transition: opacity cubic-bezier(.39,.575,.565,1);
+}
+
+.wrapper .login-form-and-externals form {
+ margin: 0;
+}
+
+.wrapper .instance-information {
+ margin-inline-end: 10px;
+ margin-inline-start: 10px;
+ max-width: 600px;
+ min-width: 350px;
+ margin-bottom: 40px;
+}
+
+.form-group {
+ margin-bottom: 1rem;
+}
+
+label {
+ display: block;
+ font-weight: 700;
+ font-size: 15px;
+ display: inline-block;
+ margin-bottom: 0.5rem;
+}
+
+#custom-css input, #custom-css textarea {
+ background: var(--inputColor) !important;
+ color: var(--mainForegroundColor) !important;
+ border: 1px solid var(--mainBackgroundColor);
+}
+
+.input-group {
+ position: relative;
+ display: flex;
+ flex-wrap: wrap;
+ align-items: stretch;
+ width: 100%;
+}
+
+input[type=text], input[type=email] {
+ padding: 0 15px;
+ display: inline-block;
+ height: 30px;
+ width: 340px;
+ color: var(--inputForegroundColor);
+ background-color: var(--inputBackgroundColor);
+ border: 1px solid #C6C6C6;
+ border-radius: 3px;
+ font-size: 15px;
+}
+
+#custom-css .peertube-select-container, input[type="text"] {
+ border: 1px solid var(--mainBackgroundColor) !important;
+ background: var(--inputColor) !important;
+ color: var(--mainForegroundColor) !important;
+}
+
+.form-control {
+ font-size: 15px;
+ color: var(--mainForegroundColor);
+ background-color: var(--inputBackgroundColor);
+ outline: none;
+ display: block;
+ width: 100%;
+ height: calc(1.5em + 0.75rem + 2px);
+ padding: 0.375rem 0.75rem;
+ font-size: 1rem;
+ font-weight: 400;
+ line-height: 1.5;
+ color: #495057;
+ background-color: #fff;
+ background-clip: padding-box;
+ border: 1px solid #ced4da;
+ border-radius: 0.25rem;
+ transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
+}
+
+input, textarea {
+ outline: none;
+ color: var(--inputForegroundColor);
+}
+
+button, input {
+ overflow: visible;
+}
+
+input, button, select, optgroup, textarea {
+ margin: 0;
+ font-family: inherit;
+ font-size: inherit;
+ line-height: inherit;
+}
+
+.instance-name {
+ line-height: 1.7rem;
+}
+
+h2, .h2 {
+ font-size: 2rem;
+}
+
+.instance-short-description {
+ display: block;
+ display: -webkit-box;
+ -webkit-line-clamp: 3;
+ font-size: 1rem;
+ line-height: 1rem;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ max-height: 3rem;
+ margin-top: 20px;
+ margin-bottom: 20px;
+}
+
+.accordion {
+ overflow-anchor: none;
+}
+
+ngb-accordion .card {
+ border-color: var(--mainBackgroundColor);
+}
+
+.accordion>.card {
+ 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-color: #fff;
+ background-clip: border-box;
+ border: 1px solid rgba(0,0,0,.125);
+ border-radius: 0.25rem;
+}
+
+ngb-accordion .card .card-header {
+ background-color: unset;
+ padding: 0;
+}
+
+.accordion>.card>.card-header {
+ border-radius: 0;
+ margin-bottom: -1px;
+}
+
+.card-header:first-child {
+ border-radius: calc(0.25rem- 1px) calc(0.25rem- 1px) 0 0;
+}
+
+.card-header {
+ padding: 0.75rem 1.25rem;
+ margin-bottom: 0;
+ background-color: #00000008;
+ border-bottom: 1px solid rgba(0,0,0,.125);
+}
+
+.btn:not(:disabled):not(.disabled) {
+ cursor: pointer;
+}
+
+ngb-accordion .btn {
+ 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;
+ background-color: #e5e5e5;
+ color: var(--greyForegroundColor);
+ border-radius: unset;
+ width: 100%;
+}
+
+button:not(:disabled), [type=button]:not(:disabled), [type=reset]:not(:disabled), [type=submit]:not(:disabled) {
+ cursor: pointer;
+}
+
+.btn-link {
+ font-weight: 400;
+ color: #007bff;
+ text-decoration: none;
+}
+
+.btn {
+ display: inline-block;
+ font-weight: 400;
+ color: #212529;
+ text-align: center;
+ vertical-align: middle;
+ -webkit-user-select: none;
+ user-select: none;
+ background-color: transparent;
+ border: 1px solid transparent;
+ padding: 0.375rem 0.75rem;
+ font-size: 1rem;
+ line-height: 1.5;
+ border-radius: 0.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;
+}
+
+button, [type=button], [type=reset], [type=submit] {
+ -webkit-appearance: button;
+}
+
+button {
+ background: unset;
+ border-radius: 0;
+}
+
+button, select {
+ text-transform: none;
+}
+
+.input-group:not(.has-validation)>.form-control:not(:last-child), .input-group:not(.has-validation)>.custom-select:not(:last-child), .input-group:not(.has-validation)>.custom-file:not(:last-child) .custom-file-label, .input-group:not(.has-validation)>.custom-file:not(:last-child) .custom-file-label:after {
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+}
+
+.input-group input.form-control {
+ width: unset!important;
+ flex-grow: 1;
+}
+
+.input-group-sm>.form-control:not(textarea), .input-group-sm>.custom-select {
+ height: calc(1.5em + 0.5rem + 2px);
+}
+
+.input-group>.form-control {
+ flex: initial;
+}
+
+.input-group>.form-control, .input-group>.form-control-plaintext, .input-group>.custom-select, .input-group>.custom-file {
+ position: relative;
+ flex: 1 1 auto;
+ width: 1%;
+ min-width: 0;
+ margin-bottom: 0;
+}
+
+input {
+ padding-inline-end: 15px !important;
+ padding-inline-start: 15px !important;
+ padding: 0 15px;
+ display: inline-block;
+ height: 30px;
+ width: auto;
+ color: var(--inputForegroundColor);
+ background-color: var(--inputBackgroundColor);
+ border: 1px solid #C6C6C6;
+ border-radius: 3px;
+ font-size: 15px;
+ font-size: 15px!important;
+}
+
+.input-group-append {
+ margin-left: -1px;
+}
+
+.input-group-prepend, .input-group-append {
+ display: flex;
+}
+
+.input-group>.input-group-append>.btn, .input-group>.input-group-append>.input-group-text, .input-group>.input-group-prepend:not(:first-child)>.btn, .input-group>.input-group-prepend:not(:first-child)>.input-group-text, .input-group>.input-group-prepend:first-child>.btn:not(:first-child), .input-group>.input-group-prepend:first-child>.input-group-text:not(:first-child) {
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0;
+}
+
+.input-group-sm>.form-control, .input-group-sm>.custom-select, .input-group-sm>.input-group-prepend>.input-group-text, .input-group-sm>.input-group-append>.input-group-text, .input-group-sm>.input-group-prepend>.btn, .input-group-sm>.input-group-append>.btn {
+ padding: 0.25rem 0.5rem;
+ font-size: .875rem;
+ line-height: 1.5;
+ border-radius: 0.2rem;
+}
+
+.eye-button {
+ line-height: 1!important;
+}
+
+.input-group-prepend .btn, .input-group-append .btn {
+ position: relative;
+ z-index: 2;
+}
+
+.btn-outline-secondary {
+ border-color: #ced4da;
+ color: #6c757d;
+ border-color: #6c757d;
+}
+
+input[type=button], input[type=submit], input[type=reset], input[type=file]::-webkit-file-upload-button, button {
+ border-radius: 0;
+}
+
+ngb-accordion .card .card-header+.collapse.show {
+ background-color: var(--submenuBackgroundColor);
+}
+
+.card-body {
+ flex: 1 1 auto;
+ min-height: 1px;
+ padding: 1.25rem;
+}
+
+.block {
+ font-size: 15px;
+ margin-bottom: 15px;
+}
+
+.alert-danger {
+ color: #850000;
+ background-color: #fcc;
+ border-color: #ffb8b8;
+}
+
+.alert {
+ position: relative;
+ padding: 0.75rem 1.25rem;
+ margin-bottom: 1rem;
+ border: 1px solid transparent;
+ border-radius: 0.25rem;
+}
+
+.alert {
+ position: relative;
+ padding: 0.75rem 1.25rem;
+ margin-bottom: 1rem;
+ border: 1px solid transparent;
+ border-radius: 0.25rem;
+}
\ No newline at end of file
diff --git a/public/css/peertube/myaccount.css b/public/css/peertube/myaccount.css
new file mode 100644
index 0000000..3a7b4ae
--- /dev/null
+++ b/public/css/peertube/myaccount.css
@@ -0,0 +1,520 @@
+.main-row {
+ min-height: calc(100vh - 110px);
+}
+
+.row {
+ flex-direction: column;
+ width: 100%;
+}
+
+.row {
+ margin: 0!important;
+}
+
+.row {
+ display: flex;
+ flex-wrap: wrap;
+ margin-right: -15px;
+ margin-left: -15px;
+}
+
+.row > my-top-menu-dropdown:nth-child(1) {
+ flex-grow: 1;
+}
+
+.main-col .sub-menu.sub-menu-fixed {
+ position: fixed;
+ z-index: 12499;
+ max-width: var(--mainColWidth);
+}
+
+.main-col .sub-menu {
+ background-color: #502c50 !important;
+}
+
+.main-col .sub-menu {
+ background-color: var(--submenuBackgroundColor);
+ width: 100%;
+ display: flex;
+ align-items: center;
+ padding: 0 var(--horizontalMarginContent);
+ height: 81px;
+ margin-bottom: 30px;
+ overflow-x: auto;
+}
+
+.block-title, .title-page {
+ background: radial-gradient(ellipse at top, #db34d3, transparent), radial-gradient(ellipse at bottom, #232629, transparent);
+ margin-inline-end: 0px;
+ margin-inline-start: 0px;
+ padding: 5px;
+ border-radius: 4px;
+ border: 2px solid #fd95ff;
+ border-right-color: #fed9ff;
+ border-bottom-color: #fed9ff;
+ text-align: center;
+}
+
+.title-page-about, .title-page-settings {
+ white-space: nowrap;
+ font-size: 115%;
+}
+
+.title-page {
+ margin-inline-end: 55px;
+}
+
+.title-page {
+ opacity: .6;
+ color: var(--mainForegroundColor);
+ font-size: 16px;
+ display: inline-block;
+ font-weight: 600;
+ border-bottom: 2px solid transparent;
+}
+
+#custom-css .title-page.active, #custom-css .title-page:hover {
+ color: var(--whiteColor);
+}
+
+.title-page.active {
+ border-bottom-color: #ea81e8 !important;
+}
+
+.title-page.active, .title-page:hover, .title-page:active, .title-page:focus, .title-page.title-page-single {
+ opacity: 1;
+ outline: 0 hidden!important;
+}
+
+.title-page.active {
+ border-bottom-color: var(--mainColor);
+}
+
+.block-title, .title-page {
+ background: radial-gradient(ellipse at top, #db34d3, transparent), radial-gradient(ellipse at bottom, #232629, transparent);
+ margin-inline-end: 0px;
+ margin-inline-start: 0px;
+ padding: 5px;
+ border-radius: 4px;
+ border: 2px solid #fd95ff;
+ border-right-color: #fed9ff;
+ border-bottom-color: #fed9ff;
+ text-align: center;
+}
+
+.title-page-about, .title-page-settings {
+ white-space: nowrap;
+ font-size: 115%;
+}
+
+.title-page {
+ margin-inline-end: 55px;
+}
+
+.title-page {
+ opacity: .6;
+ color: var(--mainForegroundColor);
+ font-size: 16px;
+ display: inline-block;
+ font-weight: 600;
+ border-bottom: 2px solid transparent;
+}
+
+.main-col .margin-content.offset-content {
+ padding-top: 111px;
+}
+
+.main-col .margin-content {
+ margin: 0 var(--horizontalMarginContent);
+ flex-grow: 1;
+}
+
+.pb-5, .py-5 {
+ padding-bottom: 3rem !important;
+}
+
+.row h1 {
+ font-size: 1.3rem;
+ border-bottom: 2px solid #E5E5E5;
+ padding-bottom: 15px;
+ margin-bottom: 30px;
+}
+
+.sr-only {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ padding: 0;
+ margin: -1px;
+ overflow: hidden;
+ clip: rect(0,0,0,0);
+ white-space: nowrap;
+ border: 0;
+}
+
+#custom-css .header-filter {
+ background-color: var(--menuBackgroundColor);
+}
+
+.header-filter {
+ display: flex;
+ font-size: 15px;
+ margin-bottom: 20px;
+ background-color: #421a46 !important;
+}
+
+#custom-css .row .header-filter a, #custom-css .row .header-filter button {
+ color: var(--whiteColor);
+ background-color: var(--mainHoverColor);
+}
+
+.header-filter a {
+ 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;
+ background-color: #e5e5e5;
+ color: var(--greyForegroundColor);
+ display: inline-flex;
+ align-items: center;
+ line-height: normal!important;
+}
+
+.header-filter a my-global-icon {
+ margin-inline-end: 3px;
+ position: relative;
+ width: 18px;
+ top: -1px;
+}
+
+#custom-css .header-filter my-global-icon .feather {
+ color: var(--whiteColor);
+}
+
+.header-filter a my-global-icon .feather, .header-filter a my-global-icon .material, .header-filter a my-global-icon .misc {
+ color: var(--greyForegroundColor);
+}
+
+#custom-css .peertube-select-container, input[type="text"] {
+ border: 1px solid var(--mainBackgroundColor) !important;
+ background: var(--inputColor) !important;
+ color: var(--mainForegroundColor) !important;
+}
+
+.header-filter .peertube-select-container.peertube-select-button {
+ background-color: #e5e5e5;
+ color: var(--greyForegroundColor);
+}
+
+.header-filter .peertube-select-container {
+ padding: 0;
+ margin: 0;
+ width: auto;
+ border-radius: 3px;
+ color: var(--inputForegroundColor);
+ background: var(--inputBackgroundColor);
+ position: relative;
+ font-size: 15px;
+ height: min-content;
+}
+
+#custom-css .peertube-select-container > select {
+ background: var(--inputColor) !important;
+ color: var(--mainForegroundColor) !important;
+}
+
+.header-filter .peertube-select-container.peertube-select-button select, .header-filter .peertube-select-container.peertube-select-button option {
+ font-weight: 600;
+ color: var(--greyForegroundColor);
+ border: 0;
+}
+
+.header-filter .peertube-select-container select {
+ padding: 0 35px 0 12px;
+ position: relative;
+ border: 1px solid #C6C6C6;
+ background: transparent none;
+ -webkit-appearance: none;
+ -moz-appearance: none;
+ appearance: none;
+ cursor: pointer;
+ height: 30px;
+ text-overflow: ellipsis;
+ color: var(--mainForegroundColor);
+}
+
+.form-control {
+ font-size: 15px;
+ color: var(--mainForegroundColor);
+ background-color: var(--inputBackgroundColor);
+ outline: none;
+}
+
+.form-control {
+ display: block;
+ width: 100%;
+ height: calc(1.5em + 0.75rem + 2px);
+ padding: 0.375rem 0.75rem;
+ font-size: 1rem;
+ font-weight: 400;
+ line-height: 1.5;
+ color: #495057;
+ background-color: #fff;
+ background-clip: padding-box;
+ border: 1px solid #ced4da;
+ border-radius: 0.25rem;
+ transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
+}
+
+select {
+ word-wrap: normal;
+}
+
+button, select {
+ text-transform: none;
+}
+
+input, button, select, optgroup, textarea {
+ margin: 0;
+ font-family: inherit;
+ font-size: inherit;
+ line-height: inherit;
+}
+
+#custom-css .peertube-select-container > select > option {
+ background: var(--inputColor);
+ color: var(--mainForegroundColor) !important;
+}
+
+.header-filter .peertube-select-container select option {
+ color: #000;
+}
+
+.header-filter .peertube-select-container.peertube-select-button select, .header-filter .peertube-select-container.peertube-select-button option {
+ font-weight: 600;
+ color: var(--greyForegroundColor);
+ border: 0;
+}
+
+#custom-css .peertube-select-container > select option:hover, #custom-css .peertube-select-container > select > option:checked {
+ color: var(--whiteColor) !important;
+ background-color: var(--mainColor) !important;
+}
+
+#custom-css .peertube-select-container > select > option {
+ background: var(--inputColor);
+ color: var(--mainForegroundColor) !important;
+}
+
+.header-filter .peertube-select-container select option {
+ color: #000;
+}
+
+.header-filter .peertube-select-container.peertube-select-button select, .header-filter .peertube-select-container.peertube-select-button option {
+ font-weight: 600;
+ color: var(--greyForegroundColor);
+ border: 0;
+}
+
+#custom-css .peertube-select-container:after {
+ border-top-color: var(--mainForegroundColor) !important;
+}
+
+.header-filter .peertube-select-container:after {
+ top: 50%;
+ right: calc(0% + 15px);
+ content: " ";
+ height: 0;
+ width: 0;
+ position: absolute;
+ pointer-events: none;
+ border: 5px solid rgba(0,0,0,0);
+ border-top-color: #000;
+ margin-top: -2px;
+ z-index: 100;
+}
+
+#custom-css .row .header-filter a, #custom-css .row .header-filter button {
+ color: var(--whiteColor);
+ background-color: var(--mainHoverColor);
+}
+
+.header-filter button {
+ padding-inline-end: 17px;
+}
+
+.header-filter button {
+ padding-inline-start: 13px;
+}
+
+.header-filter button {
+ 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;
+ background-color: #e5e5e5;
+ color: var(--greyForegroundColor);
+ display: inline-flex;
+ align-items: center;
+ line-height: normal!important;
+}
+
+.btn:not(:disabled):not(.disabled) {
+ cursor: pointer;
+}
+
+button:not(:disabled), [type=button]:not(:disabled), [type=reset]:not(:disabled), [type=submit]:not(:disabled) {
+ cursor: pointer;
+}
+
+.ml-auto, .mx-auto {
+ margin-left: auto!important;
+}
+
+.btn {
+ display: inline-block;
+ font-weight: 400;
+ color: #212529;
+ text-align: center;
+ vertical-align: middle;
+ -webkit-user-select: none;
+ user-select: none;
+ background-color: transparent;
+ border: 1px solid transparent;
+ padding: 0.375rem 0.75rem;
+ font-size: 1rem;
+ line-height: 1.5;
+ border-radius: 0.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;
+}
+
+button {
+ background: unset;
+}
+
+button, [type=button], [type=reset], [type=submit] {
+ -webkit-appearance: button;
+}
+
+button, select {
+ text-transform: none;
+}
+
+button, input {
+ overflow: visible;
+}
+
+input, button, select, optgroup, textarea {
+ margin: 0;
+ font-family: inherit;
+ font-size: inherit;
+ line-height: inherit;
+}
+
+button {
+ border-radius: 0;
+}
+
+input[type=button], input[type=submit], input[type=reset], input[type=file]::-webkit-file-upload-button, button {
+ border-radius: 0;
+}
+
+.header-filter button my-global-icon {
+ margin-inline-end: 3px;
+ position: relative;
+ width: 20px;
+ top: -1px;
+}
+
+#custom-css .header-filter my-global-icon .feather {
+ color: var(--whiteColor);
+}
+
+.header-filter button my-global-icon .feather, .header-filter button my-global-icon .material, .header-filter button my-global-icon .misc {
+ color: var(--greyForegroundColor);
+}
+
+my-user-notifications {
+ font-size: 15px;
+}
+
+#custom-css .notification.unread {
+ background-color: var(--menuAndHeaderBackgroundColor);
+}
+
+#custom-css .notification {
+ background-color: var(--mainBackgroundColor);
+ color: var(--mainForegroundColor);
+}
+
+.notification.unread {
+ background-color: #0000000d;
+}
+
+.notification {
+ display: flex;
+ align-items: center;
+ font-size: inherit;
+ padding: 15px 5px 15px 10px;
+ border-bottom: 1px solid rgba(0,0,0,.1);
+ word-break: break-word;
+}
+
+.notification .avatar {
+ margin-inline-end: 10px;
+ width: 30px;
+ height: 30px;
+ min-width: 30px;
+ min-height: 30px;
+ border-radius: 5px;
+}
+img {
+ vertical-align: middle;
+ border-style: none;
+}
+
+.notification .message {
+ flex-grow: 1;
+}
+
+.notification .message a {
+ font-weight: 600;
+}
+
+.notification .from-date {
+ margin-inline-start: auto;
+ padding-inline-start: 5px;
+ font-size: .85em;
+ color: var(--greyForegroundColor);
+ min-width: 70px;
+ text-align: end;
+}
+
+#custom-css .notification {
+ background-color: var(--mainBackgroundColor);
+ color: var(--mainForegroundColor);
+}
+
+.notification {
+ display: flex;
+ align-items: center;
+ font-size: inherit;
+ padding: 15px 5px 15px 10px;
+ border-bottom: 1px solid rgba(0,0,0,.1);
+ word-break: break-word;
+}
\ No newline at end of file
diff --git a/public/css/peertube/styles.css b/public/css/peertube/styles.css
index 14357e2..0c95b2b 100644
--- a/public/css/peertube/styles.css
+++ b/public/css/peertube/styles.css
@@ -4322,17 +4322,6 @@ input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-
white-space: nowrap
}
-.dropdown-toggle:after {
- display: inline-block;
- margin-left: .255em;
- vertical-align: .255em;
- content: "";
- border-top: .3em solid;
- border-right: .3em solid #0000;
- border-bottom: 0;
- border-left: .3em solid #0000
-}
-
.dropdown-toggle:empty:after {
margin-left: 0
}
diff --git a/resources/views/pages/peertube/login.blade.php b/resources/views/pages/peertube/login.blade.php
new file mode 100644
index 0000000..2e75e08
--- /dev/null
+++ b/resources/views/pages/peertube/login.blade.php
@@ -0,0 +1,76 @@
+@extends('theme.'.env('THEME').'.peertube')
+
+@section('content')
+
+
+
+
+
ログイン
+ @if (!is_null($res['err']))
{{ $err }}
@endif
+
+
+
+
+
+@endsection
\ No newline at end of file
diff --git a/resources/views/pages/peertube/my-account/notifications.blade.php b/resources/views/pages/peertube/my-account/notifications.blade.php
new file mode 100644
index 0000000..43f5de2
--- /dev/null
+++ b/resources/views/pages/peertube/my-account/notifications.blade.php
@@ -0,0 +1,20 @@
+@extends('theme.'.env('THEME').'.peertube')
+
+@section('content')
+
+
+
+
+ @include('theme.'.env('THEME').'.component.peertube.my-account.menu', ['active' => 'notifications'])
+
+
+ 通知
+ @include('theme.'.env('THEME').'.component.peertube.my-account.filter')
+ @include('theme.'.env('THEME').'.component.peertube.my-account.notifications')
+
+
+
+
+
+
+@endsection
\ No newline at end of file
diff --git a/resources/views/theme/techsuwa/component/peertube/a/links.blade.php b/resources/views/theme/techsuwa/component/peertube/a/links.blade.php
index 7611542..7792a40 100644
--- a/resources/views/theme/techsuwa/component/peertube/a/links.blade.php
+++ b/resources/views/theme/techsuwa/component/peertube/a/links.blade.php
@@ -2,10 +2,10 @@
diff --git a/resources/views/theme/techsuwa/component/peertube/c/links.blade.php b/resources/views/theme/techsuwa/component/peertube/c/links.blade.php
index ef4e108..19a076d 100644
--- a/resources/views/theme/techsuwa/component/peertube/c/links.blade.php
+++ b/resources/views/theme/techsuwa/component/peertube/c/links.blade.php
@@ -2,10 +2,10 @@
diff --git a/resources/views/theme/techsuwa/component/peertube/header.blade.php b/resources/views/theme/techsuwa/component/peertube/header.blade.php
index 7530755..d1c098e 100644
--- a/resources/views/theme/techsuwa/component/peertube/header.blade.php
+++ b/resources/views/theme/techsuwa/component/peertube/header.blade.php
@@ -53,7 +53,7 @@
-
+
diff --git a/resources/views/theme/techsuwa/component/peertube/manifest.blade.php b/resources/views/theme/techsuwa/component/peertube/manifest.blade.php
index 16b7645..ddde5c2 100644
--- a/resources/views/theme/techsuwa/component/peertube/manifest.blade.php
+++ b/resources/views/theme/techsuwa/component/peertube/manifest.blade.php
@@ -11,6 +11,7 @@
else if ($res['page'] == 'recently-added') $name = '最近投稿された動画';
else if ($res['page'] == 'local') $name = 'ローカル動画';
else if ($res['page'] == 'about') $name = 'このアプリについて';
+ else if ($res['page'] == 'notification') $name = '通知';
}
?>
diff --git a/resources/views/theme/techsuwa/component/peertube/menu/footer.blade.php b/resources/views/theme/techsuwa/component/peertube/menu/footer.blade.php
index f726b8b..47bd222 100644
--- a/resources/views/theme/techsuwa/component/peertube/menu/footer.blade.php
+++ b/resources/views/theme/techsuwa/component/peertube/menu/footer.blade.php
@@ -1,6 +1,6 @@