Commit Graph

148 Commits

Author SHA1 Message Date
Aaron van Geffen 70e6001c85 Replace event.keyCode with event.key equivalents. 2021-02-16 15:26:57 +01:00
Aaron van Geffen 4402521051 Highlight matching string in autosuggest entries. 2021-02-15 12:14:24 +01:00
Aaron van Geffen 889302cd36 Modernise AutoSuggest and TagAutoSuggest classes. 2021-02-15 12:14:23 +01:00
Aaron van Geffen cae5c6e5cf Merge pull request 'Add readme and license files' (#24) from readme into master
Reviewed-on: Public/pics#24
2020-12-30 20:09:04 +01:00
Aaron van Geffen 162d14b35f Merge pull request 'Refactor work for Thumbnail class' (#23) from thumbnail-refactor into master
Reviewed-on: Public/pics#23
2020-12-30 20:08:02 +01:00
Aaron van Geffen 555c61937b Minor Thumbnail refactors from upstream Kabuki. 2020-12-30 20:09:10 +01:00
Aaron van Geffen d069ddca18 Merge pull request 'Make crop editor usable' (#22) from crop-editor into master
Reviewed-on: Public/pics#22
2020-12-30 20:06:15 +01:00
Aaron van Geffen 71b71f8a03 Merge pull request 'Set JPEG compression to 80 for thumbnails' (#21) from thumbnail-quality into master
Reviewed-on: Public/pics#21
2020-12-30 20:05:46 +01:00
Aaron van Geffen 2885e24456 Merge pull request 'Prevent blank pages on session errors' (#20) from session-errors into master
Reviewed-on: Public/pics#20
2020-12-30 20:05:27 +01:00
Aaron van Geffen c72e24c0c7 EditAsset: refactor common expression into its own variable. 2020-12-30 15:36:30 +01:00
Aaron van Geffen b8191bf554 EditAsset: handle case where suffix is null. 2020-12-30 15:36:27 +01:00
Aaron van Geffen 3594b3d021 Add BSD 3-clause license. 2020-12-30 13:55:30 +01:00
Aaron van Geffen 936d3d20db Add a readme file to the repo. 2020-12-30 13:55:16 +01:00
Aaron van Geffen 5c4a075231 Constrain aspect ratio conservation to image boundaries as well. 2020-12-30 13:26:31 +01:00
Aaron van Geffen 6ddf518294 Grow image and its container with document height. 2020-12-30 13:26:31 +01:00
Aaron van Geffen 66a411973a Constrain crop proportions by default, with checkbox to disable. 2020-12-30 13:26:31 +01:00
Aaron van Geffen a83b938f8a Reposition crop boundary when window resizes. 2020-12-30 13:26:31 +01:00
Aaron van Geffen 5344378333 Crop editor: interpret 'cs' as centre-sliced crop.
At some point, I started using 'cs' instead of 'cc'. Let's just support both.
2020-12-30 13:26:31 +01:00
Aaron van Geffen 8147e2b97d Crop editor: do not allow selections starting outside image bounds. 2020-12-30 13:26:31 +01:00
Aaron van Geffen d562c70667 Improve styling of form elements. 2020-12-30 13:06:44 +01:00
Aaron van Geffen 5599ff8d9b Crop editor: use numeric input boxes with appropriate constraints. 2020-12-30 13:05:23 +01:00
Aaron van Geffen e7490e40dd Clean up and force a rebuild of thumbnails when customising a crop region. 2020-12-30 13:05:23 +01:00
Aaron van Geffen 6fcc2eb59f EditAsset: generate any pending thumbnails here as well. 2020-12-30 13:05:23 +01:00
Aaron van Geffen b793e05980 Re-assign thumbnail suffix for CROP_MODE_BOUNDARY.
This crop mode was intended to get the '_ce' suffix,
but was inadvertently getting '_c' instead.
2020-12-30 13:05:22 +01:00
Aaron van Geffen 340ed84272 Show first available thumbnail instead of a potentially hidden one. 2020-12-30 13:05:22 +01:00
Aaron van Geffen 93884e2e93 Fix initial slicing dimensions in CropEditor.setDefaultCrop.
Subtle bug. This has been in for years... :)
2020-12-30 13:05:22 +01:00
Aaron van Geffen 2a740d8cef Constrain boundary movement to image canvas. 2020-12-30 13:05:22 +01:00
Aaron van Geffen 5e0d4df2f7 Allow moving/dragging the crop boundary.
Currently unconstrained.
2020-12-30 13:05:22 +01:00
Aaron van Geffen e84c4f2b43 Constrain crop selection to image dimensions. 2020-12-30 13:05:22 +01:00
Aaron van Geffen 893d31af52 Proper dragging of the crop bounding rectangle/area. 2020-12-30 13:05:22 +01:00
Aaron van Geffen 5895f4faa6 Rewrite CropEditor.positionBoundary 2020-12-30 13:05:22 +01:00
Aaron van Geffen 8e7a09f3f3 Initial version of crop boundary dragging. 2020-12-30 13:05:22 +01:00
Aaron van Geffen 837c92db44 CropEditor: split setDefaultCrop from setInputValues and rename. 2020-12-30 13:05:22 +01:00
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