2220 Commits

Author SHA1 Message Date
c7174ab2da Update minSDKVersion to 26
Jgit relies on java.nio.file which was only added in API Level 26.
https://developer.android.com/reference/java/nio/file/package-summary

This sucks because we're greately limiting the number of Android Devices
we can target. I don't get what is so special about nio, that it cannot
be treated like any other API.
2019-01-25 01:21:39 +01:00
fafd2f9407 Remove .idea
Not really required to be in version control
2019-01-25 01:21:05 +01:00
a342eada0f OnBoarding Screen AutoConfigure: Let the user swipe back 2019-01-24 18:21:39 +01:00
f8a066d5d9 Add API for GitLab
It's so awesome that I don't need to store the client secret with
GitLab. The GitHub APIs are so much easier to use + documentation, but
at least GitLab supports more OAuth methods.
2019-01-24 18:19:50 +01:00
4c1009f42f OnBoarding: Add auto-configure mode for Github
In this mode the user doesn't need to do anything but give the
GitJournal app permissions, and then it will go and create the repo, add
the ssh key and everything.

This currently does not work for Gitlab.
2019-01-24 16:45:40 +01:00
136713dc1e Github: Remove unnecessary braces 2019-01-24 15:30:55 +01:00
edc83c3048 Move scripts to their own folder 2019-01-24 15:29:07 +01:00
d87085ac29 GitHub API: Refactor it into a class 2019-01-24 15:28:04 +01:00
fbdb4d61ed Add an OAuth GitHub api
This just models the basic API that we need for GitJournal. The API
isn't great and could use improvement.

Also, yes, I know I'm committing the secret key, but I don't see any
other way of managing this. GitHub doesn't allow the implicit oauth flow
or dynamic clients registration or anything. So there isn't really any
other way.
2019-01-24 13:50:06 +01:00
2a029d261a Bump version number 2019-01-24 00:00:32 +01:00
a25deb2b0c Fix unused imports 2019-01-23 23:58:52 +01:00
d4d402490a Settings: Highlight debug version
Since we no longer have the debug banner, it's nice to have a way to
figure out what version we are running.
2019-01-23 20:20:51 +01:00
c2e49bb630 Add a POC OAuth client implementation
I've registered GitJournal as an app on Github and tried to get the
access_token within the app. This seems to work. Though, I need to
provide the client secret as well. It's quite sad that GitHub does not
even support the Implicit Grant auth type.

Credit: https://stackoverflow.com/questions/46196240/oauth2-flow-in-flutter-app
2019-01-23 20:20:22 +01:00
03db7d62e7 android: Minor refactor
Reduces the level of indentation, and makes the code easier to read.
2019-01-23 20:16:48 +01:00
b9b42d950f ListView: Remove the padding
This way it properly aligns up with the hamburger menu.

I also discovered this 'debugShowMaterialGrid' option which makes
working with padding issues much much easier.
2019-01-23 15:19:54 +01:00
e590c3c132 Do not show the 'debug' banner
It's annoying, and does not allow us to easily take screenshots.
Specially since the apps built in release mode cannot be run in an x86
android emulator.
2019-01-23 15:11:01 +01:00
de6968606d Gitlab: link to the exact Deploy Keys part
Gitlab guys were quite promt!

https://gitlab.com/gitlab-org/gitlab-ce/issues/56589#note_134106654
2019-01-23 14:52:27 +01:00
a7d366e7c6 Settings: Try to add a header
It still looks ugly as fuck
2019-01-23 13:39:54 +01:00
75d86dfa99 Settings: Add 'GitAuthor' and 'Git Author Email'
These are just dummy values for now and cannot be actually changed.
2019-01-23 13:29:26 +01:00
4ca40ee08b Note Browsing: Allow swiping along the notes
I'd implemented an adhoc method of doing this which clearly sucked. It's
easier to just use the PageView class.
2019-01-23 13:00:49 +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
dfd5d6f6d2 Note: Remove the asserts
We actually do quite often create notes without anything, and then later
fill them up. Lets just setup a bad default for the created.
2019-01-23 12:09:26 +01:00
a29a102667 Move git api to apis folder 2019-01-23 11:54:02 +01:00
8693545fe5 OnBoardingScreen: Do not quit when pressing back
We're no longer the first screen to be shown.
2019-01-23 11:51:39 +01:00
2f8dd95ee9 Note: Never let the created be null
Null paramters are annoying, cause we then need to check if != null all
the time. I hate this about Dart. A type should always have sensible
defaults.
2019-01-23 11:47:46 +01:00
cdc6fd9ed7 Git: Add a simplistic way to migrate between 2 git repos
This way initially all the changes are performed on the local git repo,
and then later they are applied on the remote git repo. Currently we
just copy the files, but we should be cherry-picking each commit and
applying it properly.
2019-01-23 11:24:51 +01:00
8b40cd2285 GitCommit: Let us specify the date time
The Timezone handling is java seems to be quite strange, so I'm going to
skip it for now and fix it later. We do seem to have proper timezone
classes in future versions of Java, but that requires me to increase the
minSDKVersion, and therefore not support very old android devices.
2019-01-23 11:03:06 +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
c915e58273 GitCommit: Do not allow empty commits 2019-01-21 13:39:30 +01:00
ba1246b0f6 Bump version number 2019-01-20 15:06:08 +01:00
92517d86f9 NoteEdit: Configure textCapitalization settings
Without this writing a journal is a pain as the first letter is not
automatically capitalized.
2019-01-20 15:05:10 +01:00
ea6dab00cf flutter upgrade 2019-01-20 14:57:03 +01:00
ccefc3c769 NoteHeader: Make it prettier
* Align the header better
* Show the full month name
2019-01-20 13:46:46 +01:00
89d7b724da Travis: Allow the flutter directory to exist 2019-01-18 18:09:38 +01:00
215197ca25 YAML Serializer: Add a test which currently fails
It would be nice to preserve the order of the YAML metadata, but the
YAML package does not currently support that.
2019-01-18 18:06:19 +01:00
33f32ae786 Travis: Cache the flutter repo 2019-01-18 17:53:36 +01:00
7594f139b9 Add travis badge 2019-01-18 17:52:34 +01:00
c18268e46e Hopefully fix Travis 2019-01-18 17:43:58 +01:00
aef0648baa Fix problems spotted by flutter analyze 2019-01-18 17:39:58 +01:00
93d1ddd684 Travis: Clone flutter in a tmp directory
This way when we run flutter analyze, we do not get a huge dump, because
it is analyzing the flutter source code.
2019-01-18 17:38:07 +01:00
6dcd8ba48c Note: Compare via fileName if created is the same
This should make the test pass as the test notes have the same date
time.
2019-01-18 17:36:54 +01:00
cd5078a301 Add a sample travis config 2019-01-18 17:25:31 +01:00
eb45408460 Bump version number 2019-01-18 16:59:20 +01:00
905f501a6f Do not add a 'created' field if it does not exist
It should, but it's fine if it doesn't. It does look a bit strange
since Dart puts the date to Nov 0001, but whatever.
2019-01-18 16:58:06 +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
99392955c9 Note Editing: Show a different message
Also allow us to go back if the note has not been modified. I say note
but I really mean 'journal'. These two words are used interchangably.
2019-01-18 15:45:02 +01:00
652ed6ffe5 File_Storage: Fix tests
I should really be running the tests more often. I'd clearly broken
things and hadn't noticed.
2019-01-18 15:40:30 +01:00
f7e2253f55 Fix serializer tests
* Map equality does not exist in Dart - how sucky!
* We no longer care about the micro-seconds
2019-01-18 15:37:19 +01:00
7ba6f1eb77 Improve VersionNumberButton 2019-01-18 13:54:08 +01:00