Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/components/process-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@ import { basename } from "../util/basename";
export class ESPHomeProcessDialog extends LitElement {
@property() public heading!: string;
@property() public spawnParams?: Record<string, any>;
@property() public type!: string;
@property() public type!:
| "validate"
| "logs"
| "upload"
| "clean-mqtt"
| "clean"
| "rename";

@property({ type: Boolean, attribute: "always-show-close" })
public alwaysShowClose = false;
Expand Down
8 changes: 7 additions & 1 deletion src/components/remote-process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ import { fireEvent } from "../util/fire-event";

@customElement("esphome-remote-process")
class ESPHomeRemoteProcess extends HTMLElement {
public type!: "validate" | "logs" | "upload" | "clean-mqtt" | "clean";
public type!:
| "validate"
| "logs"
| "upload"
| "clean-mqtt"
| "clean"
| "rename";
public spawnParams!: Record<string, any>;

private _coloredConsole?: ColoredConsole;
Expand Down
2 changes: 1 addition & 1 deletion src/devices/configured-device-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ class ESPHomeConfiguredDeviceCard extends LitElement {
padding: 0.2em 0.4em;
margin: 0;
font-size: 85%;
background-color: var(--card-background-color)
background-color: var(--card-background-color);
border-radius: 3px;
font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo,
Courier, monospace;
Expand Down
2 changes: 1 addition & 1 deletion src/install-choose/install-choose-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ class ESPHomeInstallChooseDialog extends LitElement {
<mwc-circular-progress
active
?indeterminate=${progress === undefined}
.progress=${progress !== undefined ? progress / 100 : undefined}
.progress=${progress !== undefined ? progress / 100 : 1}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be using the ifDefined helper from lit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tried adding ifDefined, but I get this error then:
image

not sure if this is a false-positive, but lit-plugin shows me many errors, including Type 'true' is not assignable to 'string' for empty scrimClickAction, ref: #303

density="8"
></mwc-circular-progress>
${progress !== undefined
Expand Down
2 changes: 1 addition & 1 deletion src/install-web/install-web-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export class ESPHomeInstallWebDialog extends LitElement {
<mwc-circular-progress
active
?indeterminate=${progress === undefined}
.progress=${progress !== undefined ? progress / 100 : undefined}
.progress=${progress !== undefined ? progress / 100 : 1}
density="8"
></mwc-circular-progress>
${progress !== undefined
Expand Down
6 changes: 4 additions & 2 deletions src/wizard/wizard-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export class ESPHomeWizardDialog extends LitElement {
<mwc-circular-progress
active
?indeterminate=${progress === undefined}
.progress=${progress !== undefined ? progress / 100 : undefined}
.progress=${progress !== undefined ? progress / 100 : 1}
density="8"
></mwc-circular-progress>
${progress !== undefined
Expand Down Expand Up @@ -332,7 +332,9 @@ export class ESPHomeWizardDialog extends LitElement {
.platform=${key}
@click=${this._handlePickPlatformClick}
>
<span>${supportedPlatforms[key].label}</span>
<span
>${supportedPlatforms[key as SupportedPlatforms].label}</span
>
${metaChevronRight}
</mwc-list-item>
`
Expand Down