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:
parent
15d5bf3fb5
commit
0cc210cf2b
@ -194,8 +194,19 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
Navigator.push(context, MaterialPageRoute(builder: (context) => LocationDisplayWidget(null)));
|
||||
}
|
||||
|
||||
void _suppliers() {
|
||||
// TODO
|
||||
void _unsupported() {
|
||||
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
|
||||
@ -259,7 +270,7 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
Column(
|
||||
children: <Widget>[
|
||||
IconButton(
|
||||
icon: new Icon(Icons.category),
|
||||
icon: new FaIcon(FontAwesomeIcons.shapes),
|
||||
tooltip: 'Parts',
|
||||
onPressed: _parts,
|
||||
),
|
||||
@ -281,7 +292,7 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
IconButton(
|
||||
icon: new FaIcon(FontAwesomeIcons.industry),
|
||||
tooltip: 'Suppliers',
|
||||
onPressed: _suppliers,
|
||||
onPressed: _unsupported,
|
||||
),
|
||||
Text("Suppliers"),
|
||||
]
|
||||
@ -289,6 +300,42 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
],
|
||||
),
|
||||
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(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
|
@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
import 'package:InvenTree/api.dart';
|
||||
import 'login_settings.dart';
|
||||
|
||||
import 'package:package_info/package_info.dart';
|
||||
@ -56,6 +57,11 @@ class _InvenTreeSettingsState extends State<InvenTreeSettingsWidget> {
|
||||
child: new SimpleDialog(
|
||||
title: new Text("About InvenTree"),
|
||||
children: <Widget>[
|
||||
ListTile(
|
||||
title: Text("Server Version"),
|
||||
subtitle: Text(InvenTreeAPI().version.isNotEmpty ? InvenTreeAPI().version : "Not connected"),
|
||||
),
|
||||
Divider(),
|
||||
ListTile(
|
||||
title: Text("App Name"),
|
||||
subtitle: Text("${info.appName}"),
|
||||
@ -72,6 +78,7 @@ class _InvenTreeSettingsState extends State<InvenTreeSettingsWidget> {
|
||||
title: Text("Build Number"),
|
||||
subtitle: Text("${info.buildNumber}")
|
||||
),
|
||||
Divider(),
|
||||
ListTile(
|
||||
title: Text("Submit Bug Report"),
|
||||
subtitle: Text("Submit a bug report or feature request at:\n https://github.com/inventree/inventree-app/issues/"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user