${this._error
@@ -225,11 +238,20 @@ class DialogPersonDetail extends LitElement {
return [
css`
ha-dialog {
- min-width: 400px;
- max-width: 600px;
+ --mdc-dialog-min-width: 400px;
+ --mdc-dialog-max-width: 600px;
--mdc-dialog-title-ink-color: var(--primary-text-color);
--justify-action-buttons: space-between;
}
+ /* make dialog fullscreen on small screens */
+ @media all and (max-width: 450px), all and (max-height: 500px) {
+ ha-dialog {
+ --mdc-dialog-min-width: 100vw;
+ --mdc-dialog-max-height: 100vh;
+ --mdc-dialog-shape-radius: 0px;
+ --vertial-align-dialog: flex-end;
+ }
+ }
.form {
padding-bottom: 24px;
}
diff --git a/src/panels/config/zone/dialog-zone-detail.ts b/src/panels/config/zone/dialog-zone-detail.ts
index 1e58e52e4d..a4afc11ec2 100644
--- a/src/panels/config/zone/dialog-zone-detail.ts
+++ b/src/panels/config/zone/dialog-zone-detail.ts
@@ -62,13 +62,26 @@ class DialogZoneDetail extends LitElement {
if (!this._params) {
return html``;
}
+ const title = html`
+ ${this._params.entry
+ ? this._params.entry.name
+ : this.hass!.localize("ui.panel.config.zone.detail.new_zone")}
+
+ `;
return html`
${this._error
@@ -252,6 +265,16 @@ class DialogZoneDetail extends LitElement {
--mdc-dialog-min-width: 600px;
}
}
+
+ /* make dialog fullscreen on small screens */
+ @media all and (max-width: 450px), all and (max-height: 500px) {
+ ha-dialog {
+ --mdc-dialog-min-width: 100vw;
+ --mdc-dialog-max-height: 100vh;
+ --mdc-dialog-shape-radius: 0px;
+ --vertial-align-dialog: flex-end;
+ }
+ }
.form {
padding-bottom: 24px;
}