31 Commits

Author SHA1 Message Date
3aaa397021 Fix reseting the git host 2020-11-10 18:11:26 +01:00
9e71f3295c Fix unnecessary listen 2020-11-09 12:56:20 +01:00
7fc6847933 Remote Settings: Display the git host 2020-11-09 12:55:54 +01:00
a90541df59 resetGitHost: Save the new folder in the settings
Otherwise when we restart the app the old repo is still used.
2020-11-08 10:44:20 +01:00
43206219da Merge AppState into Repository
The 'AppState' was more of a Repository state, and it's easier if it
lives inside the Repository class.
2020-10-23 02:01:45 +02:00
770394a8f9 Rename StateContainer to Respository 2020-10-23 01:38:47 +02:00
35ed7f616e CustomKeys: Allow an ssh password to be provided
Fixes #227
2020-10-22 14:35:17 +02:00
e3a4844f0e GitRemoteSettings -> Let a custom SSH key be provided
Just like during the GitHost Setup.
2020-10-22 14:22:00 +02:00
018dd4ca36 Fix reset repo 2020-10-21 04:29:01 +02:00
98c92a3fe1 Handle new version of git_bindings
This changes the way the SSH keys are managed, they are no longer
managed by the git_bindings plugin and are instead just passed as
parameters. They are now saved in shared_prefs. This allows us to easily
have multiple ssh keys.

It also allows us to store the ssh keys in a more secure storage
location in the future.
2020-10-19 14:52:24 +02:00
09fdcc3012 Generate the SSH keys via Dart
The more dart code we use, the easier it will be to port to other
platforms.
2020-10-15 12:30:35 +02:00
540078c413 Improve repo migrations
Earlier we had one folder 'journal_local', when the remote would be
setup a new folder called 'journal' would be created, and each all the
files would be copied over. This meant the local history was being
destroyed.

Now, we only have 1 folder 'journal', and on 'cloning', we add the url
as a remote, and do a git fetch + merge.

This simplifies everything drastically, and opens the door for multiple
remotes.
2020-10-15 12:18:47 +02:00
dfbdb5c50c Fix flutter analyze 2020-09-28 00:49:59 +02:00
43269bbe53 Add lots of listen: false when using Provider
Provider version 4 has an assert which fires if used incorrectly.
2020-09-28 00:09:14 +02:00
4b3f1669f5 Stop caching the gitBaseDir
It makes the entire code base far more complicated and the round trip to
get the directory really isn't that much. This is a massive
micro-optimization for very little benefit.
2020-09-26 18:52:28 +02:00
fe08834259 Split Settings into AppSettings and Settings
This way I can eventually change Settings into RepoSettings without
breaking anything.
2020-09-25 00:33:54 +02:00
f30c52f595 Move all persistent state from AppState to Settings
This way all the persistant state of the app is managed from the same
place. It makes everything much easier. Also, it's required for when
GitJournal supports multiple repositories.
2020-09-24 23:45:37 +02:00
984fc6864e Make all remaining strings translatable 2020-09-08 23:01:39 +02:00
9d55b449d3 Settings: Access it through the Provider
Make it a ChageNotifier and try to access it through the Provider
instead of like a global variable. This way, the state is better
managed and it'll be easier to split out Settings into smaller classes.
2020-08-09 01:29:22 +02:00
9d00fdac06 Use import_sorter
flutter pub run import_sorter:main --no-comments

The code feels much cleaner
2020-07-24 12:43:28 +02:00
6e229aeebd Translate Git Remote Settings title/subtitle 2020-05-29 13:26:29 +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
b2d0cf44ab Stop using deprecated TextStyle properties 2020-05-08 10:55:00 +02:00
37909c84f8 Make sure widgets are mounted
Might solve some of the crashes
2020-04-10 12:12:17 +02:00
bb0e574495 Abstract out the logging
This way moving away from Fimber will be much easier.
2020-04-04 11:50:57 +02:00
4f02559849 Remove spaces from public key's comment
Apparently this breaks things in some systems

Fixes #87
2020-03-23 13:07:42 +01:00
f4c139a2b7 GitRemoteSettings: Pass the correct context
The scaffold doesn't exist in that context :(
2020-03-19 23:54:36 +01:00
98fb1ccff5 Move git host setup files to setup folder 2020-02-17 16:51:52 +01:00
fa21f6433b Typo in settings_git_remote.dart 2020-02-12 19:01:46 +01:00
e0f03d703e Allow remote sync frequency to be controller
For now the only 2 options are - automaitic and manual.

I rather name it "Automatic" instead of "After each change" as that way
I can choose to do it more frequently, if desired.

Fixes #8
2020-02-09 22:23:39 +01:00
e0afa27b06 Expose Git Remote Settings
This way you can regenerate the SSH Key (if needed) and/or copy it
again. In the future one can add methods to reconfigure the git remote
and add / remove remotes.
2020-01-04 15:31:28 +01:00