2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-12 02:05:29 +00:00

Display a "launch" screen if server is not connected

This commit is contained in:
Oliver Walters
2022-05-09 20:37:57 +10:00
parent 97b4eefc13
commit 347d2175be
3 changed files with 47 additions and 3 deletions

View File

@ -193,6 +193,7 @@ class InvenTreeAPI {
UserProfile? profile;
// Available user roles (permissions) are loaded when connecting to the server
Map<String, dynamic> roles = {};
// Authentication token (initially empty, must be requested)
@ -454,6 +455,9 @@ class InvenTreeAPI {
profile = null;
}
/*
* Public facing connection function
*/
Future<bool> connectToServer() async {
// Ensure server is first disconnected