Commit Graph

78 Commits (23f9a5427f31caa1e45e08fff1dcc06c85f4e513)

Author SHA1 Message Date
voussoir ee28779138 Pass separate tag_count into tags.html to prevent double-counting.
Foolishly, I was checking the length of the outputted easybake format,
which included lines for synonyms and multi-parent tags that shouldn't
be part of the tag count.
2020-09-11 23:52:23 -07:00
voussoir b0dcc6d3c6 Separately count photo results to fix included albums counting.
I'm currently running an experiment where albums are also included in
search results, but they don't cost you any of your limit parameter.
So the len(results) was often bigger than limit and tricking this
paginator into thinking we needed a next page when really we didn't.
This workaround can be undone when I decide how to make the album
results more official.
2020-09-11 23:12:23 -07:00
voussoir 8d2af3255b Add endpoints set_searchhidden, unset_searchhidden and checkbox. 2020-09-09 20:51:15 -07:00
voussoir 7762a8ff07 Rename post_photo_searchhidden -> post_batch_photos_searchidden. 2020-09-09 19:27:22 -07:00
voussoir 199a4af658 Remove unnecessary intermediate variable view. 2020-09-09 13:15:21 -07:00
voussoir 6d5cd11612 Let search_core return tags as real lists.
This lets search.html deal with real objects instead of playing with
dumed-down strings.
2020-09-09 13:09:48 -07:00
voussoir d585fe92a9 Let search_core return author as real list.
This lets search.html deal with real objects instead of playing with
dumed-down strings.
2020-09-09 13:08:41 -07:00
voussoir 94b811b3b1 Let search_core return extension as real list.
This lets search.html deal with real objects instead of playing with
dumed-down strings.
2020-09-09 13:07:22 -07:00
voussoir c0f24732e1 Remove useless intermediate variable search_kwargs. 2020-09-09 12:13:18 -07:00
voussoir 18c2f0dc78 Rename vars photos -> results since results may contain albums. 2020-04-02 23:27:47 -07:00
voussoir dd3d40de53 Experimental: Allow search results to include albums.
I've been thinking about this for a while but couldn't think of
the perfect way to implement it. I still haven't, so instead I'm
just starting with something and we'll see how to improve later.
At any rate, I can update the rest of the system to expect Albums
coming out of search so that if I ever have a better algorithm
everything else will already be ready for it.
For this first experiment, just any photos that are part of an album
will send that album out as a result. It doesn't even respect the
limit parameter, it's really just to see how it feels to use.
2020-04-02 22:36:40 -07:00
voussoir 5a394c4376 Use len(photos) >= limit instead of ==. 2020-04-02 22:21:54 -07:00
voussoir 32a161baa8 Fix prev_page_url offset when on page 2 going back to page 1. 2020-04-02 21:37:50 -07:00
voussoir faf0c62426 Check if limit is falsey to avoid useless prevnext buttons.
If limit is 0 then you get prev and next links which also have
limit 0 and are pointless to click.
2020-03-28 17:38:10 -07:00
voussoir a00fb65758 Don't leave falsey values out of dict_to_params, let caller do it.
Explicit is better than implicit and all that.
2020-03-28 17:37:28 -07:00
voussoir a30649b0a8 Replace looping set.add with set.update. 2020-03-19 17:38:51 -07:00
voussoir 45cb96cc5c Add endpoint /photo/photo_id/delete. 2020-02-26 18:57:29 -08:00
voussoir 02db1f3971 Make response_type required, explicit in all calls. 2020-02-26 17:50:36 -08:00
voussoir 9d620b4b97 Remove unused imports & other small things. 2020-02-20 22:44:56 -08:00
voussoir 4a193d228c Add commit=True to frontend where necessary. 2020-02-20 00:34:28 -08:00
voussoir 854fa4db51 Rename PDB.register_user -> new_user.
I was treating User a little bit special here, but I prefer to
have the more consistent terminology.
2020-02-20 00:18:40 -08:00
voussoir 04f3f6f297 Remove commit=False from all method calls, it's default now. 2020-02-19 22:20:21 -08:00
voussoir 89bfca8f9f Add endpoint for photo generate thumbnail. 2020-01-12 14:52:03 -08:00
voussoir 7ecfeca96c Allow setting display name during registration. 2019-08-26 14:32:51 -07:00
voussoir d7307a6c44 Centralize flask.render_template calls to simplify common args. 2019-08-14 13:40:52 -07:00
voussoir 9ab0a61cb3 Add endpoint for refreshing Album directories. 2019-06-15 02:44:46 -07:00
voussoir 707fdcc637 Add album cards and improve album pages.
- album card has placeholder for future thumbnail.
- replaced nested tree hierarchy lists with separate boxes.
- list/grid view also applies to the root listing.
- added a sticky right panel for all the tools. not pretty yet.
- mechanism for adding sticky panel changed. instead of applying
  it to the #right, you apply it to #content_body so that its
  grid layout can be updated properly.
2018-11-12 22:15:59 -08:00
voussoir 6e312bd287 Rename the etiquette_flask backend package to backend.
Alright, I got tired of confusing myself with the same-named
outer and inner package.
Keep in mind that every frontend implementation is supposed to be
its own independent project where etiquette is nothing but a
dependency. So the name backend is not ambiguous with the etiquette
backend.
2018-11-04 19:45:23 -08:00