Move to ha-client.app

This commit is contained in:
Yegor Vialov 2020-02-12 13:22:26 +00:00
parent c8d7e1a95f
commit f495a6affc
7 changed files with 13 additions and 13 deletions

View File

@ -69,7 +69,7 @@ class HomeAssistant {
_fetchCompleter.complete();
MobileAppIntegrationManager.checkAppRegistration();
} else {
_fetchCompleter.completeError(HAError("Mobile app component not found", actions: [HAErrorAction.tryAgain(), HAErrorAction(type: HAErrorActionType.URL ,title: "Help",url: "http://ha-client.estevez.dev/docs#mobile-app-integration")]));
_fetchCompleter.completeError(HAError("Mobile app component not found", actions: [HAErrorAction.tryAgain(), HAErrorAction(type: HAErrorActionType.URL ,title: "Help",url: "http://ha-client.app/docs#mobile-app-integration")]));
}
}).catchError((e) {
_fetchCompleter.completeError(e);

View File

@ -244,7 +244,7 @@ class _HAClientAppState extends State<HAClientApp> {
appBar: new AppBar(
leading: IconButton(
icon: Icon(Icons.help),
onPressed: () => Launcher.launchURLInCustomTab(context: context, url: "http://ha-client.estevez.dev/docs#authentication")
onPressed: () => Launcher.launchURLInCustomTab(context: context, url: "http://ha-client.app/docs#authentication")
),
title: new Text("Login with HA"),
actions: <Widget>[

View File

@ -14,7 +14,7 @@ class AuthManager {
Completer completer = Completer();
final flutterWebviewPlugin = new FlutterWebviewPlugin();
flutterWebviewPlugin.onUrlChanged.listen((String url) {
if (url.startsWith("https://ha-client.estevez.dev/service/auth_callback.html")) {
if (url.startsWith("https://ha-client.app/service/auth_callback.html")) {
Logger.d("url=$url");
String authCode = url.split("=")[1];
Logger.d("authCode=$authCode");
@ -23,7 +23,7 @@ class AuthManager {
endPoint: "/auth/token",
contentType: "application/x-www-form-urlencoded",
includeAuthHeader: false,
data: "grant_type=authorization_code&code=$authCode&client_id=${Uri.encodeComponent('https://ha-client.estevez.dev')}"
data: "grant_type=authorization_code&code=$authCode&client_id=${Uri.encodeComponent('https://ha-client.app')}"
).then((response) {
Logger.d("Got temp token");
String tempToken = json.decode(response)['access_token'];

View File

@ -61,9 +61,9 @@ class ConnectionManager {
_token = await storage.read(key: "hacl_llt");
Logger.e("Long-lived token read successful");
oauthUrl = "$httpWebHost/auth/authorize?client_id=${Uri.encodeComponent(
'https://ha-client.estevez.dev')}&redirect_uri=${Uri
'https://ha-client.app')}&redirect_uri=${Uri
.encodeComponent(
'https://ha-client.estevez.dev/service/auth_callback.html')}";
'https://ha-client.app/service/auth_callback.html')}";
settingsLoaded = true;
} catch (e) {
completer.completeError(HAError("Error reading login details", actions: [HAErrorAction.tryAgain(type: HAErrorActionType.FULL_RELOAD), HAErrorAction.loginAgain()]));

View File

@ -118,7 +118,7 @@ class _IntegrationSettingsPageState extends State<IntegrationSettingsPage> {
Text("Location tracking", style: TextStyle(fontSize: Sizes.largeFontSize-2)),
Container(height: Sizes.rowPadding,),
InkWell(
onTap: () => Launcher.launchURLInCustomTab(context: context, url: "http://ha-client.estevez.dev/docs#location-tracking"),
onTap: () => Launcher.launchURLInCustomTab(context: context, url: "http://ha-client.app/docs#location-tracking"),
child: Text(
"Please read documentation!",
style: TextStyle(

View File

@ -438,7 +438,7 @@ class _MainPageState extends State<MainPage> with WidgetsBindingObserver, Ticker
title: Text("Help"),
onTap: () {
Navigator.of(context).pop();
Launcher.launchURL("http://ha-client.estevez.dev/docs");
Launcher.launchURL("http://ha-client.app/docs");
},
),
new ListTile(
@ -454,10 +454,10 @@ class _MainPageState extends State<MainPage> with WidgetsBindingObserver, Ticker
GestureDetector(
onTap: () {
Navigator.of(context).pop();
Launcher.launchURL("http://ha-client.estevez.dev/");
Launcher.launchURL("http://ha-client.app/");
},
child: Text(
"ha-client.estevez.dev",
"ha-client.app",
style: TextStyle(
color: Colors.blue,
decoration: TextDecoration.underline
@ -470,7 +470,7 @@ class _MainPageState extends State<MainPage> with WidgetsBindingObserver, Ticker
GestureDetector(
onTap: () {
Navigator.of(context).pop();
Launcher.launchURLInCustomTab(context: context, url: "http://ha-client.estevez.dev/terms_and_conditions");
Launcher.launchURLInCustomTab(context: context, url: "http://ha-client.app/terms_and_conditions");
},
child: Text(
"Terms and Conditions",
@ -486,7 +486,7 @@ class _MainPageState extends State<MainPage> with WidgetsBindingObserver, Ticker
GestureDetector(
onTap: () {
Navigator.of(context).pop();
Launcher.launchURLInCustomTab(context: context, url: "http://ha-client.estevez.dev/privacy_policy");
Launcher.launchURLInCustomTab(context: context, url: "http://ha-client.app/privacy_policy");
},
child: Text(
"Privacy Policy",

View File

@ -24,7 +24,7 @@ class _WhatsNewPageState extends State<WhatsNewPage> {
error = "";
});
http.Response response;
response = await http.get("http://ha-client.estevez.dev/service/whats_new_0.7.0.md");
response = await http.get("http://ha-client.app/service/whats_new_0.7.0.md");
if (response.statusCode == 200) {
setState(() {
data = response.body;