Kovid Goyal
1fb3b9ea28
Sanitize filenames for notes resources
2023-11-13 19:21:31 +05:30
Kovid Goyal
fa83be4192
unretiring notes should not duplicate item value at the top of the searchable text
2023-11-13 19:21:30 +05:30
Charles Haley
ba2de90d00
First try at the template functions for notes.
2023-11-13 19:21:30 +05:30
Kovid Goyal
e6e5f0fe9f
Make loading of notes resources in HTMLDisplay opt-in
...
HTMLDisplay is a generic class so its not appropriate for it
to try to load notes resources everywhere.
2023-11-13 19:21:30 +05:30
Charles Haley
2856922aeb
Add fetching calres: resources to HTMLDisplay. This permits a copy of a note in a composite column to display properly.
2023-11-13 19:21:30 +05:30
Kovid Goyal
b0766d7a62
Track creation and modified timestamps for notes
2023-11-13 19:21:30 +05:30
Kovid Goyal
652fb651cb
Remove retired entry when setting a note value
...
Useful since the number of reired entries is capped, no need to use up
one slot for a note that has a value set
2023-11-13 19:21:30 +05:30
Kovid Goyal
07a77403a8
Fix retiring a note with a resource throwing an error if a version of the note with the same resource is already retired
2023-11-13 19:21:30 +05:30
Charles Haley
b9dcc6ee85
Add the undo button. Clean up some code.
2023-11-13 19:21:30 +05:30
Charles Haley
36f65e9187
Some refactoring and improvements:
...
1) Add a context menu to the notes widget. Remove the keyboard handler as it isn't needed.
2) Allow passing an item string value instead of an item_id to __init__
3) Make the notes widget self contained, making the signal advisory instead of mandatory
4) Add a delete note button to the widget.
2023-11-13 19:21:30 +05:30
Kovid Goyal
8e8f038896
Add API to get all data associated with a note including searchable_text
2023-11-13 19:21:30 +05:30
Charles Haley
50019962b1
Edit Authors dialog
2023-11-13 19:21:30 +05:30
Charles Haley
a240ef62ec
Add editing notes to manage categories, and to the context menu of the tag browser.
...
Still to do: adding notes to manage authors.
2023-11-13 19:21:30 +05:30
Charles Haley
c11c051309
Fix set_note updating all notes when one is changed.
2023-11-13 19:21:30 +05:30
Kovid Goyal
3b37b5270a
Implement removal of images by right clicking on them
2023-11-13 19:21:30 +05:30
Kovid Goyal
f0cacfdf44
Dont bother implementing browse_existing
...
It's painful to implement in a performant way and not too useful
2023-11-13 19:21:30 +05:30
Kovid Goyal
9250613998
Ensure searchable_text and references_resources exist
2023-11-13 19:21:29 +05:30
Kovid Goyal
99478d5209
Implement commit of edited note to db
2023-11-13 19:21:29 +05:30
Kovid Goyal
29435392c6
Also implement caching of images for the comments editor
2023-11-13 19:21:29 +05:30
Kovid Goyal
d540c6db88
Properly cache image resources
...
Also use a unique name per image placement
2023-11-13 19:21:29 +05:30
Kovid Goyal
5082280c0e
Fix extra qpainter end() call
2023-11-13 19:21:29 +05:30
Kovid Goyal
705c174271
Better handling of image alignment change on right click
2023-11-13 19:21:29 +05:30
Kovid Goyal
9240af7d40
allow changing image alignment for floating images as well
2023-11-13 19:21:29 +05:30
Kovid Goyal
0be966db4a
Draw a border for the image preview widget even when empty
2023-11-13 19:21:29 +05:30
Kovid Goyal
e26df3b529
Allow right click to adjust image alignment
2023-11-13 19:21:29 +05:30
Kovid Goyal
6a3d7388d7
Get basic image insertion working
2023-11-13 19:21:29 +05:30
Kovid Goyal
54c43bc7ef
When doing FTS on notes also match on item values
2023-11-13 19:21:29 +05:30
Kovid Goyal
00936dbafb
Future proof backing up of resource metadata
...
Store the metadata as json instead of plain text so we can add more
fields if needed in the future.
2023-11-13 19:21:29 +05:30
Kovid Goyal
d120efdced
Implement link insertion
2023-11-13 19:21:29 +05:30
Kovid Goyal
a52f03fa5c
More work on note editing UI
2023-11-13 19:21:29 +05:30
Kovid Goyal
bf723cd34d
Start on GUI for editing notes
2023-11-13 19:21:29 +05:30
Kovid Goyal
d7c88aaf01
Increase wait time for restore test
2023-11-13 19:21:28 +05:30
Kovid Goyal
fe4292c3cc
Implement database rebuild for notes data
2023-11-13 19:21:28 +05:30
Kovid Goyal
6017bafe48
Use hashes as primary key for resources
...
This will allow rebuild of database as the backup documents will refer
to resource hashes not ids (its very difficult to restore resources with
ids unchanged). Also this allows docs to be migrated between databases
easily.
2023-11-13 19:21:28 +05:30
Kovid Goyal
713f1af61e
Implement vacuuming for notes db
2023-11-13 19:21:28 +05:30
Kovid Goyal
bdcd3b6203
Handle reopen in the notes backend
...
Also dont use colons in filenames as they cause problems on windows
2023-11-13 19:21:28 +05:30
Kovid Goyal
08116c8c88
See if explicitly closing importers fixes CI failure on windows
2023-11-13 19:21:28 +05:30
Kovid Goyal
611356ddb0
Bloody windows and its insane file semantics
2023-11-13 19:21:28 +05:30
Kovid Goyal
5d67c74add
Implement ex/im for notes
2023-11-13 19:21:28 +05:30
Kovid Goyal
cfadc5fc4d
...
2023-11-13 19:21:28 +05:30
Kovid Goyal
bff37a8054
Delete notes when deleting a custom column
...
Also change the data dir name
2023-11-13 19:21:28 +05:30
Kovid Goyal
4d7f5b18d1
Implement FTS API for notes
2023-11-13 19:21:28 +05:30
Kovid Goyal
a0b9a799d9
custom ratings tables should not support notes
2023-11-13 19:21:28 +05:30
Kovid Goyal
53bfdd6ecf
Implement unretiring of notes when setting values
2023-11-13 19:21:28 +05:30
Kovid Goyal
1ae94801e6
Implement retiring of notes when setting a field on a book causes an item to be deleted
2023-11-13 19:21:28 +05:30
Kovid Goyal
45f7599eee
...
2023-11-13 19:21:28 +05:30
Kovid Goyal
0bd1137fa1
Implement retiring of notes
2023-11-13 19:21:28 +05:30
Kovid Goyal
35b7bd3fe8
Store a name for every resource
2023-11-13 19:21:27 +05:30
Kovid Goyal
0b18f30392
Add more tests for the notes API
2023-11-13 19:21:27 +05:30
Kovid Goyal
3aee660656
More work on notes
2023-11-13 19:21:27 +05:30