27 Commits

Author SHA1 Message Date
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
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
c8e3318bb9 HostSetup: Make all remaining strings translatable 2020-09-04 18:46:16 +02:00
7936cc70b8 Analytics: Make all events into enums
No more random strings
2020-08-17 15:29:38 +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
7226bc1c41 Setup: Reset state of some variables
That way if we go back and try to restart the previous errors are
cleared.
2020-06-09 17:08:42 +02:00
ee1009b087 Avoid hardcoding the git repo folder's name everywhere
This way, in the future we can support multiple repos, and more
importantly it will be easier to reconfigure the git host.
2020-05-26 23:49:57 +02:00
0d3648768c GitLab manual setup: Fix url
GitLab seems to have changed the url to add a deploy key manually.
2020-05-26 13:43:41 +02:00
b193b75254 Setup: Move generating ssh key + deploy key code out of widget
It's strange, but this widget routinely gets constructed twice. So
performing a long async operation (generating the ssh key + adding it as
a deploy key) from initState, results in it being called twice. I'm not
sure where the state is initialized twice.

Even adding a unique key to the widget did not help. In the end, I've
just moved the code to its parent widget.
2020-05-18 18:19:26 +02:00
5123938e53 Setup: Rename screen to Loading/Error screen
It's all that it does. This way we can re-use this screen in other
places.
2020-05-18 18:13:21 +02:00
ca934f79d5 CloneRepo: Avoid creating a .gitignore file if not required
It's easier if there is always at least 1 commit in a repo. Creating a
commit with a .gitignore file was a simple way to ensure that. However,
we can also just check for the presence of any other file. This way, we
avoid the extra commit.
2020-05-15 15:31:16 +02:00
18db4899b2 GitHostSetup: Allow the user to choose between repos
This way they don't need to use a repo called 'journal'.
2020-05-15 15:28:44 +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
b2d0cf44ab Stop using deprecated TextStyle properties 2020-05-08 10:55:00 +02:00
49bf02bf15 logEvent: Parameters must be <String, String>{}
Not string, dynamic. Sentry wants strings.
2020-05-01 10:50:09 +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
b2709f94f1 HostSetup: Allow keys to be regenerated even with a custom setup 2020-03-16 01:20:33 +01:00
5ec3af70a6 More comprehensive setup analytics 2020-03-01 15:28:56 +01:00
a0e3e50b4a HostSetup: Track if using GitHub/GitLab/other 2020-03-01 15:21:30 +01:00
69fbd20040 HostSetup: Allow custom keys to be provided
Fixes #26
2020-02-17 18:02:57 +01:00
98fb1ccff5 Move git host setup files to setup folder 2020-02-17 16:51:52 +01:00