122 Commits

Author SHA1 Message Date
2e0a3cfd6a chore: Moving folder_listing to bloc
First implementation of a screen using bloc. I'd like to slowly move all
the screens to bloc.
2024-08-18 20:12:26 +02:00
a7654fb724 feat: Add a button to export the repo as a zip
This is supposed to create a zip of all the files in the repo, and its
.git folder. It's super useful for debugging the state of the repo, and
it's also useful when the remote is down but you still have changes
which you want to export.
2024-08-17 01:07:38 +02: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
833dcd3294 Improve code readability 2023-12-06 08:20:40 +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
a3b81c4c64 Fixed bug for single journal per day where it would open a non-journal entry created on that day 2023-02-16 13:25:33 +01:00
ca98da4029 Update deps and fix linting issues 2023-01-20 16:14:08 +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
b925da7a47 Use the generated localization instead of easy_localization
Not everywhere, but a large part of the code base.

This way, hot reloading will also reload the strings which makes for
such a better developer experience.
2022-11-19 03:02:01 +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
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
271284b7fe Move api tests to git_setup 2022-06-26 15:25:20 +02:00
a322879077 make fmt 2022-06-26 15:15:11 +02:00
f6c9dcc7cb Move the Github/GitLab APIs to git_setup
Only used for the setup.
2022-06-26 15:13:59 +02:00
dee2374aef Fix assert 2022-06-22 13:20:40 +02:00
6aa62090a9 Use a standard git clone when there is no history
Clearly dart-git is still quite buggy. Lets go back to libgit2, this was
quite a big mistake.
2022-05-16 12:08:15 +02:00
fd2a49ba6f Fix flutter analyze errors 2022-04-22 13:21:10 +02:00
396f71a348 GitDesktop: Skip the 'ssh -i ...' if no private key is present
This happens in the case of the tests
2022-03-02 19:41:21 +01:00
dd6b08a5a6 clone: Improve error message 2022-02-06 19:45:49 +05:30
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
901e4b5cb9 Avoid importing dart_git's Result class
It's easier to see where all dart_git is used this way, and this result
class should be refactored into its own package anyway.
2022-01-22 10:11:45 +01:00
b85a42340d Rename file 2022-01-22 10:03:48 +01:00
0488714e89 Refactor note file naming logic
I want to make the note class immutable, and the file path naming logic
is the toughest part.
2022-01-14 12:55:27 +01:00
e2b6d94eda analyzer: Fix unnecessry includes 2022-01-13 19:03:16 +01:00
f9271edad3 Upgrade to latest dart-git
Most of dart-git's operations are synchronous by default now. The async
functions run on another isolate.
2022-01-13 18:14:01 +01:00
70675540b0 Cache File Saving: Catch the exceptions 2021-12-29 12:02:51 +01:00
9d70d53e35 Never just hang on loading
This would happen if the current repo couldn't be opened.

We now show a special "Error Screen", and allow the user to add another
repo.
2021-12-16 13:05:02 +01:00
7a92d10df9 avoid-ignoring-return-values++ 2021-12-14 14:02:09 +01:00
566e27d4d6 Handle different timezones better 2021-12-10 17:05:50 +01:00
ccf571cbe9 NotesCache: Store the entire note
This way the disk barely needs to be accessed when loading GitJournal,
and we can hide how long it takes GitJournal to parse all the notes in
the background.
2021-12-09 20:04:08 +01:00
e5eb8c1576 lint: avoid-ignoring-return-values++ 2021-11-17 18:10:59 +01:00
51b60aacf8 Settings: Improve Version tile 2021-10-27 10:36:46 +02:00
e1ea7a4953 Fetch the modified + created time from git
Fixes #78

This is probably the largest commit that I have ever made. From now on -
every File always has an mtime and ctime which is fetched from git.
Notes can optionally override that time by providing yaml metadata.

Additionally the 'filePath' and 'folderPath' is now relative to the
repoPath instead of being the full path.

This will slow down GitJournal like crazy as all the mtimes and ctime
still need to be cached. For my test repo it takes about 23 seconds for
GitJournal to become responsive.
2021-10-26 17:49:08 +02:00
7f9beb0d5c NoteFileTypes: Hook up selector to the settings 2021-10-15 17:33:19 +02:00
6a915864f2 Move NotesFolder's code to their own folder
The 'core' folder is becoming way too huge.
2021-10-15 12:31:35 +02:00
e1464f32c8 Change print to Log
Lets avoid using print as that doesn't get saved.
2021-10-13 11:36:05 +02:00
c4ef1f569b Use flutter_lint
Instead of picking lint values. This way I don't need to routinely
looking at extra lints to enable.
2021-09-21 15:42:13 +02:00
33a731a3d7 Add reuse licensing to files in lib 2021-09-15 13:06:43 +02:00
cfaf1436f1 Move the MarkdownYamlCodec out of the Note class 2021-09-09 10:08:38 +02:00
5ca0a78687 Get the default branch properly on the desktop
Fixes #528
2021-09-07 10:38:05 +02:00
910088a5b4 LocaleKeys++ 2021-08-26 23:09:39 +02:00
01934bc504 Desktop: Enable fetch/push on linux 2021-08-24 17:25:13 +02:00
6ae11d386d Analytics: Move settings into Analytics
Lots of code cleanups as well
2021-08-16 13:23:26 +02:00
e90233d45c Update modified/created as unix timestamp if already in that format
Related to #349
2021-08-10 10:57:31 +02:00
c81e539a76 StripMarkdownFormatting: Only consider '* ' as lists
If we let the space be optional then this picks up bold/italics as well.
Ideally, the stripMarkdown formatting could be made smarter, but I would
prefer to just rid of it in the future, and use the proper markdown
parser.

The only thing that is stopping me right now is performance. So in the
future when the stripped version is cached, this should be fine.

Fixes #420
2021-08-02 11:12:54 +02:00
3a71cca202 Move logging code to its own folder 2021-07-30 14:39:13 +02:00
2505d00dfb Replace dart:io with universal_io
Platform from dart:io cannot be used on the web for reasons. And this
way we get a fake File/Directory class which we can use for atleast
running the web version, even if it won't work.
2021-07-30 11:39:26 +02:00
07763226df Stop using deprecated packages 2021-07-29 14:39:23 +02:00
3da73a15cd Desktop: Detect no default branch 2021-07-25 11:44:49 +02:00
44666ea6f2 git desktop: Fix permissions on the key 2021-07-23 15:18:25 +02:00