1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-20 05:21:12 +02:00

fix things to show/hide on each platform

This commit is contained in:
Kushagra Gour
2018-01-13 12:21:34 +05:30
parent 3429ba34ab
commit 3a23861711
3 changed files with 14 additions and 4 deletions

View File

@@ -88,13 +88,13 @@
<path d="M13,9V3.5L18.5,9M6,2C4.89,2 4,2.89 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2H6Z" />
</svg>Open
</a>
<a class="hide-on-login flex flex-v-center hint--rounded hint--bottom-left" aria-label="Login/Signup" d-open-modal="loginModal">
<a class="show-when-app hide-on-login flex flex-v-center hint--rounded hint--bottom-left" aria-label="Login/Signup" d-open-modal="loginModal">
Login/Signup
</a>
<a class="hide-on-logout flex flex-v-center hint--rounded hint--bottom-left" aria-label="Logout" d-click="logout">
Logout
</a>
<img id="headerAvatarImg" width="20" src="" class="main-header__avatar-img hide-on-logout ml-1"/>
<img id="headerAvatarImg" width="20" src="" class="hide-on-logout main-header__avatar-img ml-1"/>
</div>
</div>
<div class="content-wrap flex flex-grow">
@@ -201,7 +201,7 @@
</svg>
</a>
<a href="" id="screenshotBtn" class="mode-btn hint--rounded hint--top-left" d-click="takeScreenshot" aria-label="Take screenshot of preview">
<a href="" id="screenshotBtn" class="mode-btn hint--rounded hint--top-left show-when-extension" d-click="takeScreenshot" aria-label="Take screenshot of preview">
<svg style="width:24px;height:24px" viewBox="0 0 24 24">
<path d="M4,4H7L9,2H15L17,4H20A2,2 0 0,1 22,6V18A2,2 0 0,1 20,20H4A2,2 0 0,1 2,18V6A2,2 0 0,1 4,4M12,7A5,5 0 0,0 7,12A5,5 0 0,0 12,17A5,5 0 0,0 17,12A5,5 0 0,0 12,7M12,9A3,3 0 0,1 15,12A3,3 0 0,1 12,15A3,3 0 0,1 9,12A3,3 0 0,1 12,9Z" />
</svg>

View File

@@ -998,6 +998,9 @@ body > #demo-frame {
padding: 2px;
font-size: 10px;
}
.is-extension .web-maker-with-tag:after {
display: none;
}
.social-login-btn--github {
background: #656B6F;
}
@@ -1011,7 +1014,9 @@ body > #demo-frame {
}
body.is-logged-in .hide-on-login,
body:not(.is-logged-in) .hide-on-logout {
body:not(.is-logged-in) .hide-on-logout,
body:not(.is-extension) .show-when-extension,
body:not(.is-app) .show-when-app {
display: none;
}

View File

@@ -215,4 +215,9 @@
window.chrome.i18n = { getMessage: () => {} };
window.IS_EXTENSION = !!window.chrome.extension;
if (window.IS_EXTENSION) {
document.body.classList.add('is-extension');
} else {
document.body.classList.add('is-app');
}
})();