File tree 5 files changed +76
-2
lines changed
5 files changed +76
-2
lines changed Original file line number Diff line number Diff line change 29
29
< img src ="./images/logo.svg " />
30
30
</ a >
31
31
</ header >
32
- < form id ="login-card " method ="/ ">
32
+ < div class ="loading-animation " id ="loading ">
33
+ < div class ="bounce1 "> </ div >
34
+ < div class ="bounce2 "> </ div >
35
+ < div class ="bounce3 "> </ div >
36
+ </ div >
37
+ < form id ="login-card " method ="/ " style ="display:none; ">
33
38
< header >
34
39
< h2 > Enter your server URL</ h2 >
35
40
</ header >
@@ -49,7 +54,7 @@ <h2>Enter your server URL</h2>
49
54
< input type ="submit " data-loading-text ="Connecting... " class ="button primary login " value ="Connect "> </ input >
50
55
</ div >
51
56
</ form >
52
- < footer >
57
+ < footer style =" display:none; " >
53
58
< div class ="social ">
54
59
< nav >
55
60
< a target ="_system " class ="button share twitter " href ="https://twitter.com/RocketChatApp "> < i class ="icon-twitter "> </ i > < span > Twitter</ span > </ a >
Original file line number Diff line number Diff line change @@ -190,6 +190,7 @@ class Servers extends EventEmitter {
190
190
this . emit ( 'active-setted' , hostUrl ) ;
191
191
return true ;
192
192
}
193
+ this . emit ( 'loaded' ) ;
193
194
return false ;
194
195
}
195
196
Original file line number Diff line number Diff line change @@ -28,6 +28,19 @@ class WebView extends EventEmitter {
28
28
servers . on ( 'active-cleared' , ( hostUrl ) => {
29
29
this . deactiveAll ( hostUrl ) ;
30
30
} ) ;
31
+
32
+ servers . once ( 'loaded' , ( ) => {
33
+ this . loaded ( ) ;
34
+ } ) ;
35
+ }
36
+
37
+ loaded ( ) {
38
+ var loading = document . querySelector ( '#loading' ) ;
39
+ var form = document . querySelector ( '#login-card' ) ;
40
+ var footer = document . querySelector ( 'footer' ) ;
41
+ loading . style . display = 'none' ;
42
+ form . style . display = 'block' ;
43
+ footer . style . display = 'block' ;
31
44
}
32
45
33
46
add ( host ) {
@@ -68,6 +81,7 @@ class WebView extends EventEmitter {
68
81
69
82
webviewObj . addEventListener ( 'dom-ready' , ( ) => {
70
83
this . emit ( 'dom-ready' , host . url ) ;
84
+ this . loaded ( ) ;
71
85
} ) ;
72
86
73
87
// Open external app on clicked link. e.g. mailto:, tel:, etc...
Original file line number Diff line number Diff line change 3
3
@import " start-page.less" ;
4
4
@import " ../branding/branding.less" ;
5
5
@import " fontello.less" ;
6
+ @import " utils/_loading.import.less" ;
6
7
7
8
* ,
8
9
* :before ,
Original file line number Diff line number Diff line change
1
+ .loading-animation {
2
+ color : @secondary-font-color ;
3
+ font-size : 1.3rem ;
4
+ margin-left : 32px ;
5
+ margin-top : 12px ;
6
+ margin-bottom : 5px ;
7
+ }
8
+
9
+ .loading-animation > div {
10
+ width : 8px ;
11
+ height : 8px ;
12
+ border-radius : 100% ;
13
+ display : inline-block ;
14
+ background-color : @secondary-font-color ;
15
+ -webkit-animation : loading- bouncedelay 1.4s infinite ease-in-out both ;
16
+ animation : loading- bouncedelay 1.4s infinite ease-in-out both ;
17
+ }
18
+
19
+ .loading-animation .bounce1 {
20
+ -webkit-animation-delay : -0.32s ;
21
+ animation-delay : -0.32s ;
22
+ }
23
+
24
+ .loading-animation .bounce2 {
25
+ -webkit-animation-delay : -0.16s ;
26
+ animation-delay : -0.16s ;
27
+ }
28
+
29
+ @-webkit-keyframes loading- bouncedelay {
30
+ 0% ,
31
+ 80% ,
32
+ 100% {
33
+ -webkit-transform : scale (0 );
34
+ }
35
+
36
+ 40% {
37
+ -webkit-transform : scale (1 );
38
+ }
39
+ }
40
+
41
+ @keyframes loading- bouncedelay {
42
+ 0% ,
43
+ 80% ,
44
+ 100% {
45
+ -webkit-transform : scale (0 );
46
+ transform : scale (0 );
47
+ }
48
+
49
+ 40% {
50
+ -webkit-transform : scale (1 );
51
+ transform : scale (1 );
52
+ }
53
+ }
You can’t perform that action at this time.
0 commit comments