27 Commits

Author SHA1 Message Date
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
285a900e76 Rename OnBoarding to GitHostSetup
It was either GitHost or GitRemote.
2019-01-25 12:05:32 +01:00
170983024c Fix Clone screen not disappearing
and other misc changes
2019-01-23 12:48:37 +01:00
2b1ac6cad7 Hookup onBoarding screen to app
* I should probably stop calling in an onboarding screen, since it's now
just a way to setup sync.

* It overall feels quite ugly, and unpolished.
2019-01-23 12:13:02 +01:00
a29a102667 Move git api to apis folder 2019-01-23 11:54:02 +01:00
519de8fcff Remove onboarding screen
For now just create a local git repo and commit all the changes over
there, we're going to allow the user to first see the app and use it
however they want, and later connect it to a remote git repo.

This commit breaks the app, as the on-boarding screen is no longer
connected so you cannot push to a remote app.
2019-01-21 13:43:33 +01:00
c99fe854a1 Note: Replace 'id' with 'fileName'
It all just makes far more since when each Note has a fileName.

Though we don't save the fileName in the YAML header. It seems quite
redundant to do that.

Another advantage of this is that if we can read any file ending with a
'.md' in a git repo. It doesn't need to be named exactly how we want it,
and we will still save the details correctly.
2019-01-18 16:12:03 +01:00
4292555286 Pull to sync: Show a snackbar with an error message
The error message is quite basic right now -
"No Connection" or the full error returned to us by the java libraries.
But it's a start!
2019-01-16 23:20:07 +01:00
d6c2d5d05a Note id: Default to created and do not save if not required
For this journaling app, even though we are treating journal entries as
notes, we don't really any 'id'. Just the filename is quite adequate. In
the future, we can figure out this 'id' nonsense, and if it is even
required given that we're always going to be built on top of a FS.
2019-01-15 21:41:39 +01:00
38218fd9a3 Only save and load .md files
For now I only want to deal with markdown. In the future, we can move
towards maybe accepting all .txt files as well? Not sure.
2019-01-15 21:23:26 +01:00
5a2b0f1f4b Allow the notes to be refreshed by pulling from the top 2019-01-15 15:26:15 +01:00
075d353447 Write the date time in iso8601 + timezone
This is not perfect as when parsing the datetime, we're ignoring the
timezone.
2019-01-15 15:10:43 +01:00
04b65fbf95 Filename: Use iso8601 string
This sucks balls. Overall, the datetime handling in Dart is really
really bad. It just has the concept of local time or utc time. There are
a few packages which attempt to solve this, but none which really solve
it in the way I would like.

All I want is someway to generate an iso8601 string with the timezone.
And that my DateTime should be aware of the timezone as an offset east
of UTC. Is that really so hard?
2019-01-15 14:41:51 +01:00
89c878f1cd Remove half cloned git repos
It can fail to clone and leave some residual .git files
2019-01-11 19:29:34 +01:00
fe84aab6b7 RemoveExistingClone if onboarding is not completed
This only happens when I manually delete the shared_prefs. It's
basically a way to make working on the onboarding much easier.
2019-01-10 13:32:03 +01:00
eac9857c17 Persist onBoardingCompleted 2019-01-10 13:22:21 +01:00
a5830ccbc4 Load the journal list after onboarding 2019-01-10 13:03:00 +01:00
4bb02b12d6 Hookup the Journal app to git
Now notes are saved in the git repo, and immediately synced. This is not
the best implementation, as the notes are being reloaded a lot, and
the error handling is terrible (I miss golang). But it's the first
working poc.
2019-01-09 12:55:53 +01:00
fb3f3bfccf Avoid using the path_provider plugin
We get the path ourselves as the 'git plugin' is using the
android 'getFilesDir()', instead of 'getDataDir()' which is what the
path_provider returns.

It's strange that it returns the latter as the Android docs clearly
state that one should not use this path and should use getFilesDir
instead.
2019-01-07 16:34:25 +01:00
104d54efc3 Fix tests 2018-06-03 20:19:20 +02:00
2082bea8ac Move some classes into another folder
Just giving some more structure
2018-06-03 19:49:34 +02:00
9d19ee4c14 Make FileStorage a NoteRepository 2018-06-03 19:44:36 +02:00
69998c37f9 Add/Remove individual notes from disk
Instead of rewriting all of them on save.
2018-06-03 19:34:46 +02:00
2c68865c46 FileStorage: Allow the note filename to be customizable 2018-06-03 19:34:14 +02:00
157fc425dc FileStorage: Use the YAML Markdown serializer
Instead of saving stuff in json.
2018-06-03 19:14:25 +02:00
0551cc0538 Note Deletion: Implement undo 2018-05-25 01:05:17 +02:00
b6c38dde3c Use an InheritedWidget instead of passing the callbacks
This simplifies the code quite a bit, at the cost of using this
strange flutter magic of an 'InheritedWidget'.

It basically make a class a global variable.
2018-05-24 12:33:46 +02:00