Remove bottom bar for webview
This commit is contained in:
		| @@ -15,6 +15,7 @@ class ConnectionManager { | |||||||
|   String displayHostname; |   String displayHostname; | ||||||
|   String _webSocketAPIEndpoint; |   String _webSocketAPIEndpoint; | ||||||
|   String httpWebHost; |   String httpWebHost; | ||||||
|  |   String httpWebHostWithExtAuth; | ||||||
|   String _token; |   String _token; | ||||||
|   String _tempToken; |   String _tempToken; | ||||||
|   String oauthUrl; |   String oauthUrl; | ||||||
| @@ -51,6 +52,12 @@ class ConnectionManager { | |||||||
|       "${prefs.getString('hassio-protocol')}://$_domain:$_port/api/websocket"; |       "${prefs.getString('hassio-protocol')}://$_domain:$_port/api/websocket"; | ||||||
|       httpWebHost = |       httpWebHost = | ||||||
|       "${prefs.getString('hassio-res-protocol')}://$_domain:$_port"; |       "${prefs.getString('hassio-res-protocol')}://$_domain:$_port"; | ||||||
|  |       httpWebHostWithExtAuth = httpWebHost; | ||||||
|  |       if (httpWebHostWithExtAuth.contains("?")) { | ||||||
|  |         httpWebHostWithExtAuth += "&external_auth=1"; | ||||||
|  |       } else { | ||||||
|  |         httpWebHostWithExtAuth += "?external_auth=1"; | ||||||
|  |       } | ||||||
|       if ((_domain == null) || (_port == null) || |       if ((_domain == null) || (_port == null) || | ||||||
|           (_domain.isEmpty) || (_port.isEmpty)) { |           (_domain.isEmpty) || (_port.isEmpty)) { | ||||||
|         completer.completeError(HAError.checkConnectionSettings()); |         completer.completeError(HAError.checkConnectionSettings()); | ||||||
|   | |||||||
| @@ -867,18 +867,11 @@ class _MainPageState extends State<MainPage> with WidgetsBindingObserver, Ticker | |||||||
|           ) |           ) | ||||||
|       ); |       ); | ||||||
|     } else if (ConnectionManager().settingsLoaded && ConnectionManager().useWebView) { |     } else if (ConnectionManager().settingsLoaded && ConnectionManager().useWebView) { | ||||||
|       String webUIurl = ConnectionManager().httpWebHost; |  | ||||||
|       if (webUIurl.contains("?")) { |  | ||||||
|         webUIurl += "&external_auth=1"; |  | ||||||
|       } else { |  | ||||||
|         webUIurl += "?external_auth=1"; |  | ||||||
|       } |  | ||||||
|       return WebviewScaffold( |       return WebviewScaffold( | ||||||
|         url: webUIurl, |         url: ConnectionManager().httpWebHostWithExtAuth, | ||||||
|         primary: false, |         primary: false, | ||||||
|         debuggingEnabled: true, |         debuggingEnabled: true, | ||||||
|         appBar: EmptyAppBar(), |         appBar: EmptyAppBar() | ||||||
|         bottomNavigationBar: bottomBar, |  | ||||||
|       ); |       ); | ||||||
|     } else { |     } else { | ||||||
|       if (HomeAssistant().isNoViews) { |       if (HomeAssistant().isNoViews) { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user