-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Add support for custom themes to use dark mode #8347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
1279321
36b1f6b
66facd6
745598a
365786e
a665d2e
14d81e2
a7ffd2c
4cab2ec
d89dd5b
bd3cbc1
dfc8d66
671b19b
2b31a89
ec3b0c8
634482c
9d393d3
18fa413
0bdb5c4
009e1a3
89ef813
f461e52
9432a26
3b0df20
524942b
1535178
b7146e7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -108,7 +108,7 @@ class LocationEditor extends LitElement { | |
|
|
||
| if (changedProps.has("hass")) { | ||
| const oldHass = changedProps.get("hass") as HomeAssistant | undefined; | ||
| if (!oldHass || oldHass.themes?.darkMode === this.hass.themes?.darkMode) { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this no longer needed? We still init
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should not have been needed before the PR either. Basically no usages of |
||
| if (!oldHass || oldHass.themes.darkMode === this.hass.themes.darkMode) { | ||
| return; | ||
| } | ||
| if (!this._leafletMap || !this._tileLayer) { | ||
|
|
@@ -118,7 +118,7 @@ class LocationEditor extends LitElement { | |
| this.Leaflet, | ||
| this._leafletMap, | ||
| this._tileLayer, | ||
| this.hass.themes?.darkMode | ||
| this.hass.themes.darkMode | ||
| ); | ||
| } | ||
| } | ||
|
|
@@ -130,7 +130,7 @@ class LocationEditor extends LitElement { | |
| private async _initMap(): Promise<void> { | ||
| [this._leafletMap, this.Leaflet, this._tileLayer] = await setupLeafletMap( | ||
| this._mapEl, | ||
| this.darkMode ?? this.hass.themes?.darkMode, | ||
| this.darkMode ?? this.hass.themes.darkMode, | ||
| Boolean(this.radius) | ||
| ); | ||
| this._leafletMap.addEventListener( | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.