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

Server login now references the UserProfile class

This commit is contained in:
Oliver Walters
2021-02-08 22:03:14 +11:00
parent 7fe1b32bf6
commit d5649af2f9
7 changed files with 45 additions and 154 deletions

View File

@ -60,25 +60,6 @@ class _InvenTreeSettingsState extends State<InvenTreeSettingsWidget> {
leading: FaIcon(FontAwesomeIcons.bug),
onTap: null,
),
ListTile(
title: Text("Throw Error"),
onTap: () {
throw("My custom error");
},
),
ListTile(
title: Text("add profile"),
onTap: () {
UserProfileDBManager().addProfile(
UserProfile(
name: "My Profile",
server: "https://127.0.0.1:8000",
username: "Oliver",
password: "hunter2",
)
);
},
)
],
)
)
@ -91,7 +72,7 @@ class _InvenTreeSettingsState extends State<InvenTreeSettingsWidget> {
List<UserProfile> profiles = await UserProfileDBManager().getAllProfiles();
Navigator.push(context, MaterialPageRoute(builder: (context) => InvenTreeLoginSettingsWidget(profiles, prefs)));
Navigator.push(context, MaterialPageRoute(builder: (context) => InvenTreeLoginSettingsWidget(profiles)));
}
void _about() async {