browser: removing the progressbar from splash screen if it
errors.
Fixing the font-size for errors and changing the classnames
and ids to be more specific.
Change-Id: I5ef0fe30c38ba1a243410067d51ab5c970b5eedf
diff --git a/public/index.html b/public/index.html
index 778cb14..35b214e 100644
--- a/public/index.html
+++ b/public/index.html
@@ -34,7 +34,7 @@
word-break: break-word;
}
#splashMessage.splashError {
- font-size: 1.5em;
+ font-size: 0.7em;
}
#splashMessage.splashError::before {
content: "⚠";
@@ -55,14 +55,14 @@
left: 0;
z-index: 9999999;
}
- #progressbar {
+ #splashProgressbar {
width: 100%;
-webkit-animation:delayed-progressbar 1s;
}
- #progressbar::shadow #activeProgress {
+ #splashProgressbar::shadow #activeProgress {
background-color: #FF6E40;
}
- #progressbar::shadow #progressContainer {
+ #splashProgressbar::shadow #splashProgressContainer {
background-color: rgba(255,255,255,0.2);
border-radius: 3px;
}
@@ -71,7 +71,7 @@
99%{visibility:hidden;}
100%{visibility:visible;}
}
- #progressbarWrapper {
+ #splashProgressbarWrapper {
margin-top: -35px;
box-sizing: border-box;
position: absolute;
@@ -79,6 +79,9 @@
width: 100%;
padding: 10px 20%;
}
+ .hidden {
+ display: none;
+ }
body, #splash {
background-repeat: no-repeat;
background-position: top left;
@@ -94,8 +97,8 @@
<div id="splash">
<div id="splashMessageWrapper">
<div id="splashMessage">Loading Files...</div>
- <div id="progressbarWrapper">
- <paper-progress id="progressbar" indeterminate></paper-progress>
+ <div id="splashProgressbarWrapper">
+ <paper-progress id="splashProgressbar" indeterminate></paper-progress>
</div>
</div>
</div>
diff --git a/src/components/viewport/index.js b/src/components/viewport/index.js
index 4b33193..52f3600 100644
--- a/src/components/viewport/index.js
+++ b/src/components/viewport/index.js
@@ -217,6 +217,7 @@
* Splash screen fades so it is removed on animation end.
*/
var splashDomNode = document.querySelector('#splash');
+
function removeSplashScreen() {
if (splashDomNode) {
// keep a reference for the webkitAnimationEnd event handler
@@ -241,10 +242,14 @@
return;
}
var messageNode = splashDomNode.querySelector('#splashMessage');
+ var progressbar = splashDomNode.querySelector('#splashProgressbarWrapper');
if (isError) {
messageNode.classList.add('splashError');
+ progressbar.classList.add('hidden');
+
} else {
messageNode.classList.remove('splashError');
+ progressbar.classList.remove('hidden');
}
messageNode.textContent = message;
-}
+}
\ No newline at end of file