kopia lustrzana https://github.com/c9/core
fix loading screen in sdk
rodzic
1e61388297
commit
612e75dcf7
|
@ -0,0 +1,36 @@
|
|||
<link rel="stylesheet" type="text/css" href="<%=staticPrefix%>/plugins/c9.ide.layout.classic/loading.css" />
|
||||
<div id="loadingide">
|
||||
<div id="header"></div>
|
||||
<div id="content" class="loading-progress">
|
||||
<div id="progress-msg">
|
||||
Loading your workspace <span id="dots"></span>
|
||||
</div>
|
||||
<div class="loading-seperator" id="loading-seperator"></div>
|
||||
<div class="loading-msg" id="loading-msg">It will be just as you left it</div>
|
||||
|
||||
<div class="ui-progress-bar ui-container" id="progress_bar">
|
||||
<div class="ui-progress" style="width: 7%;">
|
||||
<span class="ui-label" style="display:none;"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<a href="https://docs.c9.io">Documentation</a> |
|
||||
<a href="http://status.c9.io">Server Status</a> |
|
||||
<a href="http://support.c9.io">Support</a>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var dots = document.getElementById("dots");
|
||||
var cnt = 0;
|
||||
window.dotsAnim = setInterval(function () {
|
||||
dots.textContent = "...".slice(0, (++cnt)%4);
|
||||
}, 500);
|
||||
|
||||
window.hideLoader = function(){
|
||||
var loader = document.getElementById("loadingide");
|
||||
loader.parentNode.removeChild(loader);
|
||||
|
||||
clearInterval(window.dotsAnim);
|
||||
};
|
||||
</script>
|
|
@ -0,0 +1,57 @@
|
|||
<link rel="stylesheet" type="text/css" href="<%=staticPrefix%>/plugins/c9.ide.layout.classic/loading-flat.css" />
|
||||
<div id="loadingide" class="<%-: theme + (isDark ? " dark" : "") %>">
|
||||
<div class="cool-message"></div>
|
||||
<div class="status" style="display:none"><div class="spinner"></div></div>
|
||||
|
||||
<div id="content" class="loading-progress">
|
||||
</div>
|
||||
<div class="footer">
|
||||
<a href="https://docs.c9.io">Documentation</a> |
|
||||
<a href="http://status.c9.io">Server Status</a> |
|
||||
<a href="http://support.c9.io">Support</a>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var loadingIde = document.querySelector("#loadingide");
|
||||
document.body.className = "loading " + loadingIde.className;
|
||||
|
||||
var messages = [
|
||||
"It's better up here.",
|
||||
"Happy coding!",
|
||||
"Everything as you left it.",
|
||||
"Give some love to your colleague on the left!",
|
||||
"Thank you Ada Lovelace!",
|
||||
"Feel the power of a full IDE — in the cloud.",
|
||||
"Code for the cloud, in the cloud",
|
||||
"Out with the old, in with the new",
|
||||
"POST /desktop/era",
|
||||
"#OnCloud9",
|
||||
"I ❤ Cloud9",
|
||||
"My life. My code. My Cloud9.",
|
||||
"For the love of code",
|
||||
"Get Your Code On",
|
||||
"Skip the hazing, love the coding",
|
||||
"Stop cursing, start coding",
|
||||
"GET /this/workspace#loaded",
|
||||
"Use our Vim mode for extra addictive effect!",
|
||||
"Not your grandfather's IDE",
|
||||
"Now made with 20% more cloud!",
|
||||
];
|
||||
|
||||
var idx = Math.floor(Math.random() * messages.length);
|
||||
if (idx == messages.length) idx = messages.length - 1;
|
||||
document.querySelector("#loadingide .cool-message").innerHTML =
|
||||
messages[idx];
|
||||
|
||||
setTimeout(function(){
|
||||
var s = document.querySelector("#loadingide .status");
|
||||
if (s) s.style.display = "block";
|
||||
}, 2000);
|
||||
|
||||
window.hideLoader = function(){
|
||||
var loader = document.getElementById("loadingide");
|
||||
loader.parentNode.removeChild(loader);
|
||||
|
||||
document.body.className = document.body.className.replace("loading " + loadingIde.className, "");
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,28 @@
|
|||
<%
|
||||
var plugins = architectConfig;
|
||||
var theme = "flat-light", html;
|
||||
plugins.some(function(n){
|
||||
if (n.packagePath == "plugins/c9.core/settings") {
|
||||
if (n.html) html = n.html;
|
||||
|
||||
try { var settings = JSON.parse(n.settings.user); }
|
||||
catch(e) { return; }
|
||||
|
||||
theme = settings.general && settings.general["@skin"] || "";
|
||||
if (typeof theme != "string") theme = "";
|
||||
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
var isDark = theme.indexOf("dark") > -1;
|
||||
if (!html) {
|
||||
var isFlat = theme.indexOf("flat") > -1;
|
||||
%><% include flat-load-screen.html %><%
|
||||
}
|
||||
else {
|
||||
%><div id="loadingide" class="<%-: theme + (isDark ? " dark" : "") %>">
|
||||
<%-: html %>
|
||||
</div><%
|
||||
}
|
||||
%>
|
Ładowanie…
Reference in New Issue