File tree Expand file tree Collapse file tree 2 files changed +18
-28
lines changed Expand file tree Collapse file tree 2 files changed +18
-28
lines changed Original file line number Diff line number Diff line change 4
4
html ,
5
5
LitElement ,
6
6
property ,
7
+ query ,
7
8
TemplateResult ,
8
9
} from 'lit-element' ;
9
10
import { translate , translateUnsafeHTML } from 'lit-translate' ;
@@ -22,25 +23,18 @@ export class CompasSessionExpiredDialogElement extends LitElement {
22
23
@property ( { type : String } )
23
24
public docName = '' ;
24
25
25
- private getDialog ( ) : Dialog {
26
- return < Dialog > (
27
- this . shadowRoot ! . querySelector (
28
- 'mwc-dialog[id="compasSessionExpiredDialog"]'
29
- )
30
- ) ;
31
- }
26
+ @query ( 'mwc-dialog[id="compasSessionExpiredDialog"]' )
27
+ private dialog ! : Dialog ;
32
28
33
29
show ( ) : void {
34
- const expiringDialog = this . getDialog ( ) ;
35
- if ( expiringDialog && ! expiringDialog . open ) {
36
- expiringDialog . show ( ) ;
30
+ if ( ! this . dialog . open ) {
31
+ this . dialog . show ( ) ;
37
32
}
38
33
}
39
34
40
35
close ( ) : void {
41
- const expiringDialog = this . getDialog ( ) ;
42
- if ( expiringDialog && expiringDialog . open ) {
43
- expiringDialog . close ( ) ;
36
+ if ( this . dialog . open ) {
37
+ this . dialog . close ( ) ;
44
38
}
45
39
}
46
40
@@ -83,7 +77,8 @@ export class CompasSessionExpiredDialogElement extends LitElement {
83
77
84
78
static styles = css `
85
79
#compasSessionExpiredDialog {
86
- --mdc-dialog-max-width: 1024px;
80
+ --mdc-dialog-min-width: 23vw;
81
+ --mdc-dialog-max-width: 92vw;
87
82
}
88
83
` ;
89
84
}
Original file line number Diff line number Diff line change 4
4
html ,
5
5
LitElement ,
6
6
property ,
7
+ query ,
7
8
TemplateResult ,
8
9
} from 'lit-element' ;
9
10
import { translate , translateUnsafeHTML } from 'lit-translate' ;
@@ -18,25 +19,18 @@ export class CompasSessionExpiringDialogElement extends LitElement {
18
19
@property ( { type : Number } )
19
20
public expiredSessionMessage : number = 15 * 60 * 1000 ;
20
21
21
- private getDialog ( ) : Dialog {
22
- return < Dialog > (
23
- this . shadowRoot ! . querySelector (
24
- 'mwc-dialog[id="compasSessionExpiringDialog"]'
25
- )
26
- ) ;
27
- }
22
+ @query ( 'mwc-dialog[id="compasSessionExpiringDialog"]' )
23
+ private dialog ! : Dialog ;
28
24
29
25
show ( ) : void {
30
- const expiringDialog = this . getDialog ( ) ;
31
- if ( expiringDialog && ! expiringDialog . open ) {
32
- expiringDialog . show ( ) ;
26
+ if ( ! this . dialog . open ) {
27
+ this . dialog . show ( ) ;
33
28
}
34
29
}
35
30
36
31
close ( ) : void {
37
- const expiringDialog = this . getDialog ( ) ;
38
- if ( expiringDialog && expiringDialog . open ) {
39
- expiringDialog . close ( ) ;
32
+ if ( this . dialog . open ) {
33
+ this . dialog . close ( ) ;
40
34
}
41
35
}
42
36
@@ -65,7 +59,8 @@ export class CompasSessionExpiringDialogElement extends LitElement {
65
59
66
60
static styles = css `
67
61
# compasSessionExpiringDialog {
68
- --mdc-dialog-max-width : 800px ;
62
+ --mdc-dialog-min-width : 23vw ;
63
+ --mdc-dialog-max-width : 92vw ;
69
64
}
70
65
` ;
71
66
}
You can’t perform that action at this time.
0 commit comments