255 Commits

Author SHA1 Message Date
a759ad4a23 Combine showSnackbar code
It's annoying to always have to remember to call it. We had forgotten in
one place and that resulted in a lot of noise.
2020-01-27 19:02:44 +01:00
bd0819c5be Settings: Disable the Git Remote Settings when no remote present 2020-01-27 19:01:47 +01:00
ec1bcb3e3a [Feat] add FAB for note saving
Resolves #52
2020-01-18 11:47:20 +01:00
6f3643bbef Remove the BROWSE title
It's not required. Yes, stuff looks a little bit empty - but the title
over here really serves no purpose. Also, it's a bit confusing when
coming in from the hero animation for the List Tile's title to become
"BROWSE".

I do wish there was an easy way to inform the user that they can swipe
left/right in order to move between notes.
2020-01-08 00:04:20 +01:00
7e3cfb9e37 Allow the default yaml modified key to changed
Some people are using GitJournal to edit Hugo websites, this option is
for them as the Hugo front matter uses the 'lastmod' key to indicate
when the post was last modified.
2020-01-05 18:24:46 +01:00
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
6e05ce7f18 CloneUrlInput: All it to expand vertically
Ideally one should remove the code duplication of this form, but for now
duplicating the code is just so much simpler.
2020-01-05 17:38:25 +01:00
dccd58c5f1 prefer_const_constructors 2020-01-04 15:44:34 +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
599c6b4e6e Remote Setup: Let the clone url text field expand 2020-01-04 15:02:53 +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
36d1ae43c3 Split NoteData and its serializer into its own file 2020-01-01 19:50:31 +01:00
14e7f344d1 Add an explicit serializer from Note -> NoteData
This is so that we can start configuring what the yaml metadata keys
should be called, and not have them hardcoded.

This also allows the note.created to be null. Earlier we were always
setting it to some value. That's doesn't seem right.
2020-01-01 19:29:57 +01:00
92f50ed397 MarkdownViewer: Allow links to be clicked 2019-12-27 13:18:58 +01:00
5a79fa26ca Add a Fade transition when jumping from Viewing to Editing
It looks much better than the normal page transition.
2019-12-27 11:10:22 +01:00
895d2f4f1b Give each Note a title
We're moving away from being a Journal Editor to being a Note Editor. I
don't want to discard the Journaling parts, as Journaling is really a
subset of Note Taking - so in the future it would be nice if this could
be somehow toggled.

Maybe each Folder can have different display settings. Probably in the
"pro" version.
2019-12-27 11:05:32 +01:00
bc9e308971 Move SyncButton to its own file 2019-12-26 20:56:30 +01:00
6af3b03210 Add a sync button to the AppBar
This somewhat shows what's going on with the network. It isn't ideal, as
is a bit ugly. But it's a start to show the network status, and what's
going on in the background.
2019-12-26 20:43:12 +01:00
f5558803c5 GitHostSetup: Log all exceptions
Not only GitHostExceptions as these don't cover Network exceptions.
2019-12-26 17:57:46 +01:00
fec3a91df1 JournalEditor: We don't need the extra Form
We're not using it for anything.
2019-12-23 12:25:57 +01:00
757bf0b7ac Update dependencies and gradle 2019-12-23 12:25:31 +01:00
cae3fa52b7 Fix mistakenly added 'foo' 2019-12-22 18:55:33 +01:00
764209fe57 CloneUrl Validation: We do not support the git protocol
Well, we actually do support it, but I don't want users to use it,
as I have no intention of supporting it in the future.

In the future - Git will be written entirely in Dart.
2019-12-22 18:49:46 +01:00
ad0c305597 CloneUrlValidation: Our regexp is broken
With AWS Code commit we get URLs of the form -

ssh://APKAZLZA77YWDCWYRAC5@git-codecommit.eu-west-1.amazonaws.com/v1/repos/blah

All our assumptions about how the URL should be are now invalid. It's
best to just check for the presence of an '@'
2019-12-22 18:48:40 +01:00
83e5c44a5c FolderListing AppBar: Make the title a plural
Folders instead of Folder
2019-12-22 15:39:13 +01:00
de369fe6d9 Add 'Open Source' in the onboarding screen 2019-12-22 15:25:42 +01:00
798a744574 Change public strings of "Journal" to "Notes" 2019-12-22 15:24:00 +01:00
a2f237ede3 Add scrollbar's in JournalLists and FolderLists
Pros: It's nice to know where we are in the list.
Cons: It makes the lagging in the list view far far more apparent.
2019-12-22 15:16:41 +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
3657a88ce5 FolderListing: Show the full path of subfolders
It's confusing otherwise, though this doesn't look very pretty.
2019-12-14 12:18:52 +01:00
591ba30762 Fix flutter analyze 2019-12-11 21:48:46 +01:00
abb6029798 Allow Folders to be deleted
For safety we're only allowing non-empty folders to be deleted. Ideally,
we should have some kind of undo button. Or some kind of history - since
we do have that with git.

Related to #18
2019-12-11 21:43:08 +01:00
453a6c518d Allow Sub Folders to be created
Fixes #34
2019-12-11 21:18:12 +01:00
27d5af8b01 FolderListing: Change the scaffold when a folder is selected
This way it's way more obvious. Also, add a back button so the user can
cancel the selection more explicitly.
2019-12-11 21:09:40 +01:00
b0b7da5291 Move storage classes into core
The Git functionality is fairly core!
2019-12-09 01:19:44 +01:00
cd24d2688f Never let the Note be in an invalid state
It's a bit confusing that the created date has to be set when creating a
new note, and the path had to be constructured properly, without which
the note shouldn't be saved. Ideally, an object shouldn't be able exist
in such an inconsistent state.
2019-12-09 01:14:45 +01:00
ca83cb79a6 JournalListing: Remove recursive option
We aren't using it, and if we implement a recursive option it should
somehow showcase which folder it is under. Evernote does it in an
interesting way.
2019-12-09 00:53:53 +01:00
8a49d948f0 StateContainer: Do not call setState when the notesFolder changes
The NotesFolder is now a listenable and is always accessed via Provider,
and therefore doesn't need setState to be called when it is modified.
2019-12-08 02:58:56 +01:00
0b1a41f3bd FolderListing: Use Provider to fetch the NotesFolder
This is our first use case of trying to use 'Provider' for state
management. Right now, we're doing state management quite horribly as
all the widgets are rebuilt whenever the state of the app changes.

With this, we can now start to refactor and only rebuild the widgets
whose data has changed.

There we many many different state management solutions to choose from,
I've settled on Provider, as it seems like the simplest to integrate
into the code base. Bloc/Redux seemed like they would add too much
complexity for me.
2019-12-07 16:30:39 +01:00
d0107b6a26 Fix flutter analyze 2019-12-06 23:58:22 +01:00
8c6a33456a Allow folders to be renamed
This is a huge change which involves -
* Implementing Folder renames on the FS + Git level
* Implementing the concept of selecting an item in the FoldersListView,
  this feature isn't provided by default, and even now I'm not sure if
  the semantics which I've implemented are correct. I haven't
  implemented multiple folder selection for now.

Related to issue #18

Also, we're now one step closer to allowing notes to be renamed (#23)
2019-12-06 21:32:41 +01:00
4c2285a2cc JournalList: Implement Hero transition
This was especially challenging because of this bug -
https://github.com/flutter/flutter/issues/36220

It's why we need the extra flightShuttleBuilder
2019-12-06 12:32:51 +01:00
199e298903 JournalEditor: Show "note" instead of "Journal"
It seems we are moving towards a more generalized Note taking
application. I'd still like to use it for both Note taking and
Journaling. I'm not sure how to clearly show it is meant for both.
2019-12-05 17:40:08 +01:00
7d223509c8 JournalListing: Show Folder name in title 2019-12-05 17:38:40 +01:00
975b235df3 Add Folder creation
Folders for now can only be created under the root folder. I cannot seem
to figure out how to design a good interface for designing how to choose
the parent folder.
2019-12-05 17:08:02 +01:00
ca2102a8b0 Expose the Folders view
This adds a new 'Folders' screen which shows you all your folders and
lets you manage the notes inside them. It currently doesn't allow you to
add or remove Folders, though.

This nearly addresses #18
2019-12-04 15:33:30 +01:00