Commit Graph

40 Commits (f003f55fcac34e83f7eb3cc3d09b0ac0b15aa9f7)

Author SHA1 Message Date
voussoir f003f55fca
Move make_json_response to voussoirkit.flasktools. 2021-06-04 21:49:45 -07:00
voussoir 56ab6636cc
Add Swipe UI. 2021-06-03 21:28:05 -07:00
voussoir e8cb183849
Add cards.js photos.create, render clipboard batches on client. 2021-05-29 08:46:25 -07:00
voussoir 89205ac24a
Add interface for copying tags from other photos. 2021-04-29 13:12:37 -07:00
voussoir 400c255aea
Add "Show in folder" button to photos, albums. 2021-02-25 18:57:41 -08:00
voussoir e717833d41
Fix batch cards endpoint still referring to photo_card.html. 2021-01-28 17:01:00 -08:00
voussoir 0c3ee6f2d2 Add search_embed for bringing search iframes to other pages. 2021-01-02 13:49:43 -08:00
voussoir 8ecf594945 Move jsonify methods into the objects instead of separate file. 2021-01-01 17:02:01 -08:00
voussoir d3f6d6b26a Add exceptions to warning_bag instead of strings for some.
I was adding messages as strings because that's how they get shown on
the web interface. But it's better to return the real exception objects
and have the interface deal with it.
2021-01-01 17:02:01 -08:00
voussoir 469103e0ac Use voussoirkit.stringtools for comma_space_split. 2020-11-15 22:20:36 -08:00
voussoir 63bc2dfed5 Add yield_photos, count albums in search result limit.
This experiment of bringing Photos and Albums closer to parity in
search is going well so far. I have found some situations where it
is nice to only get albums back from search results.
2020-09-27 23:38:49 -07:00
voussoir 667c14f072 Add search argument within_directory. 2020-09-27 10:48:01 -07:00
voussoir f5d8898e14 Increase search limit to 1,000. 2020-09-24 14:28:38 -07:00
voussoir 343ce508bf Add search UI for yield_albums. 2020-09-24 14:26:51 -07:00
voussoir adb1d0ef39 Replace all double blank lines with single, improve hash headers.
There was always some semblance that two blank lines has some kind of
meaning or structure that's different from single blank lines, but
in reality it was mostly arbitrary and I can't stand to look at it
any more.
2020-09-19 03:13:23 -07:00
voussoir c91888a738 Some linting. 2020-09-15 19:47:07 -07:00
voussoir 42d4b7fafb Add give_token, catch_etiquette_exception to all endpoints at once. 2020-09-12 11:43:25 -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 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 d7307a6c44 Centralize flask.render_template calls to simplify common args. 2019-08-14 13:40:52 -07: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