Skip to content

Commit

Permalink
Quickfix for 2023.04
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasloven committed Mar 30, 2023
1 parent dd85bd1 commit cb9778d
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 13 deletions.
4 changes: 2 additions & 2 deletions card-mod.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion hacs.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "card-mod",
"render_readme": true
"render_readme": true,
"homeassistant": "2023.04.0b0"
}
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "card-mod",
"private": true,
"version": "3.2.0",
"version": "3.2.1",
"description": "",
"scripts": {
"build": "rollup -c",
Expand Down
2 changes: 1 addition & 1 deletion src/patch/ha-sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ customElements.whenDefined("ha-sidebar").then(() => {

selectTree(
document,
"home-assistant$home-assistant-main$app-drawer-layout app-drawer ha-sidebar",
"home-assistant$home-assistant-main$mwc-drawer ha-sidebar",
false
).then((root) => root?.firstUpdated());
});
2 changes: 1 addition & 1 deletion src/patch/hui-root.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ customElements.whenDefined("hui-root").then(() => {

selectTree(
document,
"home-assistant$home-assistant-main$app-drawer-layout partial-panel-resolver ha-panel-lovelace$hui-root",
"home-assistant$home-assistant-main$mwc-drawer partial-panel-resolver ha-panel-lovelace$hui-root",
false
).then((root: any) => {
root?.firstUpdated();
Expand Down
6 changes: 3 additions & 3 deletions src/patch/hui-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ customElements.whenDefined("hui-view").then(() => {
if (HuiView.prototype.cardmod_patched) return;
HuiView.prototype.cardmod_patched = true;

const _firstUpdated = HuiView.prototype.firstUpdated;
HuiView.prototype.firstUpdated = function (...args) {
const _firstUpdated = HuiView.prototype.updated;
HuiView.prototype.updated = function (...args) {
_firstUpdated?.bind(this)(...args);
applyToElement(this, "view");
applyToElement(this, "view", "", {}, null, false);
};
});
6 changes: 3 additions & 3 deletions test/themes/art-nouveau.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,17 @@ art-nouveau:
}
card-mod-root: |
ha-app-layout {
ha-app-layout, #view {
background: var(--background-image);
background-size: 300px;
}
app-header {
app-header, .header {
background: var(--theme-card-background) !important;
border-bottom: var(--theme-thick-border);
padding-bottom: 3px;
transform: none !important;
}
app-toolbar {
app-toolbar, .toolbar {
background: none !important;
border-bottom: var(--theme-thin-border)
}
Expand Down

0 comments on commit cb9778d

Please sign in to comment.