45 Commits

Author SHA1 Message Date
a292896d5a Host Setup: Clear the clone error before starting a clone
One could have a clone that failed and then we're trying again with some
different values. The old error message is invalid.
2020-01-05 17:39:13 +01:00
dccd58c5f1 prefer_const_constructors 2020-01-04 15:44:34 +01:00
daa0940066 Remote Setup: Only generate the key if not already generated
This way one can go back and change the clone url if one wants to and
the ssh key would not have changed. There is an additional SSH Key
changing button if one needs to regenerate it for some reason.

This should fix #47. Well, it's not the best solution, but it is a
workaround.

For the Clone Url you must enter SSH-KEY-ID@clone-url-provided-by-aws.
In order to get the SSH KEY ID you must upload the public key provdied
to your AWS Credentials.
2020-01-04 15:01:03 +01:00
c21287e97f code cleanup 2020-01-04 14:38:55 +01:00
90f7fb6a48 Remote Setup: Add a button to regenerate the key 2020-01-04 14:38:09 +01:00
b76645a144 Add a .gitIgnore file if missing
This way we always have at least one commit, cause not having any
commits makes a lot of the git commands fail.
2020-01-02 18:47:55 +01:00
757bf0b7ac Update dependencies and gradle 2019-12-23 12:25:31 +01:00
63170445d7 Move libgit2 code to git_bindings repo
We now have a much clearer separation between Git code and this app
specific code. This is awesome, it will allow other people to easily
integrate Git within their apps. Also, eventually it will be trivial to
switch to another implemention of Git (via JGit or a git client written
completely in Dart)

This breaks the iOS version as I haven't moved the code to build the ios
version. Maybe this will be a good excuse for me to setup a proper CI/CD
system for ios builds.

There is also a chance this breaks Crashalytics NDK symbols :(
2019-12-21 01:06:15 +01:00
70877438eb Git: Take the folderPath instead of folderName
The Git Api was strange and took a foldeName and it would only allow you
to access git operations in a particular path. This has now been fixed,
and now it can operate in any path.

This was the first step to moving the git api into its own library.
2019-12-20 20:40:00 +01:00
591ba30762 Fix flutter analyze 2019-12-11 21:48:46 +01:00
103520e5e5 SSH Key Comment: Add Operating System and current Date
It's useful info
2019-12-01 12:19:28 +01:00
7ba8faa57f Remove the entire concept of a subFolder
When configuring the Git Repo server, we could optionally track one folder
in the root git repo, instead of just the root folder. This was
specifically to address my use case where I have my journals in a
sub-directory. The setup screen was super ugly, though.

Since now I'm in the process of adding folder support because of #18, I
can remove this hack. It simplifies the code a lot.
2019-12-01 12:04:45 +01:00
d5f91cb898 More prefer_const
It seems like flutter analyze might have some kind of cache
2019-10-20 01:24:43 +01:00
ffc0af12a3 Enable prefer_const_constructors 2019-10-20 01:11:53 +01:00
51d2efaad9 ios - GitHostSetup: Add a back button on the top left
There is no way to exit the host setup otherwise. In Android, there is
the back button, but that doesn't exist in ios. This took me way too
long to implement, and even now, I'm not convinced that the button looks
right.
2019-10-09 21:50:24 +02:00
7f557d3d3e Use Flushbar for Snackbars
The flutter default Snackbars are a major PITA to use as they require a
Scaffold, additionaly, they will not be shown if the parent Scaffold is
destroyed, which is the case when deleting a note and returning to the
main screen.
2019-10-09 00:12:58 +02:00
69003cf0ac Rename package from journal -> gitjournal
It's about time.
2019-10-07 19:30:50 +02:00
0bfa839b88 Fix GitRepo.clone parameters
This is why it sucks to have 2 fields both of the same type and not have
some kind of automated testing for this part of the code.
2019-07-28 03:01:16 +02:00
2bfd05a532 Fix new flutter analyze problems
Flutter analyze seems to have gotten smarter
2019-07-18 01:13:39 +02:00
74d7bdd763 Use a proper logger - Fimber
It's time to start using a proper logger so we can control the number of
log messages, also - it helps to have a central configuration point for
the logs, specially since I would like to hook them up to Crashlytics in
the future.
2019-06-19 09:45:15 +02:00
d653663a47 Change Git dart API
Use a class instead of a many functions. This way we avoid passing the
same arguments again and again.
2019-06-17 19:38:56 +02:00
406c32c2b4 flutter upgrade
The dots_indicator package seems to have changed their API without
bumping the major version number :(
2019-06-16 17:34:24 +02:00
8059efcc4e Fix gitClone exception problem
e.message doesn't exist
2019-06-08 17:39:17 +02:00
c79249cbe1 Dart: Give all functions explicit types
It makes the code easier to understand and this way the static type
checker will catch bugs for us.
2019-06-02 15:51:43 +02:00
8ff5d02033 DartLinter: Add unnecessary_this 2019-02-23 01:33:34 +01:00
eb617eafa0 GitHostSetup: Remove unnecessary GlobalKey
It's not required as we can get the Scaffold from the BuildContext.
2019-02-16 19:37:08 +01:00
03e46ce8cd Allow notes to be stored inside a sub-folder in a git repo 2019-02-14 12:59:43 +01:00
882c4eb024 GitSetup: Add a screen to choose a subFolder
This is only shows if there are subFolders with '.md' files. This
feature is super important for me as it allows me to finally dogfood
this app and use it

This patch just adds the screen, but the subFolder selection
currently doesn't do anything.
2019-02-14 12:04:21 +01:00
f5e7a92546 GitHost: Remove InitialChoice page
It is no longer used. Our first choice is now to choose between
different hosting providers.
2019-02-14 11:23:24 +01:00
e9304bd2d1 GitSetup: Improve wording 2019-02-14 11:07:09 +01:00
c9ddf67e46 GitSetup SSH: Make the 2nd instruction different for custom provider 2019-02-14 01:02:20 +01:00
b7c687eee5 GitSetup: Autofill the clone url with the last value
Makes it easier to fix typos
2019-02-14 00:53:29 +01:00
ce80e4d9f8 GitHostSetup: Move SSH Key page to its own file 2019-02-13 23:12:07 +01:00
a63950bd10 GitHostSetup: Show a different page for entering cloneUrl
In the case when they don't want to use OAuth, but are still going to
use Github or Gitlab.
2019-02-13 23:08:46 +01:00
52b844e6e8 GitHostSetup: Move the button to its own file 2019-02-13 22:49:42 +01:00
af8d30165f GitHostSetup: Simplify the entire process
We are now no longer shown an option to choose between an existing repo
or creating a new one. We just directly jump into choosing a hosting
provider.

I'm trying to optimize the git host setup for the happy path.
2019-02-13 22:45:44 +01:00
5452fc0a78 GitHostSetup: Automatically open the correct url
This is a behaviour that got lost during the refactor.
2019-02-13 21:02:33 +01:00
6a8f8f4044 Rename GitHostSetupUrl -> GitCloneUrlPage 2019-02-13 20:59:15 +01:00
22c457b0f1 GitHostSetup: Do not manually count the number of pages
It's error prone.

The '+ 2' seems cryptic - +1 is because the variable is a 'count' and
not 'index'. Another '+1' because we now have one more page.
2019-02-13 20:54:15 +01:00
1cbcf1bfaa GitHostSetup: Simplify the code drastically
Also add an extra screen where it asks if we should set it up
automatically. The code base is now in a much much more managable
state and I feel comfortable adding more pages.
2019-02-13 20:40:41 +01:00
acede95536 Dart: Add analysis_options
For now I've mostly tried to follow the same style guide as the flutter
repository, with many options disabled. Eventually, maybe it would make
sense to be far stricter.
2019-02-13 13:08:15 +01:00
66cdda213a Fix gitClone from github
The test still fails, but via the app cloning seems to work. Progress!!
2019-02-06 15:34:57 +01:00
ed092da3c7 GitHostSetup: Lots of fixing
The flow between all the wizards is now complex enough that having it
all in one class is becoming quite complex. I've eventually managed to
get all the workflows to work, but there is a decent amount of code
duplication.

This really needs to be simplified.
2019-01-25 15:50:26 +01:00
ce343b316a GitHostSetup: Rename a string 2019-01-25 12:15:43 +01:00
285a900e76 Rename OnBoarding to GitHostSetup
It was either GitHost or GitRemote.
2019-01-25 12:05:32 +01:00