Commit Graph

224 Commits

Author SHA1 Message Date
Rasmus Kaj
e62bdeffa5 Update rand and memcached-rs. 2018-07-17 11:53:43 +02:00
Rasmus Kaj
5222194c5c Add admin ux to set image position. 2018-07-15 21:52:44 +02:00
Rasmus Kaj
e86271fc2a Some cleanups, mainly clippy-suggested. 2018-07-15 14:34:55 +02:00
Rasmus Kaj
20c72d5ef3 Rustfmt. 2018-07-05 23:28:57 +02:00
Rasmus Kaj
79ca4a4e1a Fast image scaling.
Use the new image.thumbnail method if the source is at least three
times target size.
2018-04-27 11:01:59 +02:00
Rasmus Kaj
fb766f5a0d Update image dependency. 2018-04-27 09:22:53 +02:00
Rasmus Kaj
4ee6265d7a Oops. 2018-04-08 12:05:33 +02:00
Rasmus Kaj
1bc04d6b46 Rustfmt. 2018-04-08 03:10:38 +02:00
Rasmus Kaj
d4509b0ce2 Get size of image even if exif is missing. 2018-03-05 21:48:31 +01:00
Rasmus Kaj
408a7be248 Don't override picture orientation. 2018-03-05 21:09:26 +01:00
Rasmus Kaj
fc1ed81561 Store width and height of images.
Use it to calculate width and height of small images in lists.

Since the old database should be migratable to the new, the width and
height fields are nullable.  I aim to make them not nullable later,
after all images in the database has got width and height.
2018-03-05 00:29:39 +01:00
Rasmus Kaj
c2388befa9 Use kamadak-exif instead of rexif. 2018-03-04 14:35:30 +01:00
Rasmus Kaj
72c07fbe5d Get rid of a reexport. 2018-03-03 14:39:33 +01:00
Rasmus Kaj
7aa4a0fb30 Unify groups and index.
Remove the groups template, use the index template instead.

Remove the Group struct, add an optional title to the PhotoLink struct
instead.
2018-03-03 14:35:50 +01:00
Rasmus Kaj
4d000337d0 Rustfmt. 2018-02-20 10:42:51 +01:00
Rasmus Kaj
56b53e1607 Minor cleanups. 2018-02-19 23:30:03 +01:00
Rasmus Kaj
240b3bada2 Get rid of unnecessary New* structs. 2018-02-19 23:02:31 +01:00
Rasmus Kaj
0357667858 Log if ther is a problem loading positions. 2018-02-11 18:10:00 +01:00
Rasmus Kaj
b567e6625f Improve next/prev for simultaneous images. 2018-02-11 17:16:21 +01:00
Rasmus Kaj
06bb3ce97f Stor compressed only if worth it.
If a .png.br is six bytes less than plain .png, that is not
worth the overhead of having two files on the server and
decompressing .br before parsing the .png in the browser.
2018-02-11 16:09:53 +01:00
Rasmus Kaj
5bd7a8d4a8 Rustfmt. 2018-02-10 23:10:04 +01:00
Rasmus Kaj
59d26c5bce Move source for statics to res directory. 2018-02-10 23:06:09 +01:00
Rasmus Kaj
79c21fa67b Use local copy of leaflet.
At the same time, update the used leaflet to version 1.3.1.
2018-02-10 22:59:35 +01:00
Rasmus Kaj
f7ee3c9f49 Write compressed files only if smaller
When a static file is in a format that is compressed in itself (such
as a jpeg or png image), applying gzip or brotli compression will
actually make it larger.  In those cases, don't write the compressed
file ad all when running storestatics.
2018-02-10 14:37:17 +01:00
Rasmus Kaj
8dcc6359e2 Dont split static path names.
A static filed might be called somename.suffix, but there is no
need to assume that, and absolutley no need to copy the strings
separatley and format them together again when we can just
borrow the relevant substring directly from the request.
2018-02-10 01:00:48 +01:00
Rasmus Kaj
28032e4026 Add maps to image lists. 2018-02-07 20:56:23 +01:00
Rasmus Kaj
df9ad3edbe Support Exif orientation 0 (disabled?). 2018-01-25 21:52:59 +01:00
Rasmus Kaj
fe42eebfd7 Use nightly distributed rustfmt-preview. 2018-01-25 21:20:15 +01:00
Rasmus Kaj
33d7eb03a0 Fix deprecated diesel type usage. 2018-01-25 21:07:47 +01:00
Rasmus Kaj
5a9d534b36 Update memcached and env_logger dependencies. 2018-01-25 20:56:29 +01:00
Rasmus Kaj
696ceab074 Rustfmt. 2018-01-04 00:31:35 +01:00
Rasmus Kaj
0d4a2933ff Use diesel 1.0.0. 2018-01-04 00:15:17 +01:00
Rasmus Kaj
73eb97f1d2 More methods, avoid a giant method. 2017-12-30 17:04:23 +01:00
Rasmus Kaj
f739b745bf Minor code cleanup. 2017-12-25 16:46:16 +01:00
Rasmus Kaj
4971a1b03c Allow "_" in next. 2017-12-25 16:43:23 +01:00
Rasmus Kaj
0a6a7f8f1c Improve shoing of time spans. 2017-12-17 16:02:47 +01:00
Rasmus Kaj
836c5f8683 Remove some redundant refs. 2017-12-11 21:34:07 +01:00
Rasmus Kaj
346ad7099a Be sure to write all of the compressed file. 2017-12-11 21:33:32 +01:00
Rasmus Kaj
6310316669 Rustfmt. 2017-12-11 21:10:18 +01:00
Rasmus Kaj
b1a8360e5c Use flate2 1.x.
There was a slight API change.
2017-12-07 07:17:09 +01:00
Rasmus Kaj
858f873f98 More natural grouping.
Make groups no shorter than 8 and no longer than 16 photos.
Also, make time and not only number of images a factor when
deciding which group to split next.
2017-11-28 00:14:53 +01:00
Rasmus Kaj
3071431452 Use the slug crate for generating slugs.
Rather than having to keep on adding special cases in my own code.
2017-11-26 22:04:16 +01:00
Rasmus Kaj
27481a62b3 Simpler and more versatile links. 2017-11-25 02:35:15 +01:00
Rasmus Kaj
94e661065b Some styling and UX. 2017-11-25 01:22:01 +01:00
Rasmus Kaj
a54ca58850 Fix some clippy complaints. 2017-11-24 22:41:05 +01:00
Rasmus Kaj
8ae2c64564 Improve tag completion.
Less is more (max 10 answers, not 15), and BadRequest rather
than 404 is q query parameter is missing.
2017-11-24 19:56:09 +01:00
Rasmus Kaj
09a7f92bc6 Rustfmt update. 2017-11-23 11:09:13 +01:00
Rasmus Kaj
448f9b8a75 Add admin UX to grade images. 2017-11-22 21:13:34 +01:00
Rasmus Kaj
ade508eb8d Use improved timecluster for day view.
Just as for people, places, and tag views.
2017-11-20 15:10:42 +01:00
Rasmus Kaj
3c3ecbbfbb DRY. 2017-11-20 14:06:55 +01:00