Fix displaying header pre-loader on Desktop
This commit is contained in:
parent
e6cf51575a
commit
7b4dc42620
@ -255,7 +255,10 @@
|
||||
To create a production bundle, use `npm run build` or `yarn build`.
|
||||
-->
|
||||
<script>
|
||||
if (window.location.pathname.indexOf("doceditor") === -1) {
|
||||
if (
|
||||
window.location.pathname.indexOf("doceditor") === -1 &&
|
||||
window["AscDesktopEditor"] === undefined
|
||||
) {
|
||||
let el = document.getElementById("temp-content");
|
||||
el.style.display = "block";
|
||||
}
|
||||
|
@ -72,13 +72,13 @@
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.burger-loader-svg{
|
||||
.burger-loader-svg {
|
||||
display: none;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
padding-left: 16px;
|
||||
}
|
||||
.logo-loader-svg{
|
||||
.logo-loader-svg {
|
||||
display: none;
|
||||
width: 168px;
|
||||
height: 24px;
|
||||
@ -86,7 +86,7 @@
|
||||
cursor: pointer;
|
||||
padding-left: 16px;
|
||||
}
|
||||
.avatar-loader-svg{
|
||||
.avatar-loader-svg {
|
||||
display: none;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
@ -97,7 +97,7 @@
|
||||
<body>
|
||||
<noscript> You need to enable JavaScript to run this app. </noscript>
|
||||
|
||||
<div id="temp-content">
|
||||
<div id="temp-content" style="display: none">
|
||||
<header class="temp-header-container">
|
||||
<div id="burger-loader-svg" class="burger-loader-svg">
|
||||
<svg
|
||||
@ -116,8 +116,11 @@
|
||||
></rect>
|
||||
<defs>
|
||||
<linearGradient id="fill0">
|
||||
<stop offset="0.599964" stop-color="#fff" stop-opacity="0.25">
|
||||
</stop>
|
||||
<stop
|
||||
offset="0.599964"
|
||||
stop-color="#fff"
|
||||
stop-opacity="0.25"
|
||||
></stop>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
@ -139,8 +142,11 @@
|
||||
></rect>
|
||||
<defs>
|
||||
<linearGradient id="fill01">
|
||||
<stop offset="0.599964" stop-color="#fff" stop-opacity="0.25">
|
||||
</stop>
|
||||
<stop
|
||||
offset="0.599964"
|
||||
stop-color="#fff"
|
||||
stop-opacity="0.25"
|
||||
></stop>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
@ -164,8 +170,11 @@
|
||||
></circle>
|
||||
<defs>
|
||||
<linearGradient id="fill02">
|
||||
<stop offset="0.599964" stop-color="#fff" stop-opacity="0.25">
|
||||
</stop>
|
||||
<stop
|
||||
offset="0.599964"
|
||||
stop-color="#fff"
|
||||
stop-opacity="0.25"
|
||||
></stop>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
@ -193,8 +202,11 @@
|
||||
<rect x="3" y="3" rx="5" ry="5" width="100%" />
|
||||
</clipPath>
|
||||
<linearGradient id="fill1">
|
||||
<stop offset="0.599964" stop-color="#000000" stop-opacity="0.1">
|
||||
</stop>
|
||||
<stop
|
||||
offset="0.599964"
|
||||
stop-color="#000000"
|
||||
stop-opacity="0.1"
|
||||
></stop>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
@ -212,5 +224,12 @@
|
||||
To begin the development, run `npm start` or `yarn start`.
|
||||
To create a production bundle, use `npm run build` or `yarn build`.
|
||||
-->
|
||||
<script>
|
||||
console.log("AscDesktopEditor", window["AscDesktopEditor"]);
|
||||
if (window["AscDesktopEditor"] === undefined) {
|
||||
let el = document.getElementById("temp-content");
|
||||
el.style.display = "block";
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -123,26 +123,23 @@ class NavMenu extends React.Component {
|
||||
withBackground={true}
|
||||
/>
|
||||
|
||||
{isLoaded && isAuthenticated ? (
|
||||
<>
|
||||
{!isDesktop && (
|
||||
<>
|
||||
<HeaderNav history={history} />
|
||||
<Header
|
||||
isNavOpened={isNavOpened}
|
||||
onClick={this.showNav}
|
||||
onNavMouseEnter={this.handleNavMouseEnter}
|
||||
onNavMouseLeave={this.handleNavMouseLeave}
|
||||
toggleAside={this.toggleAside}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
) : !isLoaded && isAuthenticated ? (
|
||||
<Loaders.Header />
|
||||
) : (
|
||||
!isDesktop && <HeaderUnAuth />
|
||||
)}
|
||||
{!isDesktop &&
|
||||
(isLoaded && isAuthenticated ? (
|
||||
<>
|
||||
<HeaderNav history={history} />
|
||||
<Header
|
||||
isNavOpened={isNavOpened}
|
||||
onClick={this.showNav}
|
||||
onNavMouseEnter={this.handleNavMouseEnter}
|
||||
onNavMouseLeave={this.handleNavMouseLeave}
|
||||
toggleAside={this.toggleAside}
|
||||
/>
|
||||
</>
|
||||
) : !isLoaded && isAuthenticated ? (
|
||||
<Loaders.Header />
|
||||
) : (
|
||||
<HeaderUnAuth />
|
||||
))}
|
||||
|
||||
{isAsideAvailable && (
|
||||
<Aside visible={isAsideVisible} onClick={this.backdropClick}>
|
||||
|
Loading…
Reference in New Issue
Block a user