-
Notifications
You must be signed in to change notification settings - Fork 592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow options to be customized per directory #696
base: master
Are you sure you want to change the base?
Conversation
Instead, getSize and getView should return the default if an explicit override has not been provided.
thanks for these patches! |
This may be overkill here, but since you are apparently the only person working on this. Here's a few suggestions for good and useful features: Themes:#666 Dark Theme Button/switch at the top bar to switch light/dark them would be nice. Along with a URI setting to load in this theme when sharing the url. (e.g. somesite.com/h5ai/folder?theme=dark) File types#658 Please integrate PDF.js and add a dark theme. Downloading#613 Zip files crashes new connection for everyone Backend#648 Pre-generate thumbnails in public/cache |
#326 Shell-Zip only 1 connection allowed These two are issues with the server configuration. I use nginx and had to use the amount of childs available in php-fpm, then it worked. The problem is that php generates this on-the-fly and keeps the connection open, so you need multiple php-processes to dispatch that stuff. |
@RomeSilvanus I don't have enough free time to work on all that stuff :D Having said that, I was thinking of adding some sort of proper themeing system. My idea was that you could put CSS files in a particular directory, and it'd show all the themes in a list in the UI somewhere. |
I don't think this repository is maintained anymore. I would have a couple of PRs, too. Will you take over? |
I will be on vacation for 2 weeks but if by then nobody else wants to handle this I can do a fork and get all the open PRs in. |
+1 for creating a fork I found this project when I wanted some simple way of hosting my pictures. I have a docker-compose file that I can share too if anyone is interested. I was thinking of putting that on a separate repo but perhaps it's nice to keep it in the same repo as this. I have a small bugfix I can create a PR for if people are interested. It seems that if you have h5ai for one subfolder for example "/pictures" and not for the root, the root still gets read when creating the tree view. One way to fix it is to add a .htaccess file in the root for the directories you want to exclude. Then you'll get permission denied class-filesize.php. One quick and dirty way of fixing it is to change the line 27 to this "if (is_dir($path) && readfile($path)) The folders that cannot be read is still shown but they are empty, I think someone better php-coder may get a better solution, I have never programmed php before :) It's a bit sad when there are people having PRs that are just left without any merging. |
I have one more feature request, auto rotate images using the EXIF data |
This adds the ability to customize options on a per-directory basis. My main use case is to use the "icons" view as the default view just for certain directories (directories containing pictures), while using the "details" view for everything else.
This needed some changes:
_h5ai.header.html
), also look for a JSON file called_h5ai.options.json
. It will look from the current directory all the way up to the root directory, merging all the configs together (child directories inherit the config from their ancestors, and can override individual fields)Closes #668