@@ -619,7 +619,7 @@ class GuestModePanel extends LitElement {
619619
620620 // Dialog
621621 const dialog = document . createElement ( 'ha-dialog' ) ;
622- dialog . heading = `QR — ${ token . name } ` ;
622+ dialog . setAttribute ( 'header-title' , `QR — ${ token . name } ` ) ;
623623 dialog . style . setProperty ( '--dialog-content-padding' , '16px' ) ;
624624
625625 const container = document . createElement ( 'div' ) ;
@@ -639,6 +639,9 @@ class GuestModePanel extends LitElement {
639639 linkEl . style . textAlign = 'center' ;
640640 container . appendChild ( linkEl ) ;
641641
642+ const footer = document . createElement ( 'ha-dialog-footer' ) ;
643+ footer . slot = 'footer' ;
644+
642645 const copyBtn = document . createElement ( 'ha-button' ) ;
643646 copyBtn . slot = 'primaryAction' ;
644647 copyBtn . textContent = this . translate ( "copy" ) || "Copy" ;
@@ -654,8 +657,9 @@ class GuestModePanel extends LitElement {
654657 closeBtn . addEventListener ( 'click' , ( ) => dialog . close ( ) ) ;
655658
656659 dialog . appendChild ( container ) ;
657- dialog . appendChild ( copyBtn ) ;
658- dialog . appendChild ( closeBtn ) ;
660+ footer . appendChild ( closeBtn ) ;
661+ footer . appendChild ( copyBtn ) ;
662+ dialog . appendChild ( footer ) ;
659663 this . shadowRoot . appendChild ( dialog ) ;
660664 dialog . open = true ;
661665
@@ -675,9 +679,12 @@ class GuestModePanel extends LitElement {
675679 async showConfirmationDialog ( title , text , buttons ) {
676680 return new Promise ( ( resolve ) => {
677681 const dialog = document . createElement ( 'ha-dialog' ) ;
678- dialog . heading = title ;
682+ dialog . setAttribute ( 'header-title' , title ) ;
679683 dialog . textContent = text ;
680684
685+ const footer = document . createElement ( 'ha-dialog-footer' ) ;
686+ footer . slot = 'footer' ;
687+
681688 const confirmButton = document . createElement ( 'ha-button' ) ;
682689 confirmButton . slot = 'primaryAction' ;
683690 confirmButton . variant = 'danger' ;
@@ -696,8 +703,9 @@ class GuestModePanel extends LitElement {
696703 dialog . close ( ) ;
697704 } ) ;
698705
699- dialog . appendChild ( confirmButton ) ;
700- dialog . appendChild ( cancelButton ) ;
706+ footer . appendChild ( cancelButton ) ;
707+ footer . appendChild ( confirmButton ) ;
708+ dialog . appendChild ( footer ) ;
701709 this . shadowRoot . appendChild ( dialog ) ;
702710 dialog . open = true ;
703711
@@ -1039,7 +1047,7 @@ class GuestModePanel extends LitElement {
10391047
10401048 <div class= "mdc-top-app-bar--fixed-adjust flex content" >
10411049 ${ this . isCreateDialogOpen ? html `
1042- <ha- dialog class= "create-token-dialog" open . heading = ${ this . translate ( "create_token" ) || "Create token" } @closed = ${ this . closeCreateDialog } >
1050+ <ha- dialog class= "create-token-dialog" open width = "large" header-title = ${ this . translate ( "create_token" ) || "Create token" } @closed = ${ this . closeCreateDialog } >
10431051 <div class= "dialog-content" >
10441052 ${ this . renderCreateTokenForm ( userSchema , groupSchema , dashboardSchema ) }
10451053 </ div>
@@ -1052,12 +1060,14 @@ class GuestModePanel extends LitElement {
10521060 </ div>
10531061 `
10541062 : null }
1055- <ha- butto n slot= "secondaryAction" @click = ${ this . closeCreateDialog } >
1056- ${ this . translate ( "close" ) || "Close" }
1057- </ ha- butto n>
1058- <ha- butto n slot= "primaryAction" @click = ${ this . addClick } >
1059- ${ this . translate ( "add" ) }
1060- </ ha- butto n>
1063+ <ha- dialog- footer slot= "footer" >
1064+ <ha- butto n slot= "secondaryAction" @click = ${ this . closeCreateDialog } >
1065+ ${ this . translate ( "close" ) || "Close" }
1066+ </ ha- butto n>
1067+ <ha- butto n slot= "primaryAction" @click = ${ this . addClick } >
1068+ ${ this . translate ( "add" ) }
1069+ </ ha- butto n>
1070+ </ ha- dialog- footer>
10611071 </ ha- dialog>
10621072 ` : null }
10631073
@@ -1324,8 +1334,8 @@ class GuestModePanel extends LitElement {
13241334 max-width : 100% ;
13251335 }
13261336 .create-token-dialog {
1327- --mdc -dialog-min- width : min (1080px , 92vw );
1328- --mdc -dialog-max-width : min (1080px , 92vw );
1337+ --ha -dialog-width-lg : min (1080px , 92vw );
1338+ --ha -dialog-max-width : min (1080px , 92vw );
13291339 }
13301340 .modal-alert-footer {
13311341 margin-top : 10px ;
0 commit comments