Skip to content

Commit

Permalink
Add classes to menu items to more easily identify in css
Browse files Browse the repository at this point in the history
  • Loading branch information
rgc99 committed Jul 29, 2024
1 parent 724ecab commit e310b62
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions src/irrigation-unlimited-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -631,15 +631,17 @@ export class IrrigationUnlimitedCard extends LitElement {
@click="${this._toggleMenu}"
></ha-icon>
<div class="iu-menu-content iu-hidden">
<div class="iu-menu-item">
<div class="iu-menu-item iu-enable">
<div class="iu-mc1">${loc.t("menu.enable.name")}</div>
<div class="iu-mc2"></div>
<div class="iu-mc3">
${this._renderEnabled(isEnabled, isBlocked)}
</div>
</div>
<div
class="iu-menu-item ${suspended === undefined ? "iu-hidden" : ""}"
class="iu-menu-item iu-suspend ${suspended === undefined
? "iu-hidden"
: ""}"
>
<div class="iu-mc1">${loc.t("menu.suspend.name")}</div>
<div class="iu-mc2">
Expand All @@ -664,7 +666,9 @@ export class IrrigationUnlimitedCard extends LitElement {
</ha-icon-button>
</div>
</div>
<div class="iu-menu-item ${!allowManual ? "iu-hidden" : ""}">
<div
class="iu-menu-item iu-manual ${!allowManual ? "iu-hidden" : ""}"
>
<div class="iu-mc1">${loc.t("menu.manual.name")}</div>
<div class="iu-mc2">
<input
Expand All @@ -689,7 +693,9 @@ export class IrrigationUnlimitedCard extends LitElement {
</div>
</div>
<div
class="iu-menu-item ${(~pauseResume & 1) > 0 ? "iu-hidden" : ""}"
class="iu-menu-item iu-pause ${(~pauseResume & 1) > 0
? "iu-hidden"
: ""}"
>
<div class="iu-mc1">${loc.t("menu.pause.name")}</div>
<div class="iu-mc2"></div>
Expand All @@ -704,7 +710,9 @@ export class IrrigationUnlimitedCard extends LitElement {
</div>
</div>
<div
class="iu-menu-item ${(~pauseResume & 2) > 0 ? "iu-hidden" : ""}"
class="iu-menu-item iu-resume ${(~pauseResume & 2) > 0
? "iu-hidden"
: ""}"
>
<div class="iu-mc1">${loc.t("menu.resume.name")}</div>
<div class="iu-mc2"></div>
Expand All @@ -718,7 +726,9 @@ export class IrrigationUnlimitedCard extends LitElement {
</ha-icon-button>
</div>
</div>
<div class="iu-menu-item ${!allowCancel ? "iu-hidden" : ""}">
<div
class="iu-menu-item iu-cancel ${!allowCancel ? "iu-hidden" : ""}"
>
<div class="iu-mc1">${loc.t("menu.cancel.name")}</div>
<div class="iu-mc2"></div>
<div class="iu-mc3">
Expand All @@ -732,7 +742,9 @@ export class IrrigationUnlimitedCard extends LitElement {
</div>
</div>
<div
class="iu-menu-item ${adjustment === undefined ? "iu-hidden" : ""}"
class="iu-menu-item iu-adjust ${adjustment === undefined
? "iu-hidden"
: ""}"
>
<div class="iu-mc1">${loc.t("menu.adjust.name")}</div>
<div class="iu-mc2">
Expand Down

0 comments on commit e310b62

Please sign in to comment.