diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index dccf4df..5f0c46e 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -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() diff --git a/app/Http/Controllers/VideoController.php b/app/Http/Controllers/VideoController.php index d10d37f..74c8a0d 100644 --- a/app/Http/Controllers/VideoController.php +++ b/app/Http/Controllers/VideoController.php @@ -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->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 diff --git a/app/Http/Controllers/tmp/test.png b/app/Http/Controllers/tmp/test.png index 76bc982..19b80b4 100644 Binary files a/app/Http/Controllers/tmp/test.png and b/app/Http/Controllers/tmp/test.png differ diff --git a/app/Http/routes.php b/app/Http/routes.php index 7b025df..29efbee 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -130,7 +130,7 @@ Route::group(["middleware" => "theme"], function() { Route::get('upload', 'VideoController@create')->middleware('auth'); Route::get('categories', 'CategoryController@index')->middleware('auth'); Route::get('webm', function() { return view('webm'); })->middleware('auth'); - Route::get('settings', function() { return 404; })->middleware('auth'); + Route::get('settings', function() { return view('settings'); })->middleware('auth'); Route::get('matrix', function() { return view('matrix'); })->middleware('auth'); #Route::get('about', function() { return view('about'); })->middleware('auth'); Route::get('about', 'aboutController@index')->middleware('auth'); @@ -181,26 +181,4 @@ Route::group(["middleware" => "theme"], function() { ##Category View Route::get('{shortname}', 'CategoryController@showVideo')->where('shortname', '[a-z][a-z0-9]+'); Route::get('{shortname}/{id}', 'CategoryController@showVideo')->where(['shortname' => '[a-z][a-z0-9]+', 'id' => '[0-9]+']); - - - Route::any('captcha-test', function() { - if (request()->getMethod() == 'POST') { - $rules = ['captcha' => 'required|captcha']; - $validator = validator()->make(request()->all(), $rules); - if ($validator->fails()) { - echo '

Incorrect!

'; - } else { - echo '

Matched :)

'; - } - } - - $form = '
'; - $form .= ''; - $form .= '

' . captcha_img() . '

'; - $form .= '

'; - $form .= '

'; - $form .= '
'; - return $form; - }); - }); diff --git a/config/matrix.php b/config/matrix.php new file mode 100644 index 0000000..a930465 --- /dev/null +++ b/config/matrix.php @@ -0,0 +1,6 @@ + true, + 'webhookurl' => env('matrix_WEBHOOK', false), + 'message' => ' uploaded a new webm: https://w0bm.com/', +]; diff --git a/public/css/w0bmcustom.css b/public/css/w0bmcustom.css index 4c2e784..900c508 100644 --- a/public/css/w0bmcustom.css +++ b/public/css/w0bmcustom.css @@ -4180,4 +4180,10 @@ pre { .w0bm_emoji_anchor:hover { background: #616364; transition: .2s all ease-in-out; +} + +.git-issue-tracker { + vertical-align: sub; + color: gray; + font-family: vcr; } \ No newline at end of file diff --git a/public/njum/css/cstms.css b/public/njum/css/cstms.css index 71c98a8..1d558cd 100644 --- a/public/njum/css/cstms.css +++ b/public/njum/css/cstms.css @@ -58,6 +58,10 @@ body { vertical-align: middle !important; } +#logo:hover { + filter: saturate(3); +} + .w0bm-logo { margin: 5px; padding-left: 5px; @@ -129,7 +133,7 @@ p.comment > a { } .page-header > h3 { - border-bottom: 2px solid gray; + border-bottom: 2px solid #403e3e; padding-bottom: 5px; } @@ -238,6 +242,7 @@ li.nav-item { .page-header { flex: 1; + background: #282828; } button#togglebg, button.bg-toggle, button#fav, button#nav-user, button#webm_edit, button#webm_report { @@ -1085,11 +1090,19 @@ a.badge.video-id { background: rgba(29, 28, 28, 0.94) none repeat scroll 0 0; padding: 15px; margin-bottom: 15px; - border-radius: .25rem; - border: 1px solid black; + border-radius: 0; + border: 1px solid #444; text-shadow: 1px 1px black; } +#message { + padding-left: 0; +} + +#message > h4 { + text-align: center; +} + #commentForm textarea { color: #c8c8c8; background: rgba(0, 0, 0, 0.78) none repeat scroll 0 0; @@ -1126,6 +1139,7 @@ a.badge.video-id { .table { margin-bottom: 3rem; + background: #282828; } img.comment_emoji { @@ -1148,6 +1162,7 @@ div#categories { grid-gap: 20px; align-items: stretch; margin-bottom: 5px; + background: #282828; } .thumbnail img { @@ -1704,9 +1719,9 @@ div.uploadButton > p { .box { background: rgba(90, 88, 88, 0.4) none repeat scroll 0 0; border-radius: 5px; - border: 1px solid black; padding: 5px; margin: 5px; + border: 1px solid #444; } hr { @@ -1927,4 +1942,38 @@ blockquote { color: red; text-shadow: -1px 0px orange, -2px 0px yellow, -3px 0px green, -4px 0px blue, -5px 0px indigo, -6px 0px violet; } +} + +.profilheader { + background: #282828; +} + +.container > .items { + background: #303030; + padding: 5px; + border: 10px solid black; +} + +.main-item:hover { + box-shadow: 0 0 0 2px #0cba6b; +} + +.thumbnail:hover img { + border: 1px solid #0cba6b; +} + +ol, ul, dl { + margin-top: 5px; + margin-bottom: 5px; +} + +.dark-bg { + background-color: #282828; +} + +.video-titlebar { + background: #000000b3 !important; + padding-left: 5px; + padding-right: 5px; + border-top: inset 1px gray; } \ No newline at end of file diff --git a/public/njum/js/newscript.js b/public/njum/js/newscript.js index 00e3b4f..54d5c83 100644 --- a/public/njum/js/newscript.js +++ b/public/njum/js/newscript.js @@ -190,7 +190,7 @@ if (typeof video !== 'undefined') { // the variable is defined var videoElem = document.getElementById('video'); videoElem.play(); - videoElem.addEventListener('mouseover', function() { this.controls = true; }); + //videoElem.addEventListener('mouseover', function() { this.controls = true; }); videoElem.volume = 0.3; videoElem.volume = localStorage.getItem("volume") || 1; videoElem.addEventListener("volumechange", ev => { diff --git a/resources/views/layout1/partials/comments.blade.php b/resources/views/layout1/partials/comments.blade.php index 112da28..6137b33 100644 --- a/resources/views/layout1/partials/comments.blade.php +++ b/resources/views/layout1/partials/comments.blade.php @@ -14,6 +14,9 @@ {{--

Please check out the overhauled Njum Layout and give me some feedback!

--}} +{{--
+

Next month w0bm turns 6 years old! Wouldn't be possible without all of you! Thanks

+
--}} @if(Auth::check()) @if($video->id == '30186') @include('partials.thread_closed') diff --git a/resources/views/layout1/partials/tags.blade.php b/resources/views/layout1/partials/tags.blade.php index 668f49f..37facb7 100644 --- a/resources/views/layout1/partials/tags.blade.php +++ b/resources/views/layout1/partials/tags.blade.php @@ -40,7 +40,7 @@ No tags yet ... @endif - + | GIT diff --git a/resources/views/layout2/about.blade.php b/resources/views/layout2/about.blade.php index 46ae990..2a8b433 100644 --- a/resources/views/layout2/about.blade.php +++ b/resources/views/layout2/about.blade.php @@ -1,5 +1,7 @@ @extends('profilelayout') @section('novidcontent') +
{!!$blah!!} +
@endsection diff --git a/resources/views/layout2/categories.blade.php b/resources/views/layout2/categories.blade.php index 78d1312..0b14662 100644 --- a/resources/views/layout2/categories.blade.php +++ b/resources/views/layout2/categories.blade.php @@ -3,7 +3,8 @@ -
+
+
@foreach($categories as $category)
@@ -16,4 +17,5 @@
@endforeach
+
@endsection diff --git a/resources/views/layout2/irc.blade.php b/resources/views/layout2/irc.blade.php index 098715f..d46724d 100644 --- a/resources/views/layout2/irc.blade.php +++ b/resources/views/layout2/irc.blade.php @@ -3,6 +3,7 @@ +
IRC
irc.n0xy.net +6697 (ssl only) #w0bm
@@ -21,5 +22,6 @@ {{--
--}} +
@endsection diff --git a/resources/views/layout2/messages.blade.php b/resources/views/layout2/messages.blade.php index 06bc591..2c7aed8 100644 --- a/resources/views/layout2/messages.blade.php +++ b/resources/views/layout2/messages.blade.php @@ -1,5 +1,6 @@ @extends('profilelayout') @section('novidcontent') +
@include('partials.msglist')
@@ -10,4 +11,5 @@

Select a message to display content

+
@endsection diff --git a/resources/views/layout2/partials/navigation.blade.php b/resources/views/layout2/partials/navigation.blade.php index 64f7319..43e9e88 100644 --- a/resources/views/layout2/partials/navigation.blade.php +++ b/resources/views/layout2/partials/navigation.blade.php @@ -62,14 +62,14 @@ @if (\Request::is('index')) @else diff --git a/resources/views/layout2/partials/profileheader.blade.php b/resources/views/layout2/partials/profileheader.blade.php index cb5fe15..c9ebd0b 100644 --- a/resources/views/layout2/partials/profileheader.blade.php +++ b/resources/views/layout2/partials/profileheader.blade.php @@ -1,4 +1,4 @@ -