-
Notifications
You must be signed in to change notification settings - Fork 56
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
Migrate validate dialog to Lit #14
Conversation
|
||
shadowRoot.innerHTML = ` | ||
<style> | ||
.log { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is copied from esphome.css. Can be removed from there once all log-based dialogs are migrated.
private _setup = false; | ||
|
||
public connectedCallback() { | ||
if (this._setup) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we restart what we aborted if we connect again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nah we should create a new process dialog
@@ -2,10 +2,10 @@ import { uploadModal } from "../legacy"; | |||
|
|||
const preload = () => import("./install-update-dialog"); | |||
|
|||
const startInstallUpdate = async (ev: Event) => { | |||
export const openInstallDialog = async (filename: string) => { | |||
preload(); | |||
const dialog = document.createElement("esphome-install-dialog"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have to create a new dialog element every time, or should we re-use it? Do we also remove the dialog when we close it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes we do.
Co-authored-by: Bram Kragten <[email protected]>
Migrate the validate dialog and the foundation (log modal) to Lit.
Unblocks other migrations mentioned in #4.