Help pages links
This commit is contained in:
@ -415,7 +415,10 @@ class _MainPageState extends State<MainPage> with WidgetsBindingObserver, Ticker
|
|||||||
title: Text("Help"),
|
title: Text("Help"),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
Launcher.launchURL("http://ha-client.app/docs");
|
Launcher.launchURLInCustomTab(
|
||||||
|
context: context,
|
||||||
|
url: "http://ha-client.app/help"
|
||||||
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
new ListTile(
|
new ListTile(
|
||||||
|
@ -48,25 +48,30 @@ class _AppSettingsPageState extends State<AppSettingsPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
Widget section;
|
Widget section;
|
||||||
String title;
|
String title;
|
||||||
|
String helpUrl;
|
||||||
switch (_currentSection) {
|
switch (_currentSection) {
|
||||||
case AppSettingsSection.menu: {
|
case AppSettingsSection.menu: {
|
||||||
section = _buildMenu(context);
|
section = _buildMenu(context);
|
||||||
title = 'App settings';
|
title = 'App settings';
|
||||||
|
helpUrl = 'https://ha-client.app/help/';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case AppSettingsSection.connectionSettings: {
|
case AppSettingsSection.connectionSettings: {
|
||||||
section = ConnectionSettingsPage();
|
section = ConnectionSettingsPage();
|
||||||
title = 'App settings - Connection';
|
title = 'App settings - Connection';
|
||||||
|
helpUrl = 'https://ha-client.app/help/connection';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case AppSettingsSection.integrationSettings: {
|
case AppSettingsSection.integrationSettings: {
|
||||||
section = IntegrationSettingsPage();
|
section = IntegrationSettingsPage();
|
||||||
title = 'App settings - Integration';
|
title = 'App settings - Integration';
|
||||||
|
helpUrl = 'https://ha-client.app/help/mobile_app_integration';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case AppSettingsSection.lookAndFeel: {
|
case AppSettingsSection.lookAndFeel: {
|
||||||
section = LookAndFeelSettingsPage();
|
section = LookAndFeelSettingsPage();
|
||||||
title = 'App settings - Look&Feel';
|
title = 'App settings - Look&Feel';
|
||||||
|
helpUrl = 'https://ha-client.app/help/';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
@ -86,6 +91,17 @@ class _AppSettingsPageState extends State<AppSettingsPage> {
|
|||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
title: Text(title),
|
title: Text(title),
|
||||||
|
actions: <Widget>[
|
||||||
|
IconButton(
|
||||||
|
icon: Icon(Icons.help),
|
||||||
|
onPressed: () {
|
||||||
|
Launcher.launchURLInCustomTab(
|
||||||
|
context: context,
|
||||||
|
url: helpUrl
|
||||||
|
);
|
||||||
|
},
|
||||||
|
)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
body: section
|
body: section
|
||||||
),
|
),
|
||||||
|
Reference in New Issue
Block a user