voussoir
f397140e20
Make /logout operate on POST only.
2018-08-17 22:23:40 -07:00
voussoir
0ccfa74709
Let helpers.generate_*_thumbnail raise FileNotFoundError.
2018-08-17 22:05:47 -07:00
voussoir
8fdbd49f70
Minor html and style fixes.
...
Applied wrapping to the description <pre>s,
removed some css that referred to nonexistent things,
move some element tags inside the {%if%} that fills the contents.
2018-08-17 22:05:16 -07:00
voussoir
f28e362c58
Add space between ok, cancel buttons on editor & confirmer.
2018-08-16 19:46:33 -07:00
voussoir
251bc04459
Fix photo.html endpoint urls.
2018-08-16 19:45:47 -07:00
voussoir
1a4a0f8560
Replace all usage of "keybind" -> "hotkey".
...
Since hotkey was the prevailing term already.
2018-08-16 19:45:14 -07:00
voussoir
1fcacb81fc
Update clipboard.html's button function naming scheme like others.
...
I have finally found a pattern I like which is
function, function_callback, and function_form
for the backend, callback, and button handler respectively.
2018-08-14 23:24:12 -07:00
voussoir
bea9f905bd
Support downloading .zip of arbitrary photos, clipboard.
...
Now that creating zips of any photo set is easier, we can
let the user download whatever is on their clipboard.
2018-08-14 23:02:06 -07:00
voussoir
bc6a0aa907
Improve & generalize zipfile code.
...
Moved some heavy lifting out of the flask album.zip endpoint
and into helpers.py.
Renamed some things for clarity.
2018-08-14 22:58:26 -07:00
voussoir
53c86c30a1
Improve clarity of the recursive_dict_ helper functions & usage.
2018-08-11 18:19:55 -07:00
voussoir
3b3c690ae3
Remove return value from load_config, so no illusion of purity.
...
This method already relies on object state anyway and writes back
to self.config, so the return value is unnecessary.
2018-08-11 18:19:10 -07:00
voussoir
9eb9220ca9
Read and write the config file as UTF-8.
2018-08-11 17:57:19 -07:00
voussoir
fb052a2d56
Fix Album.add_associated_directory not letting duplicates.
...
The docstring and the actual code were disagreeing.
2018-07-29 16:30:30 -07:00
voussoir
30e3aa9c6f
Simplify and improve rollback logic.
2018-07-29 16:28:57 -07:00
voussoir
30d96139c2
Remove commit param from PDB.sql_* methods nobody was using.
...
And is better left to the caller anyway.
2018-07-29 16:05:49 -07:00
voussoir
9328600355
Add message parameter to PDB.savepoint for better logging.
...
Helps to have a visual on which methods are creating the saves.
2018-07-29 16:03:04 -07:00
voussoir
56e7472c93
Revert f-strings to %s for logging calls.
...
In my excitement I forgot about that rule.
2018-07-29 16:01:26 -07:00
voussoir
f047235c48
Reorganize a bunch of javascript handlers.
...
The javascript is very inconsistent between pages. I'm trying to
start using a consistent pattern where the api call is kept in a
separate function from the ones that buttons and input boxes
talk to.
2018-07-29 01:25:53 -07:00
voussoir
b314d6376f
Update the hrefs when saving the bookmark editor.
2018-07-29 00:43:12 -07:00
voussoir
fd23b563cf
Implement bookmark delete on frontend.
2018-07-29 00:36:50 -07:00
voussoir
8447fb3343
Make deleting and unlinking tags require confirmation.
...
Added text inside the delete buttons and made them confirm.
2018-07-28 20:25:25 -07:00
voussoir
fd6943fce1
Add code for creating buttions with confirmation prompts.
2018-07-28 20:21:20 -07:00
voussoir
949f7177de
Add css class gray_button, for more neutral / cancel actions.
...
Red seems too aggressive and indicates danger when not appropriate.
Gray seems better for reverting to an already safe state.
2018-07-28 20:18:10 -07:00
voussoir
6cb545af8b
Fix incorrect error message when deleting invalid synonym.
...
Because P_tag was raising 404 with "no such tag" when
we know it should have been "no such synonym".
2018-07-28 19:14:02 -07:00
voussoir
22d2efa289
Add 'event' to toggle_hoverzoom header for firefox's benefit.
2018-07-28 16:16:16 -07:00
voussoir
dfff79baa7
Oops, fix broken clipboard reference due to namespace change.
2018-07-28 16:15:15 -07:00
voussoir
89850497da
Apply the squared 3d button css to all <button>.
2018-07-28 16:04:57 -07:00
voussoir
9c354249c9
Rename variable editor -> ed to avoid conflicting with the module.
...
Even in cases that were not causing problems, for consistency.
2018-07-28 15:17:18 -07:00
voussoir
1b90850818
Oops, add the required_feature decorators to remove_child.
2018-07-22 21:06:16 -07:00
voussoir
977b47522d
Add autocomplete to /clipboard.
2018-07-22 20:45:16 -07:00
voussoir
2a45f4e17e
Add parameter albums to purge_empty_albums as starting set.
...
Like purge_deleted_files, you can provide a list of albums to
act as the starting point instead of letting it use the default
of all albums.
2018-07-22 20:21:00 -07:00
voussoir
c840845c7d
Add namespacing to albums.js.
2018-07-22 20:21:00 -07:00
voussoir
1bff642ca7
Add namespacing to hotkeys.js.
2018-07-22 20:21:00 -07:00
voussoir
63a3ecfa88
Add namespacing to editor.js.
2018-07-22 20:21:00 -07:00
voussoir
d7b9020585
Add namespacing to photoclipboard.js.
2018-07-22 20:21:00 -07:00
voussoir
c7cce5a4e5
Add namespacing to common.js.
2018-07-22 20:21:00 -07:00
voussoir
cf9b6d0725
Workaround autocomplete box sticking around after submitting.
2018-07-22 20:20:54 -07:00
voussoir
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
voussoir
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
voussoir
bbf07f4401
Fix image thumbnail wrong variable bug.
...
How long has that been there?
2018-07-22 20:19:05 -07:00
voussoir
5ac3a8a121
Add caching.cached_endpoint decorator for 304'ing any url.
2018-07-22 20:19:05 -07:00
voussoir
d740e6d686
Oops, fix read_filebytes not stopping at the range_max properly.
2018-07-22 20:18:58 -07:00
voussoir
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
voussoir
c2cfa99752
Alphabetize imports in endpoints files.
2018-07-18 18:37:21 -07:00
voussoir
4987db4bd0
Switch to f-string formatting in many places.
2018-07-18 18:36:36 -07:00
voussoir
4a39873fed
Increase default tag cache to 10,000.
2018-07-18 18:27:18 -07:00
voussoir
38bac41eb9
Add helpers.split_easybake_string for prelim parsing.
...
Helps to remove some distractions from the main easybake method.
2018-07-15 14:23:43 -07:00
voussoir
f06b0915ab
Add new_photo_kwargs to the create_or_get call.
...
Due to the closure, it was already working just fine, but I
want the explicitness of having it there.
2018-07-15 13:52:08 -07:00
voussoir
57a9e0d4dc
Move PDB.close out of the sqlmixin, into main class.
...
Doesn't really deserve to be with the sql stuff.
2018-07-15 13:27:04 -07:00
voussoir
5c97086df3
Improve hotkey framework by making own file & register function.
2018-07-14 14:19:13 -07:00