641 Commits

Author SHA1 Message Date
b4302fe467 feat: Add support for YYYY-MM-DD in the YAML frontmatter
Fixes #972

This required regenerating the protobufs generated files, which seem to
have tons of extra changes, and needed some manual changes to get them
to compile.

Overall, the entire protobuf idea wasn't the best in retrospect, and in
the next version of GitJournal, I'll be going with a simple relational
database instead.
2024-08-24 23:05:09 +02:00
2c4dcd24c4 chore: Avoid deleting the folder onDelete
It's already being deleted by go-git.
2024-08-18 20:11:57 +02:00
3dce1cb122 Upgrade sdk version
This way we can use the new Dart 3 features.
2023-12-22 21:23:45 +01:00
b4285b0512 Use go-git instead of libgit2 for git remote operations
We still need the git_bindings package as we're using it for generating
RSA keys.
2023-12-13 14:14:57 +01:00
51420f6c8d fix issue #579 -- this commit replaces PR #625
This commit was already in PR #625 but this new one is based on a more
recent version of the master branch.

As discussed in https://github.com/GitJournal/GitJournal/pull/625 the
problem was that if there is no yaml header, the title does not get
stored anywhere and hence gets lost. The fix is to write the title back
to the file as a first heading. This is used for loading the title
anyway, afaict.

The side effect is of course that any *other* application using the note
in the meantime will see the heading containing the note title. This is
way less disruptive than losing the title fully, though.
2023-12-12 20:14:01 +01:00
29fd576109 Avoid using git_bindings except for clone/pull/push/ls-remote
Lets use dart-git instead. It seems stable enough, and I'm soon going to
be moving away from libgit2 to go-git anyway. This is the first step towards
that.
2023-12-12 19:59:54 +01:00
7fd1c99287 Use Provider's context.read/watch
Instead of the legacy Provider.of. Less scope of bugs this way and the
code is so much nicer to read.
2023-12-06 08:20:40 +01:00
80cbb05059 Always use dart-git for merges
I'm going to be moving away from libgit2 for the next release, and while
my own dart-git's merging is quite bad in comparison to libgit2, it's
the only way to move forward without libgit2.

The cross-compilation and all is too much of a pain for me to continue
using it. I haven't had an iOS release in over a year because of it.
Plus it sucks all the fun out this project.

Fixes #934
2023-12-06 06:51:38 +01:00
88d5cf8713 Upgrade deps + flutter
* Also remove dart_code_metrics
2023-11-25 00:51:25 +01:00
657721adc6 Update dart-git and stop using the Result class
Instead we're going to move back to standard exceptions.

Using a custom Result class has created far far more problems
- The Stacktraces aren't always right
- Sometimes one forgets to check the Result error
- All other exception throwing code needing to be converted to Results
- Non idiomatic Dart code

I think it's better to just go back to exceptions. They have their
problems, but overall, I think it's a better approach.
2023-11-24 14:03:30 +01:00
1d3d7de583 Remove Experimental GraphView
I haven't made any progress in it over 1.5 years now. It's clear that
I'm not going to.

GitJournal is already way too big, and it doesn't have space for
features which I don't personally use.
2023-02-21 16:08:21 +01:00
a192ae04df Fix Sorting string
Fixes #903

This broke while migrating from easy_translate to the standardized
Flutter translation mechanism.
2023-02-21 15:09:07 +01:00
e9b6a234e1 Remove unncessary asserts
Or atleast they don't seem necessary. I don't get the problem with a
path starting with a /

Past me should have written better documentation.
2023-02-16 13:50:51 +01:00
9400c701bc Fixed bug where commit message for move had the source path for the destination path 2023-02-16 13:26:12 +01:00
532b51722b KebabCase: Always use kebab case
We were earlier only using kebab case when a title was given.

Fixes #654
2023-01-20 16:39:52 +01:00
ca98da4029 Update deps and fix linting issues 2023-01-20 16:14:08 +01:00
d164562b54 Make sure the rootFolder says "Root Folder"
Instead of some empty text
2023-01-20 12:52:06 +01:00
756465c76f Handle a few more cases of easy_localization
We are almost done
2022-11-27 19:02:32 +01:00
9425f11685 Map a lot of the settings translation strings to enums
This is a lot of boilerplate, but overall its less than what was there
previously. And if I didn't care about preserving the settings, I could
simplify it a lot more.
2022-11-27 18:55:39 +01:00
6d453ee62a Rename app_localization_context to l10n
It's easier to enter and this file now contains far more things
2022-11-27 17:52:03 +01:00
6f2ce4a6b5 Port more uses of LocaleKeys to new translation system 2022-11-27 17:42:26 +01:00
9a14048bf6 License change some files
Any files with external contributions need to be Apache2 licensed, since
I don't have any CLA, and need to release this on the ios store where
*GPL apps are a problem.
2022-09-01 16:34:47 +02:00
ae9228f65e Use super.key
Makes the code a bit more readable.
2022-08-25 11:32:25 +02:00
63e05c3212 Add Unix timestamp magnitude option
This allows switching the precision of Unix timestamps in YAML
frontmatter between second (the current beahaviour) and millisecond
(compatible with Dendron) precision.
2022-07-21 13:51:55 +02:00
dbb86cba99 Add created and modified date format options
Two values:

- Unix Timestamp is a numeric timestamp value, currently always
  expressed in seconds.
- ISO 8601 follows the ISO 8601 format.
2022-07-21 13:51:55 +02:00
94e89f3057 Rename { => NoteSerialization }DateFormat 2022-07-21 13:51:55 +02:00
cb29f926b4 Fix kebab case 2022-06-22 13:11:50 +02:00
014cc90438 Add kebab-case
Fixes #636
2022-06-10 11:46:59 +02:00
b177c10755 Add an automated test for creating a new note with extra metadata
It works. Weird.

Related to #634
2022-06-10 11:36:43 +02:00
e5c49f1792 bugfix: Always launch urls in an external application 2022-06-04 13:39:40 +02:00
be7fe8a407 Fix linting issues 2022-05-16 12:35:38 +02:00
d169fffe2c Fix reuse licensing 2022-05-16 12:23:51 +02:00
92e73c414d Move core Note classes into a separate file
I'm trying to get ride of this huge 'Note' class, and have it be quite
dumb. The idea is that we'll have separate Note subclasses - TxtNote,
MdNote, etc
2022-04-24 13:09:14 +02:00
85f51a5bfe Fix assertion error in metadata screen (#619)
Reason for changes

In debug/dev mode it is impossible to enter metadata edition
screen since it results in an assertion error. The production
flavour doesn't have this problem, because asserts are removed.
The error is caused by empty repo and file paths that in the Note
constructor inserted by metadata screen build method. This screen
needs a note just to show effects of a user configuration.

What changed?

I added a new factory method to File in order to avoid assertion
checks.
2022-03-30 13:08:22 +02:00
999ab13b79 Fix changes detection #615 (#618)
What changed?

Notes' properties are now compared using Map interface
and not IMap. IMap is incorrectly handled by DeepCollectionEquality,
which causes equal lists (for example of tags) to be marked as unequal.
2022-03-24 20:50:32 +01:00
39f0ce5d1b Fix avoid-ignoring-return-values 2022-03-18 16:46:15 +01:00
ea221941e0 Fix renaming a note test 2022-02-28 14:02:59 +01:00
ae09b1ba12 Add unawaited or explicitly wait
There are still many cases (over 60) to fix.
2022-02-23 15:15:49 +01:00
203cc7be57 Remove useless code 2022-02-02 02:05:28 +04:00
5d48229736 use IMap instead of ListMap 2022-02-02 01:51:02 +04:00
0a085e78e7 MdYamlDoc: Make it immutable 2022-01-27 15:17:56 +01:00
dca9064b80 NoteEditor: Ensure only state variables are modified in setState
I'm trying to use the convention where all internal variables start with
an _
2022-01-27 12:22:43 +01:00
afd7690611 Use fast_immutable_collections instead of Kt
It's much more intuitive to use, and is way more performant.
2022-01-27 12:13:34 +01:00
3841cdcab9 Note.tags: Use an compile time immutable set 2022-01-27 11:52:43 +01:00
c56da852b6 Add more specialized snackbox functions
It's easier to control how the errors look this way.
2022-01-27 10:26:23 +01:00
dd88bf2cb7 Repo.createFolder: Allow it to fail 2022-01-26 12:01:47 +01:00
6eaae014da NotesFolderFS: Simplify
Avoid passing the FileStorage since the parent already has it
2022-01-26 12:01:47 +01:00
c9a031dd29 moveNote: Add test + fix
Fixes #590
2022-01-26 12:01:47 +01:00
65e111d89e Image: Catch more errors 2022-01-26 10:43:08 +01:00
3a4606b836 Image: Handle FS exceptions 2022-01-25 14:23:37 +01:00