Commit Graph

165 Commits

Author SHA1 Message Date
Aaron van Geffen c392105814 Refactor crop editor DOM functions. 2020-12-30 13:05:22 +01:00
Aaron van Geffen 9d95df81fe WIP: finally implement drag events. 2020-12-30 13:05:22 +01:00
Aaron van Geffen d4cc72304e Use flexbox for crop editor box sizing. 2020-12-30 13:05:21 +01:00
Aaron van Geffen 2c68b6a798 Improve crop editor styling. 2020-12-30 13:05:21 +01:00
Aaron van Geffen fd84e1c9f8 Refactor crop editor into a proper class. 2020-12-30 13:05:21 +01:00
Aaron van Geffen 8d02662eb3 Set JPEG compression to 80 for thumbnails.
This saves both disk space and bandwidth by compromising a little on quality.
Only thumbnails are affected; full-size images are still saved in full detail.
2020-03-22 22:56:53 +01:00
Aaron van Geffen 31f4edc996 Register ErrorHandler before Session start. 2020-03-11 22:38:17 +01:00
Aaron van Geffen a208c0482f Invoke Dispatcher::kickGuest from Session for invalid sessions.
Previously, a NotAllowedException would be thrown if an invalid session
was encountered. However, these exceptions were not caught, and hence
would yield a fatal uncaught exception error.

At this point in Kabuki, the ErrorHandler class has not been registered yet
for error handling purposes. This error is therefore not visible if the PHP
ini directive 'display_errors' is set to 'Off'. As this is the default
production value, the script would fail with a blank page in such cases.
2020-03-11 22:38:15 +01:00
Roflin 909d50efa8 Merge pull request 'Rework album/tag downloads' (#19) from tag-download into master 2020-03-11 20:04:26 +01:00
Aaron van Geffen bd1ca8d18c Use $_SESSION['current_export'] to prevent simultaneous exports. 2020-03-11 18:57:31 +01:00
Aaron van Geffen c7d3b9c3d1 Disable output buffering so we can enjoy more than ~62MB of photos. 2020-03-11 12:32:44 +01:00
Aaron van Geffen 5a51778a6a Clean up tar process handling; make stdout non-blocking. 2020-03-11 12:32:44 +01:00
Aaron van Geffen 2bb29d7224 Minor optimisation to Download::getChildAlbumIds. 2020-03-11 12:32:44 +01:00
Aaron van Geffen 1b7e83e11e Let `tar` change working directory to assets directory.
This prevents edge cases where files are not found, while ensuring
the archive does not contain the system directory hierarchy.
2020-03-11 12:32:34 +01:00
Aaron van Geffen 354e54a0af Limit album/tag downloading on a user basis.
This removes the limit of downloading albums only; tags are fine, too.

Now using UserFacingException for certain exceptions, as these are
displayed to the user.

Removing the inheritance of HTMLController, as we intend to output binary
data only.
2020-03-11 11:55:17 +01:00
Aaron van Geffen 17859b70e9 Fix tag suggestions. 2020-02-25 13:31:30 +01:00
Aaron van Geffen 6a7defcdc9 Allow going back to photo directly from Edit Asset screen. 2020-02-25 13:31:12 +01:00
Aaron van Geffen f193b614b7 Port basic asset management page from Kabuki. 2020-02-25 13:31:12 +01:00
Aaron van Geffen 12ea378b02 Photo uploader: reduce client memory usage.
To create inline thumbnails locally, the previous version of the photo uploader
used base64 representations of the local files to be uploaded. While this is
effective, it is a little wasteful. When uploading several photos at once, this
could even lead to the page becoming less responsive.

This commit changes the process such that the photos are actually resized on a
canvas, only using the local original as a buffer. Hence, only the resized
photo is retained in memory.
2020-02-08 20:35:26 +01:00
Aaron van Geffen 62900e7f81 Correct JSON media type. 2019-09-29 15:00:28 +02:00
Aaron van Geffen c48ba786c1 Refactor leftover old-style arrays into new-style arrays. 2019-09-29 14:47:56 +02:00
Aaron van Geffen 3694819d13 Refactor out DummyBox objects from EditUser controller. 2019-09-29 14:38:42 +02:00
Aaron van Geffen d7b68995e8 Fix recounting not working on non-album tags. 2019-09-29 14:20:59 +02:00
Aaron van Geffen 5df7ea8371 Remove unused 'best color' algorithm.
This code is used to efficiently determine the most saturated colour in an image,
Kabuki uses this as the highlight colour on a page, but this styling has always
been disabled in HashRU Pics. Hence, we can safely remove the code, freeing up
some CPU cycles in the process. ;-)
2019-09-29 14:18:59 +02:00
Aaron van Geffen 7d3ab166c7 Simplify template logic for photo index. 2019-09-29 14:12:30 +02:00
Aaron van Geffen ed6054e6b6 Fix buttons appearing when they shouldn't.
This bug went unnoticed because people who aren't logged in can't actually see this page.
2019-09-29 14:05:45 +02:00
Roflin 3fc8ccf550 Merge branch 'tag-improvements' of Public/pics into master 2019-03-16 12:12:25 +01:00
Roflin 6a7c7af7b8 Merge branch 'fix/9' of Public/pics into master 2019-03-16 12:12:13 +01:00
Aaron van Geffen 8ec6c227d5 Remove leftover debug statements. 2019-03-09 13:58:37 +01:00
Aaron van Geffen 42e5c7fe37 Allow regular users to unlink tags from photos. 2019-03-09 13:48:18 +01:00
Aaron van Geffen 05c48be785 Link tags after adding them through autosuggest. 2019-03-09 13:22:32 +01:00
Aaron van Geffen d3cb750874 Default to centre cropping for portrait layout. 2019-03-09 12:50:16 +01:00
Dennis Brentjes 20db3561cf Adds the ability to export an album using streaming tar. 2019-03-08 19:52:01 +00:00
Dennis Brentjes 768f5ee529 Fixes an error related to using continue within a loop.
https://wiki.php.net/rfc/continue_on_switch_deprecation
2019-03-08 19:52:01 +00:00
Dennis Brentjes 16ec547064 Changes the ConfirmDelete page and updates database code.
The ConfirmDelete page now uses parts of the photopage. The
Confirmation dialog is its own template which is based on Alert.

The database now updates the album thumb to the most recent
addition to the album, when the album thumb asset is being deleted.
When there are no pictures left in the album 0 will be set.
2018-07-13 23:00:36 +02:00
Dennis Brentjes e40c05c1f8 Adds a Confirm Delete page and actually delete the assets. 2018-07-07 19:53:46 +00:00
Dennis Brentjes 344db6e4c5 Adds a Delete button to the ViewPhotoPage.
The Delete button is non functional yet and is only available for
admins and the photo owner.
2018-07-07 12:19:31 +00:00
Dennis Brentjes fcbbc7106d Fixes the template config for new websites 2018-06-30 17:02:03 +00:00
Dennis Brentjes 331193019c Fixes sorting on Tag Id in the ManageTags View. 2018-03-15 21:42:30 +01:00
Aaron van Geffen bcbb74a680 Allow setting URL slug through admin panel. 2018-02-22 20:07:06 +01:00
Aaron van Geffen c6c249787f Pass DIY slug when uploading photos. 2018-02-22 20:02:02 +01:00
Aaron van Geffen 068d1dad3e Allow capitals in tag slugs. 2018-02-19 11:55:39 +01:00
Aaron van Geffen f1408ad2ee Allow capitals and slashes in album slugs. 2018-02-19 11:55:39 +01:00
Dennis Brentjes 8b73420936 Makes the Reply-To header e-mail address configurable.
also uses the SITE_NAME constant as the sender name.
2018-02-03 20:58:00 +01:00
Aaron van Geffen ee304dd7b9 When generating thumbnails, infer width properly when null is passed. 2018-02-03 20:14:40 +01:00
Aaron van Geffen 1def1484cb Backport asynchronous thumbnail generation from Kabuki. 2017-12-20 14:51:23 +01:00
Aaron van Geffen 981b652e25 Fix album title box on mobile. 2017-11-22 11:22:38 +01:00
Aaron van Geffen cda7f3115c Fix crop editor. 2017-11-09 17:00:36 +01:00
Aaron van Geffen e439a074a6 Increase tile height for album thumbnails, making them 4:3. 2017-11-09 17:00:36 +01:00
Aaron van Geffen ee9bdd45c0 Leave out labels on photo index pages.
They were pretty much only displaying filenames, so not adding much.
2017-11-09 17:00:36 +01:00