210 Commits

Author SHA1 Message Date
267ecb7499 Implement a very basic file system view
This will show all the files and not just the "notes". This way the user
can easily figure out why a file isn't included in the list of notes.

It's currently disabled by default as it clearly needs a lot more work.
2020-06-10 00:54:15 +02:00
9ba0bc831c Catch possible exceptions when creating the fileName
This can apparently happen, and we should have a fallback. Additionally
Dart has both an 'Error' and an 'Exception' which are two different
things. This makes no sense.
2020-06-09 18:09:17 +02:00
67c2777d9b Parse links in wiki syntax [[term]]
This way we can use this faster syntax which is also supported by
Obsidian.
2020-06-08 00:52:03 +02:00
702366671a Move Link to its own file 2020-06-08 00:35:55 +02:00
e6be9aa228 Ensure new notes always have a proper file ending 2020-06-06 12:31:24 +02:00
7d9cd6e63a DocLoader: Ensure the isolate has been properly started
It seems that sometimes _sendPort is null. I'm not sure why. In those
cases lets try to reinitialize the isolate.

Fixes APP-2W
2020-06-04 15:46:51 +02:00
e0815c664d FlattenedNotesFolder: Always remove the note if present
In the FlattenedNotesFolder we can have a filter to only show certain
notes. This is used for showing notes that match some tags. When the
note is added to this virtual folder it matches the tag, but later it
does not.
2020-06-04 14:21:58 +02:00
2dbc2dda77 Add support for filenames based on Uuid 2020-06-04 02:12:13 +02:00
42d6386096 Add basic txt file support
With this 'txt' files are now read and written. However, they don't have
any metadata so they don't show up correctly in the sort order and
currently the Markdown Editor is still available for them.

Related to #55
2020-06-02 00:15:18 +02:00
fb5ab57fe0 Folder.removeFolder: Remove listeners recursively
Ideally when removing a folder one shouldn't have any notes, but
sometimes we do allow an entire folder to be reset.

Related to #36
2020-05-31 03:38:24 +02:00
5788a2bde0 FlattenedNotesFolder: Propogate renames 2020-05-31 03:08:49 +02:00
b9b53f28c4 Log some exceptions are warnings
These aren't really a problem, but it's still interesting to know if
they are happening.
2020-05-31 02:00:00 +02:00
d665981182 Allow Git remote host to be reset
This is quick and dirty way of fixing the problem. It doesn't migrate
the notes from the previous repo and just discards them, so you cannot
move your notes from one repo to another using GitJournal (for now), but
at least its better than having to re-install the app.

Related to #36
2020-05-26 23:53:14 +02:00
18c93fbbb4 Note: Do not change the body if it hasn't been modified
I'm scared that for very large notes this won't be very fast, on the
other hand changing the body results in many other fields being
re-computed.
2020-05-26 18:07:24 +02:00
d3fb2b7119 Try to make the backlinks section prettier
I'm not totally convinced that it should be here.
2020-05-26 18:05:50 +02:00
4eeff093c1 Cache the Links in a note
This requires the markdown to be parsed which can be an incredibly slow
operation, so lets avoid re-doing it unless necessary.
2020-05-26 17:08:03 +02:00
96ed70f023 Show the backlinks of a Note
This is the initial proof of concept and doesn't look very pretty. It's
also not very efficient.

Related to #141
2020-05-26 15:37:09 +02:00
af69dd6e48 Note: Allow returning the links in the document
This isn't perfect as we aren't handling referenced links and maybe even
autolinks, but it's a start.

Related to #141
2020-05-26 14:50:23 +02:00
bcbf54106f Handle empty checklists
If there were no items we were ignoring the checklist. Added some extra
tests as well.

Fixes #148
2020-05-26 13:43:41 +02:00
4c56ddc4df Allow the default Image location to be configured
Fixes #10
2020-05-20 00:32:13 +02:00
26ed82fdbc Make "Root Folder" translatable
It was earlier duplicated all over the place.
2020-05-18 00:26:00 +02:00
816cb0c3ed Reduce code duplication
Avoid code for determining the publicName of a folder.
2020-05-18 00:23:14 +02:00
f4ad226341 NoteFileName Format: Move it to Folder Settings
This way each folder can have its own default file naming scheme.
2020-05-18 00:13:20 +02:00
a324d0f755 Logging: Allow logging structured fields
Display this in the Debug Screen app. Additionally, add a reason why a
file was not loaded.
2020-05-17 19:47:11 +02:00
87393ac588 NoteCache: Avoid duplicates
This should ideally never happen, but it seems to be occasionally happening
for some reason.
2020-05-14 16:59:03 +02:00
89deac3770 Note toString: Print loadState
Makes it easier to debug
2020-05-14 16:58:45 +02:00
db37bfbf81 Note: Not all files end with a '.md'
This was only supposed to be done for new files
2020-05-14 16:58:16 +02:00
5c04bf204e Add Tags sidebar
Fixes #114

This was there because I couldn't figure out how to configure Billing in
iOS, now that it is done, I can have the pro mode in iOS as well.
2020-05-14 16:09:22 +02:00
7ef9cfe60f Minor refactor 2020-05-14 13:03:12 +02:00
867f6df14c [Android] Implement sharing images to GitJournal
Fixes #38
2020-05-13 18:30:33 +02:00
132b3ddcb8 Sanitize the filename derived from the note's title
Not all characters are supported on all platforms. Additionally, we
don't want it to have the path seperator.

Fixes #132
2020-05-13 12:10:32 +02:00
31e3e8c806 Ensure Note's fileName always ends with a .md
We were missing it in some cases :(

Fixes #135
2020-05-13 12:03:04 +02:00
66eeaa552b Bump git_bindings and pass fresh version of gitAuthor/Email
This way the Settings change for git author is immediately reflected.

Fixes #130
2020-05-13 11:36:08 +02:00
2847e3f60f Add basic tag support
This allows you to be modify the tags from the NoteEditor. Related to
 #114. We still need to add some way to filter the notes by tag. Also,
the current tag editor doesn't show the tags from the other notes.
2020-05-13 01:01:40 +02:00
52fd859990 Note: Make tags a set instead of a list
This way we don't need to check for duplicates
2020-05-12 23:33:57 +02:00
59ab66844f Note: Allow tags to be read and serialized
This is just exposing the tags on the Note class. Not making it
available through any interface.
2020-05-12 22:59:45 +02:00
600738fc0e FolderLoading: Output loading info to logs as verbose
The most common issue is why a certain file is not being loaded. This
isn't the ideal way, but it's a quick fix in order to diagnose what is
going on.
2020-05-08 10:35:45 +02:00
b17c184900 Add very basic Image support [Android only]
This adds a '+' button to the NoteEditor which allows you to add an
image from either the Gallery or Take a photo. It then accordingly adds
updates markdown.

The file is added in the same directory as the note for now.

Related to #10
2020-05-05 12:02:36 +02:00
317f75799f Add Title + FileName sorting modes 2020-05-03 16:01:21 +02:00
793660e42f ChecklistEditor: Improve focus handling
It's still a bit of a mess. I seem to be hitting this bug -
https://github.com/flutter/flutter/issues/20706 which others are also
hitting, but it seems to be closed despite a clearly reproduce test
case.
2020-05-02 02:28:30 +02:00
70ec10b7bc Checklist Parser: Make it a bit more robust
Allow the space after `[ ]` to be optional. Just like in Github.
2020-05-01 18:44:38 +02:00
01db30c613 Automatically migrate from old checklist format
This way people existing checklists do not disappear
2020-05-01 18:42:18 +02:00
b919f1f2ba Follow GitHub's Checklist format
Fixes #71

It's easier to not use the Markdown parser and just go line by line and
do it myself. This does make it a bit less extensible though.
2020-05-01 18:28:13 +02:00
1bae5c7a19 Merge branch 'checklist_Format2' 2020-05-01 16:54:43 +02:00
64bfefa266 Do not allow DartGit's exception to escape
DartGit is still quite experimental.
2020-05-01 11:22:02 +02:00
8636021952 SyncButton: Show number of unpushed changes
Related to #123
2020-05-01 11:09:40 +02:00
a0247e7c9e Ignore a few more git exceptions 2020-04-23 10:08:22 +02:00
77e67fca11 Rename Folders properly
1. Actually rename the folder instead of calling rename with the oldPath
2. Inform the parentFolder that a sub-folder has been renamed so it can
accordingly update its mapping.

Fixes #108
2020-04-20 02:11:42 +02:00
5784399ac6 Remove NotesFolderFS::insert
The position of the note in the folder doesn't matter as Virtual folders
on top of this sort it according to how to how the user wants them to be
sorted.
2020-04-20 01:56:32 +02:00
ff2ac647c5 Remove unused imports 2020-04-17 10:33:31 +02:00