0.8.3
This commit is contained in:
parent
5f23e108a1
commit
fba4017819
@ -149,7 +149,7 @@ EventBus eventBus = new EventBus();
|
|||||||
final FirebaseMessaging _firebaseMessaging = FirebaseMessaging();
|
final FirebaseMessaging _firebaseMessaging = FirebaseMessaging();
|
||||||
FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin = new FlutterLocalNotificationsPlugin();
|
FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin = new FlutterLocalNotificationsPlugin();
|
||||||
const String appName = "HA Client";
|
const String appName = "HA Client";
|
||||||
const appVersionNumber = "0.8.2";
|
const appVersionNumber = "0.8.3";
|
||||||
const appVersionAdd = "";
|
const appVersionAdd = "";
|
||||||
const appVersion = "$appVersionNumber$appVersionAdd";
|
const appVersion = "$appVersionNumber$appVersionAdd";
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ class StartupUserMessagesManager {
|
|||||||
bool _supportAppDevelopmentMessageShown;
|
bool _supportAppDevelopmentMessageShown;
|
||||||
bool _whatsNewMessageShown;
|
bool _whatsNewMessageShown;
|
||||||
static final _supportAppDevelopmentMessageKey = "user-message-shown-support-development_3";
|
static final _supportAppDevelopmentMessageKey = "user-message-shown-support-development_3";
|
||||||
static final _whatsNewMessageKey = "user-message-shown-whats-new-887";
|
static final _whatsNewMessageKey = "user-message-shown-whats-new-888";
|
||||||
|
|
||||||
void checkMessagesToShow() async {
|
void checkMessagesToShow() async {
|
||||||
SharedPreferences prefs = await SharedPreferences.getInstance();
|
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||||
|
@ -84,17 +84,17 @@ class HAClientTheme {
|
|||||||
return darkTheme;
|
return darkTheme;
|
||||||
break;
|
break;
|
||||||
case AppTheme.defaultTheme:
|
case AppTheme.defaultTheme:
|
||||||
return lightTheme;
|
return defaultTheme;
|
||||||
break;
|
break;
|
||||||
case AppTheme.haTheme:
|
case AppTheme.haTheme:
|
||||||
return lightTheme;
|
return homeAssistantTheme;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return lightTheme;
|
return defaultTheme;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final ThemeData lightTheme = ThemeData.from(
|
final ThemeData defaultTheme = ThemeData.from(
|
||||||
colorScheme: ColorScheme(
|
colorScheme: ColorScheme(
|
||||||
primary: Color.fromRGBO(112, 154, 193, 1),
|
primary: Color.fromRGBO(112, 154, 193, 1),
|
||||||
primaryVariant: Color.fromRGBO(68, 115, 158, 1),
|
primaryVariant: Color.fromRGBO(68, 115, 158, 1),
|
||||||
@ -125,6 +125,37 @@ class HAClientTheme {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
final ThemeData homeAssistantTheme = ThemeData.from(
|
||||||
|
colorScheme: ColorScheme(
|
||||||
|
primary: Color.fromRGBO(2, 165, 238, 1),
|
||||||
|
primaryVariant: Color.fromRGBO(68, 115, 158, 1),
|
||||||
|
secondary: Color.fromRGBO(253, 216, 53, 1),
|
||||||
|
secondaryVariant: Color.fromRGBO(222, 181, 2, 1),
|
||||||
|
background: Color.fromRGBO(250, 250, 250, 1),
|
||||||
|
surface: Colors.white,
|
||||||
|
error: Colors.red,
|
||||||
|
onPrimary: Colors.white,
|
||||||
|
onSecondary: Colors.black87,
|
||||||
|
onBackground: Colors.black87,
|
||||||
|
onSurface: Colors.black87,
|
||||||
|
onError: Colors.white,
|
||||||
|
brightness: Brightness.light
|
||||||
|
),
|
||||||
|
textTheme: ThemeData.light().textTheme.copyWith(
|
||||||
|
display1: textTheme.display1.copyWith(color: Colors.black54),
|
||||||
|
display2: textTheme.display2.copyWith(color: Colors.redAccent),
|
||||||
|
headline: textTheme.headline.copyWith(color: Colors.black87),
|
||||||
|
title: textTheme.title.copyWith(color: Colors.black87),
|
||||||
|
subhead: textTheme.subhead.copyWith(color: Colors.black54),
|
||||||
|
body1: textTheme.body1.copyWith(color: Colors.black87),
|
||||||
|
body2: textTheme.body2.copyWith(color: Colors.black87),
|
||||||
|
subtitle: textTheme.subtitle.copyWith(color: Colors.black45),
|
||||||
|
caption: textTheme.caption.copyWith(color: Colors.black45),
|
||||||
|
overline: textTheme.overline.copyWith(color: Colors.black26),
|
||||||
|
button: textTheme.button.copyWith(color: Colors.white),
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
final ThemeData darkTheme = ThemeData.from(
|
final ThemeData darkTheme = ThemeData.from(
|
||||||
colorScheme: ColorScheme(
|
colorScheme: ColorScheme(
|
||||||
primary: Color.fromRGBO(112, 154, 193, 1),
|
primary: Color.fromRGBO(112, 154, 193, 1),
|
||||||
|
@ -18,8 +18,6 @@ class _ConnectionSettingsPageState extends State<ConnectionSettingsPage> {
|
|||||||
String _newSocketProtocol = "wss";
|
String _newSocketProtocol = "wss";
|
||||||
String _longLivedToken = "";
|
String _longLivedToken = "";
|
||||||
String _newLongLivedToken = "";
|
String _newLongLivedToken = "";
|
||||||
bool _useLovelace = true;
|
|
||||||
bool _newUseLovelace = true;
|
|
||||||
|
|
||||||
String oauthUrl;
|
String oauthUrl;
|
||||||
bool useOAuth = false;
|
bool useOAuth = false;
|
||||||
@ -55,11 +53,6 @@ class _ConnectionSettingsPageState extends State<ConnectionSettingsPage> {
|
|||||||
_hassioDomain = _newHassioDomain = prefs.getString("hassio-domain")?? "";
|
_hassioDomain = _newHassioDomain = prefs.getString("hassio-domain")?? "";
|
||||||
_hassioPort = _newHassioPort = prefs.getString("hassio-port") ?? "";
|
_hassioPort = _newHassioPort = prefs.getString("hassio-port") ?? "";
|
||||||
_socketProtocol = _newSocketProtocol = prefs.getString("hassio-protocol") ?? 'wss';
|
_socketProtocol = _newSocketProtocol = prefs.getString("hassio-protocol") ?? 'wss';
|
||||||
try {
|
|
||||||
_useLovelace = _newUseLovelace = prefs.getBool("use-lovelace") ?? true;
|
|
||||||
} catch (e) {
|
|
||||||
_useLovelace = _newUseLovelace = true;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,7 +61,6 @@ class _ConnectionSettingsPageState extends State<ConnectionSettingsPage> {
|
|||||||
(_newHassioPort != _hassioPort) ||
|
(_newHassioPort != _hassioPort) ||
|
||||||
(_newHassioDomain != _hassioDomain) ||
|
(_newHassioDomain != _hassioDomain) ||
|
||||||
(_newSocketProtocol != _socketProtocol) ||
|
(_newSocketProtocol != _socketProtocol) ||
|
||||||
(_newUseLovelace != _useLovelace) ||
|
|
||||||
(_newLongLivedToken != _longLivedToken));
|
(_newLongLivedToken != _longLivedToken));
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -103,7 +95,6 @@ class _ConnectionSettingsPageState extends State<ConnectionSettingsPage> {
|
|||||||
prefs.setString("hassio-port", _newHassioPort);
|
prefs.setString("hassio-port", _newHassioPort);
|
||||||
prefs.setString("hassio-protocol", _newSocketProtocol);
|
prefs.setString("hassio-protocol", _newSocketProtocol);
|
||||||
prefs.setString("hassio-res-protocol", _newSocketProtocol == "wss" ? "https" : "http");
|
prefs.setString("hassio-res-protocol", _newSocketProtocol == "wss" ? "https" : "http");
|
||||||
prefs.setBool("use-lovelace", _newUseLovelace);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -151,26 +142,6 @@ class _ConnectionSettingsPageState extends State<ConnectionSettingsPage> {
|
|||||||
"Try ports 80 and 443 if default is not working and you don't know why.",
|
"Try ports 80 and 443 if default is not working and you don't know why.",
|
||||||
style: Theme.of(context).textTheme.caption,
|
style: Theme.of(context).textTheme.caption,
|
||||||
),
|
),
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.only(top: 20.0),
|
|
||||||
child: Text(
|
|
||||||
"UI",
|
|
||||||
style: Theme.of(context).textTheme.headline,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
new Row(
|
|
||||||
children: [
|
|
||||||
Text("Use Lovelace UI"),
|
|
||||||
Switch(
|
|
||||||
value: _newUseLovelace,
|
|
||||||
onChanged: (value) {
|
|
||||||
setState(() {
|
|
||||||
_newUseLovelace = value;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
Text(
|
Text(
|
||||||
"Authentication settings",
|
"Authentication settings",
|
||||||
style: Theme.of(context).textTheme.headline,
|
style: Theme.of(context).textTheme.headline,
|
||||||
|
@ -52,7 +52,7 @@ class _LookAndFeelSettingsPageState extends State<LookAndFeelSettingsPage> {
|
|||||||
scrollDirection: Axis.vertical,
|
scrollDirection: Axis.vertical,
|
||||||
padding: const EdgeInsets.all(20.0),
|
padding: const EdgeInsets.all(20.0),
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Text("Application scheme:", style: Theme.of(context).textTheme.body2),
|
Text("Application theme:", style: Theme.of(context).textTheme.body2),
|
||||||
Container(height: Sizes.rowPadding),
|
Container(height: Sizes.rowPadding),
|
||||||
DropdownButton<AppTheme>(
|
DropdownButton<AppTheme>(
|
||||||
value: _currentTheme,
|
value: _currentTheme,
|
||||||
|
@ -24,7 +24,7 @@ class _WhatsNewPageState extends State<WhatsNewPage> {
|
|||||||
error = "";
|
error = "";
|
||||||
});
|
});
|
||||||
http.Response response;
|
http.Response response;
|
||||||
response = await http.get("http://ha-client.app/service/whats_new_0.8.2.md");
|
response = await http.get("http://ha-client.app/service/whats_new_0.8.3.md");
|
||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
setState(() {
|
setState(() {
|
||||||
data = response.body;
|
data = response.body;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
name: hass_client
|
name: hass_client
|
||||||
description: Home Assistant Android Client
|
description: Home Assistant Android Client
|
||||||
|
|
||||||
version: 0.8.2+887
|
version: 0.8.3+888
|
||||||
|
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
|
Reference in New Issue
Block a user