@mp-consulting/homebridge-daikin-cloud 1.3.14 → 1.3.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4,6 +4,13 @@
|
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
6
|
<title>Daikin Cloud</title>
|
|
7
|
+
<!-- Detect theme before CSS renders to avoid flash of wrong theme -->
|
|
8
|
+
<script>
|
|
9
|
+
(function () {
|
|
10
|
+
var dark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
11
|
+
document.documentElement.dataset.bsTheme = dark ? 'dark' : 'light';
|
|
12
|
+
}());
|
|
13
|
+
</script>
|
|
7
14
|
<link rel="stylesheet" href="lib/kit.css">
|
|
8
15
|
<link rel="stylesheet" href="styles.css">
|
|
9
16
|
</head>
|
|
@@ -1138,6 +1138,19 @@ function cacheElements() {
|
|
|
1138
1138
|
}
|
|
1139
1139
|
|
|
1140
1140
|
document.addEventListener('DOMContentLoaded', async () => {
|
|
1141
|
+
// Confirm theme from Homebridge settings (overrides the early OS-preference detection)
|
|
1142
|
+
try {
|
|
1143
|
+
const settings = await homebridge.getUserSettings();
|
|
1144
|
+
const scheme = settings.colorScheme;
|
|
1145
|
+
if (scheme === 'dark' || scheme === 'light') {
|
|
1146
|
+
document.documentElement.dataset.bsTheme = scheme;
|
|
1147
|
+
} else if (scheme === 'auto') {
|
|
1148
|
+
document.documentElement.dataset.bsTheme =
|
|
1149
|
+
window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
|
1150
|
+
}
|
|
1151
|
+
} catch {
|
|
1152
|
+
// getUserSettings not available in older versions — keep the early-detected theme
|
|
1153
|
+
}
|
|
1141
1154
|
cacheElements();
|
|
1142
1155
|
Auth.loadStatus();
|
|
1143
1156
|
Config.load();
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"displayName": "Daikin Cloud",
|
|
3
3
|
"platformname": "daikincloud",
|
|
4
4
|
"name": "@mp-consulting/homebridge-daikin-cloud",
|
|
5
|
-
"version": "1.3.
|
|
5
|
+
"version": "1.3.15",
|
|
6
6
|
"description": "Integrate with the Daikin Cloud to control your Daikin air conditioning via the cloud",
|
|
7
7
|
"license": "(Apache-2.0 AND MIT)",
|
|
8
8
|
"repository": {
|