Skip to content

Commit 95ddf74

Browse files
author
Heejin Lee
committed
Add spinner for Preferences window
1 parent 78ad981 commit 95ddf74

File tree

3 files changed

+53
-2
lines changed

3 files changed

+53
-2
lines changed

app/dist/lib/common.css

+43
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,46 @@
1919
::-webkit-scrollbar-thumb:hover {
2020
background-color: #aaa;
2121
}
22+
23+
.spinner {
24+
margin: 100px auto 0;
25+
width: 70px;
26+
text-align: center;
27+
}
28+
29+
.spinner > div {
30+
width: 18px;
31+
height: 18px;
32+
background-color: #00bcd4;
33+
34+
border-radius: 100%;
35+
display: inline-block;
36+
-webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;
37+
animation: sk-bouncedelay 1.4s infinite ease-in-out both;
38+
}
39+
40+
.spinner .bounce1 {
41+
-webkit-animation-delay: -0.32s;
42+
animation-delay: -0.32s;
43+
}
44+
45+
.spinner .bounce2 {
46+
-webkit-animation-delay: -0.16s;
47+
animation-delay: -0.16s;
48+
}
49+
50+
@-webkit-keyframes sk-bouncedelay {
51+
0%, 80%, 100% { -webkit-transform: scale(0) }
52+
40% { -webkit-transform: scale(1.0) }
53+
}
54+
55+
@keyframes sk-bouncedelay {
56+
0%, 80%, 100% {
57+
-webkit-transform: scale(0);
58+
transform: scale(0);
59+
} 40% {
60+
-webkit-transform: scale(1.0);
61+
transform: scale(1.0);
62+
}
63+
64+
}

app/dist/preferences.html

+9-2
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,17 @@
1111
</style>
1212
</head>
1313
<body>
14+
<div id="spinner" class="spinner">
15+
<div class="bounce1"></div>
16+
<div class="bounce2"></div>
17+
<div class="bounce3"></div>
18+
</div>
1419
<div id="app"></div>
1520
<script>
1621
process.env.NODE_ENV = 'production';
17-
require('../renderer/pref.js');
22+
setTimeout(() => {
23+
require('../renderer/pref.js');
24+
}, 200);
1825
</script>
1926
</body>
20-
</html>
27+
</html>

app/renderer-jsx/pref.jsx

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ class Preferences extends React.Component {
6969
});
7070
});
7171
rpc.send('getPrefItems');
72+
document.getElementById('spinner').remove();
7273
}
7374

7475
selectPref(prefId) {

0 commit comments

Comments
 (0)