61 Commits

Author SHA1 Message Date
4b89257749 FolderView: Handle root folder changing
I needed to implement didUpdateWidget. This changes my view on how
Flutter works dramatically.
2021-02-19 10:12:01 +01:00
406a72088b Use context.read instead of Provider.of with listen false
Shorter
2021-02-15 22:31:45 +01:00
130f2fe9a0 Rename Repository => GitJournalRepo
Repository is too vague of a word and it gets me confused with the Git
Repository. Also shorterned Repository to Repo. It's easier to read and
write.
2021-02-15 22:28:53 +01:00
e87a096c7d Allow Delete dialogs to be configured
Fixes #330
2020-11-18 13:01:33 +01:00
a76e32d8d3 Disable Scroll to Refresh when sync mode set to Manual 2020-10-23 14:14:02 +02:00
43206219da Merge AppState into Repository
The 'AppState' was more of a Repository state, and it's easier if it
lives inside the Repository class.
2020-10-23 02:01:45 +02:00
770394a8f9 Rename StateContainer to Respository 2020-10-23 01:38:47 +02:00
fd74a86abf Remove the whole local/remoteConfigured settings
We now infer this by checking if the directory exists, and by reading
the git config. It's a bit slower, but it's a far better method. I can
add a cache later, if it turns out to be too slow.
2020-10-16 15:13:34 +02:00
aa48753f10 Add listen:false when getting some providers 2020-10-12 17:40:22 +02:00
9499cea164 Remove Settings global
Stop it being a singleton. This means it needs to be passed around a
lot. This sucks, but it's how it should be. I shouldn't be using a
global variable to get around this.

This is needed as Settings will soon become repo specific when we
support multiple repos.

This breaks saving the settings in a file, that feature was toggled off
anyway. It needs to be thought over again.
2020-10-09 00:59:19 +02:00
62bea50506 Allow the bottom menu bar to be hidden
Fixes #261

The settings page for this is quite ugly right now, but the feature
works. I can improve its look another time.
2020-10-05 12:25:57 +02:00
75d48fbfc6 Integration Test: Show the sorting settings and view Options
Also add far more existing notes for the screenshots.
2020-09-28 12:11:05 +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
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
cc676f08d9 Fix One Journal Entry Per Day
I wasn't handling the case when there is no journal entry for that day.
2020-09-21 10:17:35 +02:00
265e253584 Generate one journal entry per day
Fixes #243
2020-09-16 11:08:16 +02:00
b9d8a8daa6 FolderView: Implement basic note selection
You can delete or share a note using this.
2020-09-07 16:37:51 +02:00
fac2826800 Implement the scaffolding for search highlighting
Still need to implement the actual highlighting part
2020-09-05 16:14:16 +02:00
fa075c25e0 FolderView: Implement selecting a note
This is disabled for now, untill I expose the actions which should be
performed when selecting a note.
2020-09-05 15:53:26 +02:00
48e4657161 FolderView: Make strings translatable 2020-09-04 09:16:43 +02:00
d4463d8b60 TagListing: Show text when empty 2020-09-03 08:46:59 +02:00
6ba0f3974a NoteEditor: Pass it the parentFolder
A note has a parent which is the physical folder it is inside, and a
parent folder which it is being displayed inside. It's useful to have
the latter as that can be used to display the next note - in the case of
the Journal Editor, and open the graph view as well.
2020-08-20 10:42:39 +02:00
9859aa6106 Allow custom metadata to be specifiec for any note
This way we can add 'draft: true' to all new notes.

Fixes #168
2020-08-18 10:47:26 +02:00
d94a1e1630 Remove another use of Settings.instance
I really want to remove this global variable, and only access it through
the Provider.
2020-08-16 15:51:53 +02:00
46269dd94a Implementing controlling of the sorting order
The dialog looks quite ugly right now, but at least everything works. I
can work on making it prettier after this.
2020-08-14 19:17:38 +02:00
a98b99dcb5 refactor: Move SortingOrderSelector into its own widget
Also translate it
2020-07-31 21:39:27 +02:00
8e8c11c5ef FolderView: Refactor NewNoteNavBar into its own widget 2020-07-31 20:47:18 +02:00
b85f9028fe Half implement Note selection in a FolderView
This allows you to long press on a note and select it, thereby allowing
you to perform actions on it, without opening the note.

This is disabled for note, as it isn't completely implemented. I'm not
sure how to pass down the informatin on which Note is selected.
2020-07-31 20:36:20 +02:00
73e3f7d5bc default editor should be updated without requiring a restart 2020-07-27 10:57:56 +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
5d7f616c6e const++ 2020-07-21 10:46:03 +02:00
fb9b69bb46 TagsFolder: Auto add relevant tag to new notes 2020-07-09 18:03:06 +02:00
8b4fa886ba Add a CustomRouteObserver
This basically asserts if we move to a route without a name. This way
I'll always catch when a route doesn't have a name, and I can start
getting better analytics on which screens are used most frequently.
2020-05-26 13:43:41 +02:00
816cb0c3ed Reduce code duplication
Avoid code for determining the publicName of a folder.
2020-05-18 00:23:14 +02:00
0dfb86788e Minor refactor 2020-05-13 16:56:20 +02:00
4375d0cf6d Add const 2020-05-13 01:21:40 +02:00
6ebd44505c FolderView: Hide the scaffold of a previously deleted note
When moving to create a new note, it's confusing if when we return to
the FolderView there is still the scaffold of undo-ing the last deleted
note.
2020-05-08 10:29:16 +02:00
317f75799f Add Title + FileName sorting modes 2020-05-03 16:01:21 +02:00
a12026a121 JournalEditor: Allow a default folder to be specified
This way all Journal Entries can go to that folder by default. It makes
adding a new journal entry easier.

Related to #118
2020-05-01 11:38:39 +02:00
e5e27e9a1d Add a bottom padding in the folderView
This way the FAB bar doesn't cover the last element.
2020-04-14 08:29:17 +02:00
9de5f913ed Improve screenshot script
Which also acts as our integration test.
2020-04-03 19:38:33 +02:00
6798eb0829 FolderView: Do not clip the body by the bottomNavigationBar
It looks weird as sometimes there is a grey border otherwise.
2020-04-02 18:20:29 +02:00
28ef551805 On sync error: Show the error a bit better
Do not show 'GitException: error'. We do not need to expose that it was
an exception.
2020-04-02 17:29:03 +02:00
fe08b53539 Add a .gitjournal.yaml file in a folder
This file will be added to save the settings of how we want that folder
to behave. For example - default Editor, view, sorting mode, etc.

This feature is currently disabled as it will only be a part of the pro
mode.
2020-03-31 14:02:38 +02:00
965639e6f2 Add the concept of Folder Settings
This contains the default editor / view / sortingMode / etc. For now the
folder settings are shared among all Folders. But the idea is that we
should be able to set different settings per folder (real or virtual)
2020-03-31 11:16:04 +02:00
930356aaf1 Add a GridView
This doesn't really work for small notes, but meh.
2020-03-30 11:45:17 +02:00
22c9d1208a FolderView: Show the correct title 2020-03-21 00:19:57 +01:00
610c4ea8a7 Allow the default folder for new notes to be configured
In the "All Notes" screen
2020-03-21 00:14:38 +01:00
a235048b2a Allow a note of a different 'type' to easily created
This adds a bottom bar, which hopefully doesn't make the app too
cluttered.
2020-03-19 01:46:51 +01:00
b252f037b3 Rename NotesFolder -> NotesFolderFS
And NotesFolderReadOnly to NotesFolder. It just makes more sense this
way as we're now getting more and more different "types" of
NotesFolders.
2020-03-15 02:01:07 +01:00