mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 11:36:24 +00:00
Improve server status message
This commit is contained in:
parent
d536174fb9
commit
29c28aad91
1 changed files with 9 additions and 3 deletions
|
|
@ -146,6 +146,9 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||||
|
|
||||||
}).catchError((e) {
|
}).catchError((e) {
|
||||||
_serverConnection = false;
|
_serverConnection = false;
|
||||||
|
_serverStatusColor = Color.fromARGB(255, 250, 50, 50);
|
||||||
|
|
||||||
|
_serverStatus = "Error connecting to $_serverAddress";
|
||||||
|
|
||||||
if (e is TimeoutException) {
|
if (e is TimeoutException) {
|
||||||
_serverMessage = "No response from server";
|
_serverMessage = "No response from server";
|
||||||
|
|
@ -282,10 +285,13 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Text('$_serverStatus',
|
Text('$_serverStatus',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: _serverStatusColor,
|
color: _serverStatusColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text('$_serverMessage',
|
||||||
|
style: TextStyle(
|
||||||
|
color: _serverStatusColor,
|
||||||
),
|
),
|
||||||
),
|
|
||||||
Text('$_serverMessage'
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue