2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-04-28 13:36:50 +00:00

Add more buttons to the main screen

- Currently just display an "unsupported" dialog
This commit is contained in:
Oliver Walters 2020-04-05 22:19:40 +10:00
parent 15d5bf3fb5
commit 0cc210cf2b
2 changed files with 58 additions and 4 deletions

View File

@ -194,8 +194,19 @@ class _MyHomePageState extends State<MyHomePage> {
Navigator.push(context, MaterialPageRoute(builder: (context) => LocationDisplayWidget(null))); Navigator.push(context, MaterialPageRoute(builder: (context) => LocationDisplayWidget(null)));
} }
void _suppliers() { void _unsupported() {
// TODO showDialog(
context: context,
child: new SimpleDialog(
title: new Text("Unsupported"),
children: <Widget>[
ListTile(
title: Text("This feature is not yet supported"),
subtitle: Text("It will be supported in an upcoming release"),
)
],
)
);
} }
@override @override
@ -259,7 +270,7 @@ class _MyHomePageState extends State<MyHomePage> {
Column( Column(
children: <Widget>[ children: <Widget>[
IconButton( IconButton(
icon: new Icon(Icons.category), icon: new FaIcon(FontAwesomeIcons.shapes),
tooltip: 'Parts', tooltip: 'Parts',
onPressed: _parts, onPressed: _parts,
), ),
@ -281,7 +292,7 @@ class _MyHomePageState extends State<MyHomePage> {
IconButton( IconButton(
icon: new FaIcon(FontAwesomeIcons.industry), icon: new FaIcon(FontAwesomeIcons.industry),
tooltip: 'Suppliers', tooltip: 'Suppliers',
onPressed: _suppliers, onPressed: _unsupported,
), ),
Text("Suppliers"), Text("Suppliers"),
] ]
@ -289,6 +300,42 @@ class _MyHomePageState extends State<MyHomePage> {
], ],
), ),
Spacer(), Spacer(),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
Column(
children: <Widget>[
IconButton(
icon: new FaIcon(FontAwesomeIcons.tools),
tooltip: "Build",
onPressed: _unsupported,
),
Text("Build"),
],
),
Column(
children: <Widget>[
IconButton(
icon: new FaIcon(FontAwesomeIcons.shoppingCart),
tooltip: "Order",
onPressed: _unsupported,
),
Text("Order"),
]
),
Column(
children: <Widget>[
IconButton(
icon: new FaIcon(FontAwesomeIcons.shippingFast),
tooltip: "Sell",
onPressed: _unsupported,
),
Text("Sell"),
]
)
],
),
Spacer(),
Row( Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,

View File

@ -1,6 +1,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'package:InvenTree/api.dart';
import 'login_settings.dart'; import 'login_settings.dart';
import 'package:package_info/package_info.dart'; import 'package:package_info/package_info.dart';
@ -56,6 +57,11 @@ class _InvenTreeSettingsState extends State<InvenTreeSettingsWidget> {
child: new SimpleDialog( child: new SimpleDialog(
title: new Text("About InvenTree"), title: new Text("About InvenTree"),
children: <Widget>[ children: <Widget>[
ListTile(
title: Text("Server Version"),
subtitle: Text(InvenTreeAPI().version.isNotEmpty ? InvenTreeAPI().version : "Not connected"),
),
Divider(),
ListTile( ListTile(
title: Text("App Name"), title: Text("App Name"),
subtitle: Text("${info.appName}"), subtitle: Text("${info.appName}"),
@ -72,6 +78,7 @@ class _InvenTreeSettingsState extends State<InvenTreeSettingsWidget> {
title: Text("Build Number"), title: Text("Build Number"),
subtitle: Text("${info.buildNumber}") subtitle: Text("${info.buildNumber}")
), ),
Divider(),
ListTile( ListTile(
title: Text("Submit Bug Report"), title: Text("Submit Bug Report"),
subtitle: Text("Submit a bug report or feature request at:\n https://github.com/inventree/inventree-app/issues/"), subtitle: Text("Submit a bug report or feature request at:\n https://github.com/inventree/inventree-app/issues/"),