Updating design
This commit is contained in:
parent
1229bcfc09
commit
d27efaf916
|
|
@ -350,6 +350,7 @@ const String kDefaultCurrencyId = '1';
|
||||||
const String kDefaultDateFormat = '5';
|
const String kDefaultDateFormat = '5';
|
||||||
const String kDefaultAccentColor = '#0091EA';
|
const String kDefaultAccentColor = '#0091EA';
|
||||||
const String kDefaultSelectedColor = '#1E252F';
|
const String kDefaultSelectedColor = '#1E252F';
|
||||||
|
const String kDefaultBorderColor = '#393A3C';
|
||||||
|
|
||||||
const String kReportGroupDay = 'day';
|
const String kReportGroupDay = 'day';
|
||||||
const String kReportGroupMonth = 'month';
|
const String kReportGroupMonth = 'month';
|
||||||
|
|
|
||||||
|
|
@ -292,6 +292,7 @@ class InvoiceNinjaAppState extends State<InvoiceNinjaApp> {
|
||||||
//canvasColor: const Color(0xFF1B1C1E),
|
//canvasColor: const Color(0xFF1B1C1E),
|
||||||
canvasColor: Colors.black,
|
canvasColor: Colors.black,
|
||||||
cardColor: const Color(0xFF1B1C1E),
|
cardColor: const Color(0xFF1B1C1E),
|
||||||
|
bottomAppBarColor: const Color(0xFF1B1C1E),
|
||||||
)
|
)
|
||||||
: ThemeData(fontFamily: fontFamily).copyWith(
|
: ThemeData(fontFamily: fontFamily).copyWith(
|
||||||
pageTransitionsTheme: pageTransitionsTheme,
|
pageTransitionsTheme: pageTransitionsTheme,
|
||||||
|
|
|
||||||
|
|
@ -200,128 +200,149 @@ class MenuDrawer extends StatelessWidget {
|
||||||
width: state.prefState.isMenuCollapsed ? 65 : kDrawerWidth,
|
width: state.prefState.isMenuCollapsed ? 65 : kDrawerWidth,
|
||||||
child: Drawer(
|
child: Drawer(
|
||||||
child: SafeArea(
|
child: SafeArea(
|
||||||
child: Column(
|
child: Container(
|
||||||
mainAxisSize: MainAxisSize.max,
|
decoration: BoxDecoration(
|
||||||
children: <Widget>[
|
border: Border.all(
|
||||||
// Hide options while refreshing data
|
width: 1,
|
||||||
state.credentials.token.isEmpty
|
color: convertHexStringToColor(kDefaultBorderColor),
|
||||||
? Expanded(child: SizedBox())
|
),
|
||||||
: Container(
|
),
|
||||||
padding:
|
child: Column(
|
||||||
EdgeInsets.symmetric(horizontal: 14, vertical: 3),
|
mainAxisSize: MainAxisSize.max,
|
||||||
color: enableDarkMode ? Colors.white10 : Theme.of(context).cardColor,
|
children: <Widget>[
|
||||||
child: state.prefState.isMenuCollapsed
|
// Hide options while refreshing data
|
||||||
? _collapsedCompanySelector
|
state.credentials.token.isEmpty
|
||||||
: _expandedCompanySelector),
|
? Expanded(child: SizedBox())
|
||||||
state.credentials.token.isEmpty
|
: Container(
|
||||||
? SizedBox()
|
padding:
|
||||||
: Expanded(
|
EdgeInsets.symmetric(horizontal: 14, vertical: 3),
|
||||||
child: Container(
|
color: enableDarkMode
|
||||||
|
? Colors.white10
|
||||||
|
: Theme.of(context).cardColor,
|
||||||
|
child: state.prefState.isMenuCollapsed
|
||||||
|
? _collapsedCompanySelector
|
||||||
|
: _expandedCompanySelector),
|
||||||
|
state.credentials.token.isEmpty
|
||||||
|
? SizedBox()
|
||||||
|
: Expanded(
|
||||||
|
child: Container(
|
||||||
color: Theme.of(context).cardColor,
|
color: Theme.of(context).cardColor,
|
||||||
child: ListView(
|
child: ListView(
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
DrawerTile(
|
DrawerTile(
|
||||||
company: company,
|
company: company,
|
||||||
icon: getEntityIcon(EntityType.dashboard),
|
icon: getEntityIcon(EntityType.dashboard),
|
||||||
title: localization.dashboard,
|
title: localization.dashboard,
|
||||||
onTap: () => store.dispatch(
|
onTap: () => store.dispatch(ViewDashboard(
|
||||||
ViewDashboard(navigator: Navigator.of(context))),
|
navigator: Navigator.of(context))),
|
||||||
onLongPress: () => store.dispatch(ViewDashboard(
|
onLongPress: () => store.dispatch(ViewDashboard(
|
||||||
navigator: Navigator.of(context), filter: '')),
|
|
||||||
),
|
|
||||||
DrawerTile(
|
|
||||||
company: company,
|
|
||||||
entityType: EntityType.client,
|
|
||||||
icon: getEntityIcon(EntityType.client),
|
|
||||||
title: localization.clients,
|
|
||||||
),
|
|
||||||
DrawerTile(
|
|
||||||
company: company,
|
|
||||||
entityType: EntityType.product,
|
|
||||||
icon: getEntityIcon(EntityType.product),
|
|
||||||
title: localization.products,
|
|
||||||
),
|
|
||||||
DrawerTile(
|
|
||||||
company: company,
|
|
||||||
entityType: EntityType.invoice,
|
|
||||||
icon: getEntityIcon(EntityType.invoice),
|
|
||||||
title: localization.invoices,
|
|
||||||
),
|
|
||||||
DrawerTile(
|
|
||||||
company: company,
|
|
||||||
entityType: EntityType.payment,
|
|
||||||
icon: getEntityIcon(EntityType.payment),
|
|
||||||
title: localization.payments,
|
|
||||||
),
|
|
||||||
DrawerTile(
|
|
||||||
company: company,
|
|
||||||
entityType: EntityType.quote,
|
|
||||||
icon: getEntityIcon(EntityType.quote),
|
|
||||||
title: localization.quotes,
|
|
||||||
),
|
|
||||||
DrawerTile(
|
|
||||||
company: company,
|
|
||||||
entityType: EntityType.credit,
|
|
||||||
icon: getEntityIcon(EntityType.credit),
|
|
||||||
title: localization.credits,
|
|
||||||
),
|
|
||||||
DrawerTile(
|
|
||||||
company: company,
|
|
||||||
entityType: EntityType.project,
|
|
||||||
icon: getEntityIcon(EntityType.project),
|
|
||||||
title: localization.projects,
|
|
||||||
),
|
|
||||||
DrawerTile(
|
|
||||||
company: company,
|
|
||||||
entityType: EntityType.task,
|
|
||||||
icon: getEntityIcon(EntityType.task),
|
|
||||||
title: localization.tasks,
|
|
||||||
),
|
|
||||||
DrawerTile(
|
|
||||||
company: company,
|
|
||||||
entityType: EntityType.vendor,
|
|
||||||
icon: getEntityIcon(EntityType.vendor),
|
|
||||||
title: localization.vendors,
|
|
||||||
),
|
|
||||||
DrawerTile(
|
|
||||||
company: company,
|
|
||||||
entityType: EntityType.expense,
|
|
||||||
icon: getEntityIcon(EntityType.expense),
|
|
||||||
title: localization.expenses,
|
|
||||||
),
|
|
||||||
// STARTER: menu - do not remove comment
|
|
||||||
DrawerTile(
|
|
||||||
company: company,
|
|
||||||
icon: getEntityIcon(EntityType.reports),
|
|
||||||
title: localization.reports,
|
|
||||||
onTap: () {
|
|
||||||
store.dispatch(
|
|
||||||
ViewReports(navigator: Navigator.of(context)));
|
|
||||||
},
|
|
||||||
),
|
|
||||||
DrawerTile(
|
|
||||||
company: company,
|
|
||||||
icon: getEntityIcon(EntityType.settings),
|
|
||||||
title: localization.settings,
|
|
||||||
onTap: () {
|
|
||||||
store.dispatch(ViewSettings(
|
|
||||||
navigator: Navigator.of(context),
|
navigator: Navigator.of(context),
|
||||||
company: state.company));
|
filter: '')),
|
||||||
},
|
),
|
||||||
),
|
DrawerTile(
|
||||||
],
|
company: company,
|
||||||
),
|
entityType: EntityType.client,
|
||||||
|
icon: getEntityIcon(EntityType.client),
|
||||||
|
title: localization.clients,
|
||||||
|
),
|
||||||
|
DrawerTile(
|
||||||
|
company: company,
|
||||||
|
entityType: EntityType.product,
|
||||||
|
icon: getEntityIcon(EntityType.product),
|
||||||
|
title: localization.products,
|
||||||
|
),
|
||||||
|
DrawerTile(
|
||||||
|
company: company,
|
||||||
|
entityType: EntityType.invoice,
|
||||||
|
icon: getEntityIcon(EntityType.invoice),
|
||||||
|
title: localization.invoices,
|
||||||
|
),
|
||||||
|
DrawerTile(
|
||||||
|
company: company,
|
||||||
|
entityType: EntityType.payment,
|
||||||
|
icon: getEntityIcon(EntityType.payment),
|
||||||
|
title: localization.payments,
|
||||||
|
),
|
||||||
|
DrawerTile(
|
||||||
|
company: company,
|
||||||
|
entityType: EntityType.quote,
|
||||||
|
icon: getEntityIcon(EntityType.quote),
|
||||||
|
title: localization.quotes,
|
||||||
|
),
|
||||||
|
DrawerTile(
|
||||||
|
company: company,
|
||||||
|
entityType: EntityType.credit,
|
||||||
|
icon: getEntityIcon(EntityType.credit),
|
||||||
|
title: localization.credits,
|
||||||
|
),
|
||||||
|
DrawerTile(
|
||||||
|
company: company,
|
||||||
|
entityType: EntityType.project,
|
||||||
|
icon: getEntityIcon(EntityType.project),
|
||||||
|
title: localization.projects,
|
||||||
|
),
|
||||||
|
DrawerTile(
|
||||||
|
company: company,
|
||||||
|
entityType: EntityType.task,
|
||||||
|
icon: getEntityIcon(EntityType.task),
|
||||||
|
title: localization.tasks,
|
||||||
|
),
|
||||||
|
DrawerTile(
|
||||||
|
company: company,
|
||||||
|
entityType: EntityType.vendor,
|
||||||
|
icon: getEntityIcon(EntityType.vendor),
|
||||||
|
title: localization.vendors,
|
||||||
|
),
|
||||||
|
DrawerTile(
|
||||||
|
company: company,
|
||||||
|
entityType: EntityType.expense,
|
||||||
|
icon: getEntityIcon(EntityType.expense),
|
||||||
|
title: localization.expenses,
|
||||||
|
),
|
||||||
|
// STARTER: menu - do not remove comment
|
||||||
|
DrawerTile(
|
||||||
|
company: company,
|
||||||
|
icon: getEntityIcon(EntityType.reports),
|
||||||
|
title: localization.reports,
|
||||||
|
onTap: () {
|
||||||
|
store.dispatch(ViewReports(
|
||||||
|
navigator: Navigator.of(context)));
|
||||||
|
},
|
||||||
|
),
|
||||||
|
DrawerTile(
|
||||||
|
company: company,
|
||||||
|
icon: getEntityIcon(EntityType.settings),
|
||||||
|
title: localization.settings,
|
||||||
|
onTap: () {
|
||||||
|
store.dispatch(ViewSettings(
|
||||||
|
navigator: Navigator.of(context),
|
||||||
|
company: state.company));
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
)),
|
)),
|
||||||
Align(
|
Container(
|
||||||
child: state.prefState.isMenuCollapsed
|
decoration: BoxDecoration(
|
||||||
? SidebarFooterCollapsed(
|
color: Theme.of(context).bottomAppBarColor,
|
||||||
isUpdateAvailable: state.account.isUpdateAvailable,
|
border: Border(
|
||||||
)
|
top: BorderSide(
|
||||||
: SidebarFooter(),
|
width: 1,
|
||||||
alignment: Alignment(0, 1),
|
color: convertHexStringToColor(kDefaultBorderColor),
|
||||||
),
|
)),
|
||||||
],
|
),
|
||||||
|
child: Align(
|
||||||
|
child: state.prefState.isMenuCollapsed
|
||||||
|
? SidebarFooterCollapsed(
|
||||||
|
isUpdateAvailable: state.account.isUpdateAvailable,
|
||||||
|
)
|
||||||
|
: SidebarFooter(),
|
||||||
|
alignment: Alignment(0, 1),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue