Commit graph

1387 commits

Author SHA1 Message Date
961ece0081 digest_directory excludes extend defaults instead of overriding them.
With this change, there is currently no way to specify that I actually
want to include thumbs.db etc, but I think the likelikhood of wanting
to extend the defaults greatly exceeds wanting to overrid them.
2020-02-27 14:17:30 -08:00
30a0715980 Add photo delete buttons to hovering toolbox.
I tried putting them in the #left but it was looking seriously ugly.
Actually #left is always ugly because the variety of info and buttons
and text alignments. Hover toolbox is not ideal and I don't want it
to become a dumping ground, but deleting should be a rare action and I
don't want it right next to stuff like the basic metadata.
2020-02-27 14:15:13 -08:00
45cb96cc5c Add endpoint /photo/photo_id/delete. 2020-02-26 18:57:29 -08:00
a88fcc2092 Move the clipboard checkbox into metadata list too. 2020-02-26 18:41:17 -08:00
66f73a6aab Move the photo filename out of list to top of left. 2020-02-26 18:40:03 -08:00
596eb86f6e Move the refresh metadata button into metadata bullet list. 2020-02-26 18:39:19 -08:00
02db1f3971 Make response_type required, explicit in all calls. 2020-02-26 17:50:36 -08:00
9d620b4b97 Remove unused imports & other small things. 2020-02-20 22:44:56 -08:00
b846be75b0 Stop pretending that there are tests. 2020-02-20 21:51:06 -08:00
ca8c642add Add "Are you sure you want to quit" to erepl. 2020-02-20 18:57:08 -08:00
4a193d228c Add commit=True to frontend where necessary. 2020-02-20 00:34:28 -08:00
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
1fc2ed09f5 Remove commit argument from ALL methods. @transaction does it. 2020-02-19 23:56:09 -08:00
0a984117c5 Add rollback queue, like commit queue. 2020-02-19 23:46:30 -08:00
8c854f3b6a Improve this comment about Photo rename logic. 2020-02-19 23:22:08 -08:00
f99d3d03d9 Photo.rename new_path.assert_not_exists. 2020-02-19 23:12:29 -08:00
00a443eec3 Always use the commit queue, don't bypass with commit=True. 2020-02-19 23:12:11 -08:00
7f3602d673 Remove @transaction from mixin methods, apply it to object methods. 2020-02-19 23:10:49 -08:00
953a85c998 Delete method Tag.leave_group, leftover from 1-parent days. 2020-02-19 23:05:55 -08:00
8c797024e0 Remove calls to pdb.commit(). Let @transaction do it. 2020-02-19 22:58:21 -08:00
203fb9e00f @transaction intercept commit argument; commit / release here. 2020-02-19 22:36:00 -08:00
04f3f6f297 Remove commit=False from all method calls, it's default now. 2020-02-19 22:20:21 -08:00
3a9d7fc2dc Set default commit=False for ALL methods.
I'm working on tightening up some of the transaction code. In the
past it was default commit=True because I would launch the repl, do
something, and quit, so it was nice to have auto commit. But really
it makes more sense to have it default False and be explicit when
to commit.
2020-02-19 20:08:24 -08:00
108ba8bd95 Add PDB.release_savepoint. 2020-02-19 17:00:08 -08:00
bcd13b9ae4 Make the commit queue task popping a little more clear. 2020-02-19 16:26:23 -08:00
e7c90faf79 PhotoDB.rollback without savepoint should roll all, like real sql.
In sqlite3, rollback without a savepoint undoes the entire pending
transaction stack, whereas I was just popping the last save.
This change makes it match real sqlite. Also the only current call
for rollback is in the @transaction decorator which is already
explicit.
2020-02-19 16:26:02 -08:00
9e0051ca9c Photo.move_file assert new path doesn't exist yet. 2020-02-19 16:23:31 -08:00
1375d9fb26 Fix new_photo, data[extension] to use new pathclass.Extension. 2020-02-19 15:11:52 -08:00
5da8d793d6 Return this None instead of assigning then returning. 2020-02-19 14:06:53 -08:00
e25c6e8697 Use code.interact instead of py -i. 2020-02-19 13:15:03 -08:00
31517a41d2 Add missing period on exception message. 2020-02-19 13:11:57 -08:00
851ab2d4cc main should return the args.func(args) value. 2020-02-08 17:24:57 -08:00
92f3569971 Use of extract_table_column_map has moved to sqlhelpers. 2020-02-07 15:15:49 -08:00
b88d577ddd Use voussoirkit.imagetools for fit_into_bounds function. 2020-02-04 19:35:46 -08:00
25ed427272 Wrap DB_INIT in a transaction. 2020-02-04 18:43:30 -08:00
d6d7521bce Assert table exists for any sql op involving argument tables.
At the moment, all of these functions are safe because they're
called with hardcoded tables determined by other code, not user input.
But while I was working in this area I felt it would be good to add
a safety check just in case.
2020-02-04 18:15:14 -08:00
64f9eb5f2b Replace some % formatting with fstrings. 2020-02-04 18:12:41 -08:00
4da331a3ab Fix entry_with_replacements unable to select text.
This hook had a bug where you couldn't select text because every
time you push a button, including ctrl+a or shift+left/right, the
cursor position gets reset and then deselects immediately.

So let's only reset the content and cursor only when text changes,
so arrow keys and ctrl don't have any negative effects.
2020-01-30 12:28:28 -08:00
eff0efdf40 Indicate required feature in exception message. 2020-01-29 23:52:25 -08:00
77be61f4c6 Update What Am I Looking At with more detail. 2020-01-29 23:09:44 -08:00
2ffe3940e6 Update OutOfDate message to show actual argument. 2020-01-28 10:52:19 -08:00
93eb693bee Separate version_pragma from other pragmas!
This was a dumb bug. Because the version was included in the pragmas
that get set on every load, the database was receiving the new
user_version simply by setting skip_version_check=False and letting
the regular pragmas load, so all future checks passed without
having to run the db upgrader.
2020-01-27 20:46:32 -08:00
222d63857e Replace which with winwhich. 2020-01-21 23:50:11 -08:00
317b03dd9f Add etiquette_logo.svg and etiquette_logo_full.svg. 2020-01-19 10:59:57 -08:00
10b674e8d8 Add entry_with_tagname_replacements for use on tagname inputs.
Unfortunately, when adjusting the box's value, it causes the datalist
to disappear, and it only comes back after you press another key.
I can't figure out how to make the datalist reappear automatically
with js.
2020-01-15 20:29:56 -08:00
53888a1787 Fix #photoviewer <a> from being expanded to fill the whole pane. 2020-01-15 20:18:40 -08:00
56e34bd245 Rename vars box, button -> add_tag_textbox, add_tag_button. 2020-01-15 18:48:12 -08:00
fa7f5b7b17 Don't use (+) for the syns anymore, looks like the must button. 2020-01-15 18:12:12 -08:00
cdf6ee2038 Use <span> for tag objects with no link or onclick.
To suppress the pointy <a> tags, you know.
2020-01-15 18:11:48 -08:00
b22516cf01 Remove the 'void' option from tag_object link.
Now that all <a> tags are pointy, there is no need for this fake link.
Its only purpose was to make <a>s that had an onclick but no
url get the ol' pointy.
2020-01-14 23:12:43 -08:00