Fix race condition with preloading style

This commit is contained in:
yflory 2022-08-31 11:42:26 +02:00
parent e78e57c039
commit b6b4690e97
4 changed files with 13 additions and 20 deletions

View File

@ -1,14 +1,3 @@
@font-face {
font-family: 'Open Sans';
src: url('/bower_components/open-sans-fontface/fonts/Regular/OpenSans-Regular.eot');
src: url('/bower_components/open-sans-fontface/fonts/Regular/OpenSans-Regular.eot?#iefix') format('embedded-opentype'),
url('/bower_components/open-sans-fontface/fonts/Regular/OpenSans-Regular.woff') format('woff'),
url('/bower_components/open-sans-fontface/fonts/Regular/OpenSans-Regular.ttf') format('truetype'),
url('/bower_components/open-sans-fontface/fonts/Regular/OpenSans-Regular.svg#OpenSansRegular') format('svg');
font-weight: normal;
font-style: normal;
}
.cp-app-noscroll body {
background: transparent;
}
@ -34,10 +23,12 @@
flex-flow: column;
justify-content: center;
align-items: center;
font: 20px 'Open Sans', 'Helvetica Neue', sans-serif !important;
font: 20px 'Helvetica Neue', sans-serif !important;
}
html:not(.cp-app-noscroll) #placeholder.dark-theme {
background-color: #212121; /* @cp_loading-bg (dark) */
}
#placeholder.dark-theme {
background-color: #212121; /* @cp_loading-bg (dark) */
color: #EEEEEE; /* @cp_loading-fg (dark) */
}

View File

@ -14,13 +14,6 @@
<body class="cp-app-code">
<div id="cme_toolbox" class="cp-toolbar-container"></div>
<div id="cp-app-code-editor">
<div id="cp-app-code-container">
<textarea id="editor1" name="editor1"></textarea>
</div>
<div id="cp-app-code-preview">
<div id="cp-app-code-preview-content"></div>
<div id="cp-app-code-print"></div>
</div>
</div>
</body>
</html>

View File

@ -583,6 +583,14 @@ define([
}
}, waitFor(function (fw) { framework = fw; }));
$('#cp-app-code-editor').append([
h('div#cp-app-code-container', h('textarea#editor1', {name:'editor1'})),
h('div#cp-app-code-preview', [
h('div#cp-app-code-preview-content'),
h('div#cp-app-code-print')
])
]);
nThen(function (waitFor) {
$(waitFor());
}).nThen(function () {

View File

@ -1003,6 +1003,7 @@ define([
$loading.addClass("cp-loading-hidden"); // Hide the loading screen
$loading.find('.cp-loading-progress').remove(); // Remove the progress list
setTimeout(cb, 750);
$('head > link[href^="/customize/src/pre-loading.css"]').remove();
};
UI.errorLoadingScreen = function (error, transparent, exitable) {
if (error === 'Error: XDR encoding failure') {