Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
balloob committed Feb 12, 2024
1 parent 576ddd5 commit e1e529e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 31 deletions.
10 changes: 1 addition & 9 deletions src/components/ew-dialog.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Dialog } from "@material/web/dialog/internal/dialog.js";
import { styles } from "@material/web/dialog/internal/dialog-styles.css";
// import { css } from "lit";

declare global {
interface HTMLElementTagNameMap {
Expand All @@ -9,14 +8,7 @@ declare global {
}

export class EwDialog extends Dialog {
static override styles = [
styles,
// css`
// .mdc-dialog__title {
// padding-right: 52px;
// }
// `,
];
static override styles = [styles];
}

customElements.define("ew-dialog", EwDialog);
48 changes: 26 additions & 22 deletions src/install-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -531,29 +531,33 @@ export class EwtInstallDialog extends LitElement {
_renderAskErase(): [string | undefined, TemplateResult] {
const heading = "Erase device";
const content = html`
<div>
Do you want to erase the device before installing
${this._manifest.name}? All data on the device will be lost.
<div slot="content">
<div>
Do you want to erase the device before installing
${this._manifest.name}? All data on the device will be lost.
</div>
<label class="formfield">
<ew-checkbox touch-target="wrapper" class="danger"></ew-checkbox>
Erase device
</label>
</div>
<div slot="actions">
<ew-text-button
@click=${() => {
this._state = "DASHBOARD";
}}
>
Back
</ew-text-button>
<ew-text-button
@click=${() => {
const checkbox = this.shadowRoot!.querySelector("ew-checkbox")!;
this._startInstall(checkbox.checked);
}}
>
Next
</ew-text-button>
</div>
<label class="formfield">
<ew-checkbox touch-target="wrapper" class="danger"></ew-checkbox>
Erase device
</label>
<ew-text-button
@click=${() => {
const checkbox = this.shadowRoot!.querySelector("ew-checkbox")!;
this._startInstall(checkbox.checked);
}}
>
Next
</ew-text-button>
<ew-text-button
@click=${() => {
this._state = "DASHBOARD";
}}
>
Back
</ew-text-button>
`;

return [heading, content];
Expand Down

0 comments on commit e1e529e

Please sign in to comment.