mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-12 18:25:26 +00:00
Add web link to InvenTree documentation
This commit is contained in:
2
lib/l10n
2
lib/l10n
Submodule lib/l10n updated: 8114d3a69d...0a19608723
@ -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();
|
||||
|
Reference in New Issue
Block a user