various changes, fixes to css etc

This commit is contained in:
w0bm
2021-11-07 10:28:35 +00:00
parent ac6c15c0e1
commit 50b89c7be7
102 changed files with 2358 additions and 38 deletions

View File

@@ -126,7 +126,7 @@ class UserController extends Controller
\Session::flash('info', 'Cannot register when logged in');
return redirect('/');
}
return view('apply');
return view('apply_open');
}
public function loggain()

View File

@@ -142,6 +142,7 @@ class VideoController extends Controller
$video->tag($video->category->name);
// TODO: outsource to different process (async)
// sirx: Why? since the cpu clocks at more than 800mhz its fast, thinking of the 100mb filesize limit, it wont take long to create a thumbnail
$video->createThumbnail();
$video->tesThumb();
@@ -163,6 +164,25 @@ class VideoController extends Controller
exec("curl -H \"Content-Type: application/json; charset=UTF-8\" -X POST -d '$payload' '$url' > /dev/null &");
}
if (config('matrix.enabled') && config('matrix.roomid')) {
$nsfw = in_array('nsfw', $video->getTagArrayNormalizedAttribute());
$nsfw = $nsfw ? ' :exclamation: **NSFW** :exclamation:' : '';
$message = config('matrix.message');
$message = str_replace(
['<USER>', '<ID>', '<NSFW>'],
[$user->username, $video->id, $nsfw],
$message
);
$room = "DBWMqijxlNIUIjBNdM:f0ck.it";
$url = "https://f0ck.it/_matrix/client/r0/rooms/%21DBWMqijxlNIUIjBNdM:f0ck.it/send/m.room.message?access_token=syt_bml4Yw_yIqaTxnQHQBzeYnHusNi_3Th9Pn";
$payload = json_encode([
'content' => $message,
]);
exec("curl -X POST -d '{ 'msgtype : m.text', 'body: $payload'}' '$url' > /dev/null &");
}
return new JsonResponse([
'error' => 'null',
'video_id' => $video->id

Binary file not shown.

Before

Width:  |  Height:  |  Size: 257 KiB

After

Width:  |  Height:  |  Size: 1.3 MiB