63a3ecfa88
Add namespacing to editor.js.
2018-07-22 20:21:00 -07:00
d7b9020585
Add namespacing to photoclipboard.js.
2018-07-22 20:21:00 -07:00
c7cce5a4e5
Add namespacing to common.js.
2018-07-22 20:21:00 -07:00
cf9b6d0725
Workaround autocomplete box sticking around after submitting.
2018-07-22 20:20:54 -07:00
5ec38a93b1
On the tag ancestors, don't display the current tag name.
...
I was finding it too confusing.
2018-07-22 20:19:05 -07:00
8a12a24e8e
Add tag_autocomplete.js.
...
Instead of embedding the entire tag list in the search.html template
every single time, this script loads the tags from the new,
cache-enabled endpoint /all_tags.json. Then we can use html5
datalists to create autocomplete forms on the search and photo pages.
2018-07-22 20:19:05 -07:00
5ac3a8a121
Add caching.cached_endpoint decorator for 304'ing any url.
2018-07-22 20:19:05 -07:00
4c65ccaf68
Big! Liberate Groupables from strict heirarchy. Multiple parents.
...
I found that the strict heirarchy was not satisfying the situation
where one tag is the intersection of two others, but we can only
pick one as the parent
For example, does red_jacket belong under clothes.red_clothes or
clothes.jackets? A search for "red_clothes AND jackets" might
give us someone wearing red pants and a black jacket, so this
definitely needs to be a separate tag, but picking only one
parent for it is not sufficient. Now, a search for red_clothes
and a search for jackets will both find our red_jacket photo.
The change also applies to Albums because why not, and I'm sure
a similar case can be made.
Unfortunately this means tags no longer have one true qualname.
The concept of qualnames has not been completely phased out but
it's in progress.
This commit is very big because I was not sure for a long time
whether to go through with it, and so much stuff had to change
that I don't want to go back and figure out what could be grouped
together.
2018-07-20 13:09:06 -07:00
c2cfa99752
Alphabetize imports in endpoints files.
2018-07-18 18:37:21 -07:00
4987db4bd0
Switch to f-string formatting in many places.
2018-07-18 18:36:36 -07:00
5c97086df3
Improve hotkey framework by making own file & register function.
2018-07-14 14:19:13 -07:00
2901fefe65
Add more clipboard feature hotkeys.
2018-07-14 02:54:39 -07:00
984f6eb3c7
Add a clear button to the clipboard tray.
2018-07-14 02:49:45 -07:00
2f83bc2808
Add a simple docstring to the flask launch files.
2018-06-30 12:59:10 -07:00
4002cc660e
Don't use shortlink for zoom url. It breaks caching.
2018-05-01 21:03:10 -07:00
8c356df6fd
Add P_photos to batchify some api operations.
2018-05-01 18:09:35 -07:00
b19682d1a5
Replace Photo.sorted_tags with jinja filter.
2018-04-28 19:05:51 -07:00
50592f0ab4
Rework tab titles from "Album X" to "X | Albums" etc.
...
To prioritize the most unique and relevant piece of information.
2018-04-27 20:04:24 -07:00
bdec6cf4a3
Add filter to generate /file/ link with appropriate basename.
...
Because inlining the |urlencode every time is easy to forget.
2018-04-19 19:29:06 -07:00
bef91b3243
Allow /file/ to be accessed with a basename.
2018-04-19 19:23:10 -07:00
a12d8cada1
Don't capture ctrl+a if currently in a text field.
2018-04-17 18:35:32 -07:00
ed3b67bdb9
Split runner entrypoint from default local runner.
2018-04-15 20:34:03 -07:00
4434517c54
Rename config user.min_length -> min_username_length.
2018-04-15 14:36:07 -07:00
21bd211889
Give Users a display_name.
2018-04-15 14:23:24 -07:00
df211454bb
Include username and password length requirements on form.
2018-04-15 13:20:08 -07:00
f77ab51b14
Add Album.has_any_photo and has_any_subalbum_photo.
2018-04-15 02:41:24 -07:00
0c9582598d
Add arg --https even for non-443.
2018-04-15 01:00:37 -07:00
c1fd863999
Add jinja_filters.py with bytestring.
2018-04-15 00:59:54 -07:00
4fcb524211
Show number of photos in h3 on Album page
2018-04-06 21:50:13 -07:00
ac41598bb0
Add some more give_token.
...
I probably should just put it as a global pre-request hook.
2018-03-29 19:24:48 -07:00
cfa5d269d1
Add keybinds CTRL+A and +D to select/deselect all cards.
2018-03-23 11:58:39 -07:00
27885df64e
Fix binding of the fallback handler.
2018-03-23 10:25:03 -07:00
abaeb2321f
Oops, should be .remove instead of .pop for the cacheclass.
2018-03-23 00:35:56 -07:00
6ee86431e5
Add Album.normalize_title and _description.
2018-03-23 00:35:55 -07:00
0e3ae11610
Improve normalizers, use less None; Add author search box.
...
It was getting difficult to remember which of the normalizers
use None and which don't. So let's try to be a little more consistent
and just use empty sets, etc, so the caller can rely on receiving a
set instead of having to check for None.
Also renamed search parameter authors->author to be more in line
with the singular form of extension.
2018-03-22 21:09:21 -07:00
5be174d1b3
Completely rewrite search to use more SQL and less application.
...
In order to achieve tag_musts, we break each of the musts down
into separate EXISTS queries for each of the matchable children.
Then we INTERSECT those, and finally do other filtering and
ordering as usual.
2018-03-21 19:20:43 -07:00
7b4ae3045a
Remove some excessive newlines from photo_card output.
2018-03-19 22:52:15 -07:00
b4cd4b6130
Fix body not filling vertical space.
2018-03-19 15:06:07 -07:00
45bd80caa4
Remove height:40px from plain_link. Only nice_link.
2018-03-19 15:03:53 -07:00
b90971813f
Oops, fix broken click-to-join because of the qualname change.
2018-03-19 14:11:25 -07:00
b5274fefb9
Add caching.py to enable browser caching of files.
2018-03-18 21:42:31 -07:00
ea7401b4f2
Fix common.send_file to use pathclass.
2018-03-18 21:40:32 -07:00
0de755f138
Let the SessionManager use a cacheclass instead of plain dict.
2018-03-18 21:23:48 -07:00
a5aef63c6f
Tags on this page should also display qualnames with maxlen.
2018-03-18 19:47:08 -07:00
84599b44f7
Store author for bookmark creation.
2018-03-18 15:59:58 -07:00
dffde094e8
Give Albums and Tags an author_id column.
...
Keeping V11 because I hadn't published previous commits yet.
2018-03-18 15:28:26 -07:00
4a39b527f3
Use dot_extension on the photo cards.
2018-03-18 00:19:30 -07:00
ffe0be21f5
Fix Photo thumbnail paths to be relative to the PDB's thumb dir.
...
Previously they were relative to the directory from which the client
was launched, meaning it usually started with ./_etiquette.
Now it should be more portable and less tight.
2018-03-13 02:50:54 -07:00
8fcaf15fbe
Remove the word "Album" from the h2. The number is okay.
...
I just decided I like this better.
2018-03-10 19:54:56 -08:00
df86d0f128
Replace "you are here" with the album's name.
2018-03-10 19:54:22 -08:00
45091c6596
Fix thumbnail height in CSS only, no html attr. Don't h-stretch.
2018-03-10 19:53:29 -08:00
f04e055ca3
On the tag page, put descr in a dark box like albums.
2018-03-10 13:40:02 -08:00
6de0ad8e36
Oops, add this.open fallback to the open binder.
2018-03-10 13:28:13 -08:00
daf824caf5
Improve album page's use of data-editor-empty-text.
2018-03-10 13:24:23 -08:00
494d44aa03
Improve editor.js comments and usage of this
.
...
I realized what I was doing wrong with `this`, so now the function
binder is much cleaner.
2018-03-10 13:23:37 -08:00
f9bee5716c
Don't clear the clipboard after pasting into album.
...
Sometimes I want to do more operations.
2018-03-09 17:50:41 -08:00
a1919a7725
Support giving title when creating albums. Two-step prompt.
2018-03-09 17:38:40 -08:00
5f6d21fdee
Give Photos a searchhidden
property.
...
By default, photos with searchhidden do not appear in the search
results. This allows a small number of representative images from
a large album to appear in the results, while the rest can be
found on the album's page.
The same effect could be achieved with a tag and forbid search,
but tag searching has much higher cost and it would be more difficult
to implement as a default behavior without requiring lots of special
checks whenever listing tags etc.
2018-03-09 17:10:27 -08:00
faacf7b594
Oops, use response["data"].
2018-02-26 19:06:27 -08:00
f34164bf85
Add search feature has_thumbnails.
...
Search needs a complete refactor.
But until then, let's keep adding to it!
2018-02-24 23:06:25 -08:00
5f7266c519
Add button to clear clipboard.
2018-02-24 23:00:28 -08:00
4e98fcf137
Oops, add the session to /clipboard.
2018-02-24 19:18:15 -08:00
0228fbebfd
Move the random hex generator to helpers.
2018-02-24 18:54:59 -08:00
2fceeedbbb
Add /clipboard UI for mass refresh metadata.
2018-02-24 13:23:35 -08:00
5add26d8fb
Add endpoint /batch/photos/refresh_metadata.
2018-02-24 12:52:36 -08:00
30c9148092
Move the remaining common css / js to their folders.
2018-02-24 12:51:36 -08:00
79b20369db
Oops, apply listeners to /photo input box as well.
2018-02-24 01:08:21 -08:00
e359180467
Move clipboard_tray rules to own file in css folder.
2018-02-24 01:06:27 -08:00
aabcb61a9c
Create css folder. Move photo_card rules to own file.
2018-02-24 00:58:43 -08:00
840185072b
Move photoclipboard.js to the js folder.
2018-02-24 00:47:44 -08:00
56a998682d
Create js folder. Move Editor to its own file.
2018-02-24 00:46:55 -08:00
aa284c388d
Fix message_area on /login.
...
Because the rules are no longer in common.
2018-02-24 00:34:46 -08:00
9c6cae7177
Use event listeners instead of setting onkeyup manually.
2018-02-24 00:24:38 -08:00
5a1d259780
Add /clipboard UI for mass-tagging.
2018-02-22 15:23:57 -08:00
4b79308119
Move 0-item clipboard collapser to update_clipboard_tray.
2018-02-22 13:36:31 -08:00
2adadf9871
Rewrite tags.html with more Grid.
2018-02-21 22:13:46 -08:00
a9248d8cab
Add CSS clipboard_size; and other clip hook improvements.
...
Any element with class clipboard_size will have its text updated;
Removed the call to on_pageload from save_ because it redundantly
causes a load. Separate those update hooks.
2018-02-20 20:20:20 -08:00
761ae5c30c
Add endpoints /batch/photos/add_tag and /remove_tag.
2018-02-20 17:23:51 -08:00
13e8bc4a6f
Add more items to to-do list; minor fixes.
2018-02-20 16:50:39 -08:00
ebe0fcee40
Rename URL /photo_cards -> /batch/photos/photo_card.
2018-02-19 23:44:24 -08:00
6ad41eb516
Improve bookmark appearance; don't send edit with blank url.
2018-02-17 19:36:48 -08:00
91d445a877
Add new page /clipboard, with full photo cards.
2018-02-17 19:12:34 -08:00
ef5bbf5fc3
Split HTTP response dict into ["meta"] and ["data"].
2018-02-17 18:47:17 -08:00
f4756d97e4
Improve html & Jinja indentation.
2018-02-17 18:19:47 -08:00
b02374136f
Let the page add its own clipboard load/save hooks.
2018-02-17 16:31:51 -08:00
1b631b33e9
Make separate functions for HTTP get / post.
2018-02-17 16:08:38 -08:00
606a66cbf9
Remove Photo.filepath and real_filepath in favor of real_path.
2018-02-17 15:19:36 -08:00
59cd922a53
Remove unnecessary methods=GET.
2018-02-17 14:59:02 -08:00
574ac9f656
Slightly scale down image thumbnail to match others.
...
It was too big!
2018-02-16 23:30:27 -08:00
b4a28f5034
Make Photo.bytestring a @property.
...
This is the kind of thing that should be a @property, because
it's very low processing power and doesn't hit the database.
2018-02-16 23:16:02 -08:00
bbe392ac09
Rename Photo.author -> get_author; no longer a @property.
2018-02-16 23:11:25 -08:00
205c49c21f
Rename Photo.albums -> get_containing_albums.
2018-02-16 23:08:44 -08:00
2f9b51b636
Rename Photo.tags -> get_tags.
2018-02-16 23:07:21 -08:00
ac9d7ede22
Rename Album.photos -> get_photos.
2018-02-16 23:03:54 -08:00
6574450ad1
Rename Tag.synonyms -> get_synonyms.
2018-02-16 23:01:07 -08:00
fdcf07940a
Rename Groupable.children -> get_children.
2018-02-16 23:00:43 -08:00
75effafaf5
Rename Groupable.parent -> get_parent.
...
After making the "if x.parent is None" mistake too many times,
forgetting that it was not a @property, I've decided that the
verby name is better.
2018-02-16 22:59:34 -08:00
bf0ac1ebac
Move etiquette_repl into a folder for consistency.
...
The items in the frontends folder should essentially be
black boxes with a launch file. Now the repl one looks the same
as the flask.
2018-02-16 22:31:10 -08:00
3c4f69f647
Specify name= on calls to PDB.get_tag.
...
Sometimes it's easy to forget whether its the name or ID,
and I like the consistency of specifying.
2018-02-16 22:25:56 -08:00
1c1e7f158f
Minor fixes & pylint appeasements.
2018-02-16 21:28:36 -08:00