Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ yarn-error.log
*.env
/composer.phar
*.cache
/.vs
15 changes: 15 additions & 0 deletions app/Http/Controllers/FileManagerController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

namespace App\Http\Controllers;

use Illuminate\Support\Facades\Auth;

class FileManagerController extends Controller {
public function index() {
if (!Auth::check() || !Auth::user()->isStaff || !Auth::user()->hasPower('manage_files')) {
abort(404);
}

return view('filemanager');
}
}
13 changes: 13 additions & 0 deletions app/Http/Controllers/HomeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,19 @@ public function getLink(Request $request) {
return view('auth.link');
}

/**
* Shows the file manager page.
*
* @return \Illuminate\Contracts\Support\Renderable
*/
public function getFileManager() {
if (!Auth::check() || !Auth::user()->isStaff || !Auth::user()->hasPower('manage_files')) {
abort(404);
}

return view('filemanager');
}

/**
* Redirects to the appropriate provider.
*
Expand Down
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"license": "MIT",
"require": {
"php": "^8.1",
"alexusmai/laravel-file-manager": "^3.1",
"doctrine/dbal": "^3.7",
"erusev/parsedown": "^1.7",
"ezyang/htmlpurifier": "^4.10",
Expand All @@ -28,7 +29,8 @@
"socialiteproviders/tumblr": "^4.1",
"socialiteproviders/twitch": "^5.3",
"spatie/laravel-feed": "^4.1",
"spatie/laravel-honeypot": "^4.1"
"spatie/laravel-honeypot": "^4.1",
"tinymce/tinymce": "5.4.2"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be better to handle this via npm and include it in what mix handles... Probably out of scope for this PR, though.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All told, it might be easier to update tinyMCE that way in a separate PR, and then apply these changes on top... as it is, this is a tough PR to review because the signal/noise ratio is a bit dire due to the update changes.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be worth it to even update tinymce to a higher version like v7 for the enhanced code editor to merge that into core? Adding the reference here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've had issues with tinyMCE versions past... 6.7.3, it looks like? where the toolbar likes to vanish. though it may be a quirk of vite or something. But, assuming that doesn't kick in, potentially?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@itinerare Did it load without the toolbar and take way too long to have the toolbar appear? I had that issue and seemed to resolve it by removing addons/plugins I didn't necessarily use (spoiler, emojis, etc) and now it loads much faster. Potentially a similar cause?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The toolbar just never loaded-- but this is, again, only on versions after the stated one, so not something that should impact LK unless you've gone out of your way to update it.

},
"require-dev": {
"fakerphp/faker": "^1.9.1",
Expand Down
250 changes: 247 additions & 3 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading