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

Adds skeleton for "app settings" view

This commit is contained in:
Oliver Walters
2021-03-02 22:57:45 +11:00
parent a5406734eb
commit 194be50337
4 changed files with 90 additions and 9 deletions

View File

@ -1,4 +1,5 @@
import 'package:InvenTree/settings/about.dart';
import 'package:InvenTree/settings/app_settings.dart';
import 'package:InvenTree/settings/login.dart';
import 'package:InvenTree/user_profile.dart';
@ -39,11 +40,17 @@ class _InvenTreeSettingsState extends State<InvenTreeSettingsWidget> {
context: context,
tiles: <Widget>[
ListTile(
title: Text(I18N.of(context).profile),
subtitle: Text("Configure user profile settings"),
leading: FaIcon(FontAwesomeIcons.user),
title: Text(I18N.of(context).server),
subtitle: Text("Configure server settings"),
leading: FaIcon(FontAwesomeIcons.server),
onTap: _editServerSettings,
),
ListTile(
leading: FaIcon(FontAwesomeIcons.cogs),
title: Text(I18N.of(context).appSettings),
subtitle: Text(I18N.of(context).appSettingsDetails),
onTap: _editAppSettings,
),
ListTile(
title: Text(I18N.of(context).about),
subtitle: Text(I18N.of(context).appDetails),
@ -76,11 +83,13 @@ class _InvenTreeSettingsState extends State<InvenTreeSettingsWidget> {
void _editServerSettings() async {
List<UserProfile> profiles = await UserProfileDBManager().getAllProfiles();
Navigator.push(context, MaterialPageRoute(builder: (context) => InvenTreeLoginSettingsWidget()));
}
void _editAppSettings() async {
Navigator.push(context, MaterialPageRoute(builder: (context) => InvenTreeAppSettingsWidget()));
}
void _about() async {
PackageInfo.fromPlatform().then((PackageInfo info) {