mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-30 11:33:34 +08:00
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
This commit is contained in:
@ -20,6 +20,7 @@ import 'package:dynamic_theme/dynamic_theme.dart';
|
||||
|
||||
import 'screens/githostsetup_screens.dart';
|
||||
import 'screens/onboarding_screens.dart';
|
||||
import 'screens/folder_listing.dart';
|
||||
|
||||
class JournalApp extends StatelessWidget {
|
||||
static Future main(SharedPreferences pref) async {
|
||||
@ -120,6 +121,7 @@ class JournalApp extends StatelessWidget {
|
||||
initialRoute: initialRoute,
|
||||
routes: {
|
||||
'/': (context) => HomeScreen(),
|
||||
'/folders': (context) => FolderListingScreen(),
|
||||
'/settings': (context) => SettingsScreen(),
|
||||
'/setupRemoteGit': (context) =>
|
||||
GitHostSetupScreen(stateContainer.completeGitHostSetup),
|
||||
|
@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
|
||||
import 'package:gitjournal/state_container.dart';
|
||||
|
||||
import 'journal_listing.dart';
|
||||
import 'folder_listing.dart';
|
||||
|
||||
class HomeScreen extends StatelessWidget {
|
||||
@override
|
||||
@ -10,7 +9,6 @@ class HomeScreen extends StatelessWidget {
|
||||
final container = StateContainer.of(context);
|
||||
final appState = container.appState;
|
||||
|
||||
return JournalListingScreen(noteFolder: appState.noteFolder);
|
||||
// return FolderListingScreen();
|
||||
return JournalListingScreen(notesFolder: appState.notesFolder);
|
||||
}
|
||||
}
|
||||
|
@ -57,6 +57,31 @@ class AppDrawer extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
setupGitButton,
|
||||
ListTile(
|
||||
leading: Icon(Icons.note, color: textStyle.color),
|
||||
title: Text('Notes', style: textStyle),
|
||||
onTap: () {
|
||||
var m = ModalRoute.of(context);
|
||||
if (m.settings.name == "/") {
|
||||
Navigator.pop(context);
|
||||
} else {
|
||||
Navigator.pop(context);
|
||||
Navigator.pushReplacementNamed(context, '/');
|
||||
}
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: Icon(Icons.folder, color: textStyle.color),
|
||||
title: Text('Folders', style: textStyle),
|
||||
onTap: () {
|
||||
var m = ModalRoute.of(context);
|
||||
if (m.settings.name == "/folders") {
|
||||
Navigator.pop(context);
|
||||
} else {
|
||||
Navigator.popAndPushNamed(context, "/folders");
|
||||
}
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: Icon(Icons.share, color: textStyle.color),
|
||||
title: Text('Share App', style: textStyle),
|
||||
|
Reference in New Issue
Block a user