mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 11:36:24 +00:00
Add web link to InvenTree documentation
This commit is contained in:
parent
57eae6f065
commit
822d1be2e2
4 changed files with 26 additions and 3 deletions
|
|
@ -10,6 +10,7 @@ import 'package:flutter/services.dart';
|
|||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:sentry_flutter/sentry_flutter.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
import 'login.dart';
|
||||
|
||||
|
|
@ -29,6 +30,8 @@ class _InvenTreeSettingsState extends State<InvenTreeSettingsWidget> {
|
|||
final _scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
final _bugKey = GlobalKey<FormState>();
|
||||
|
||||
final String docsUrl = "https://inventree.rtfd.io";
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
|
|
@ -54,6 +57,15 @@ class _InvenTreeSettingsState extends State<InvenTreeSettingsWidget> {
|
|||
onTap: _about,
|
||||
),
|
||||
|
||||
ListTile(
|
||||
title: Text(I18N.of(context).documentation),
|
||||
subtitle: Text(docsUrl),
|
||||
leading: FaIcon(FontAwesomeIcons.book),
|
||||
onTap: () {
|
||||
_openDocs();
|
||||
},
|
||||
),
|
||||
|
||||
ListTile(
|
||||
title: Text(I18N.of(context).reportBug),
|
||||
subtitle: Text("Report bug or suggest new feature"),
|
||||
|
|
@ -67,6 +79,13 @@ class _InvenTreeSettingsState extends State<InvenTreeSettingsWidget> {
|
|||
);
|
||||
}
|
||||
|
||||
|
||||
void _openDocs() async {
|
||||
if (await canLaunch(docsUrl)) {
|
||||
await launch(docsUrl);
|
||||
}
|
||||
}
|
||||
|
||||
void _editServerSettings() async {
|
||||
|
||||
List<UserProfile> profiles = await UserProfileDBManager().getAllProfiles();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue