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

hide useless things in file mode

This commit is contained in:
Kushagra Gour
2018-10-07 18:03:46 +05:30
parent d7c7cca083
commit 2d09be9411
4 changed files with 28 additions and 21 deletions

View File

@@ -196,7 +196,7 @@ export default class Footer extends Component {
<button <button
onClick={this.props.saveHtmlBtnClickHandler} onClick={this.props.saveHtmlBtnClickHandler}
id="saveHtmlBtn" id="saveHtmlBtn"
class="mode-btn hint--rounded hint--top-left hide-on-mobile" class="mode-btn hint--rounded hint--top-left hide-on-mobile hide-in-file-mode"
aria-label="Save as HTML file" aria-label="Save as HTML file"
> >
<svg viewBox="0 0 24 24"> <svg viewBox="0 0 24 24">
@@ -219,7 +219,7 @@ export default class Footer extends Component {
<button <button
onClick={this.props.codepenBtnClickHandler} onClick={this.props.codepenBtnClickHandler}
id="codepenBtn" id="codepenBtn"
class="mode-btn hint--rounded hint--top-left hide-on-mobile" class="mode-btn hint--rounded hint--top-left hide-on-mobile hide-in-file-mode"
aria-label="Edit on CodePen" aria-label="Edit on CodePen"
> >
<svg> <svg>
@@ -243,7 +243,7 @@ export default class Footer extends Component {
<button <button
onClick={this.layoutBtnClickhandler.bind(this, 1)} onClick={this.layoutBtnClickhandler.bind(this, 1)}
id="layoutBtn1" id="layoutBtn1"
class="mode-btn hide-on-mobile" class="mode-btn hide-on-mobile hide-in-file-mode"
aria-label="Switch to layout with preview on right" aria-label="Switch to layout with preview on right"
> >
<svg viewBox="0 0 100 100" style="transform:rotate(-90deg)"> <svg viewBox="0 0 100 100" style="transform:rotate(-90deg)">
@@ -253,7 +253,7 @@ export default class Footer extends Component {
<button <button
onClick={this.layoutBtnClickhandler.bind(this, 2)} onClick={this.layoutBtnClickhandler.bind(this, 2)}
id="layoutBtn2" id="layoutBtn2"
class="mode-btn hide-on-mobile" class="mode-btn hide-on-mobile hide-in-file-mode"
aria-label="Switch to layout with preview on bottom" aria-label="Switch to layout with preview on bottom"
> >
<svg viewBox="0 0 100 100"> <svg viewBox="0 0 100 100">
@@ -263,7 +263,7 @@ export default class Footer extends Component {
<button <button
onClick={this.layoutBtnClickhandler.bind(this, 3)} onClick={this.layoutBtnClickhandler.bind(this, 3)}
id="layoutBtn3" id="layoutBtn3"
class="mode-btn hide-on-mobile" class="mode-btn hide-on-mobile hide-in-file-mode"
aria-label="Switch to layout with preview on left" aria-label="Switch to layout with preview on left"
> >
<svg viewBox="0 0 100 100" style="transform:rotate(90deg)"> <svg viewBox="0 0 100 100" style="transform:rotate(90deg)">
@@ -273,7 +273,7 @@ export default class Footer extends Component {
<button <button
onClick={this.layoutBtnClickhandler.bind(this, 5)} onClick={this.layoutBtnClickhandler.bind(this, 5)}
id="layoutBtn5" id="layoutBtn5"
class="mode-btn hide-on-mobile" class="mode-btn hide-on-mobile hide-in-file-mode"
aria-label="Switch to layout with all vertical panes" aria-label="Switch to layout with all vertical panes"
> >
<svg viewBox="0 0 100 100"> <svg viewBox="0 0 100 100">

View File

@@ -27,6 +27,7 @@ export function MainHeader(props) {
</svg>Run </svg>Run
</button> </button>
{!this.props.isFileMode && (
<Button <Button
onClick={props.addLibraryBtnHandler} onClick={props.addLibraryBtnHandler}
data-event-category="ui" data-event-category="ui"
@@ -43,6 +44,7 @@ export function MainHeader(props) {
{props.externalLibCount} {props.externalLibCount}
</span> </span>
</Button> </Button>
)}
<button <button
class="btn--dark flex flex-v-center hint--rounded hint--bottom-left" class="btn--dark flex flex-v-center hint--rounded hint--bottom-left"

View File

@@ -1222,6 +1222,7 @@ export default class App extends Component {
titleInputBlurHandler={this.titleInputBlurHandler.bind(this)} titleInputBlurHandler={this.titleInputBlurHandler.bind(this)}
user={this.state.user} user={this.state.user}
unsavedEditCount={this.state.unsavedEditCount} unsavedEditCount={this.state.unsavedEditCount}
isFileMode={this.state.currentItem && this.state.currentItem.files}
/> />
{this.state.currentItem && this.state.currentItem.files ? ( {this.state.currentItem && this.state.currentItem.files ? (
<ContentWrapFiles <ContentWrapFiles

View File

@@ -1642,6 +1642,10 @@ body:not(.is-app) .show-when-app {
.sidebar__file:focus .sidebar__file-options { .sidebar__file:focus .sidebar__file-options {
visibility: visible; visibility: visible;
} }
.is-project .hide-in-file-mode {
display: none !important;
}
@media screen and (max-width: 600px) { @media screen and (max-width: 600px) {
body { body {
font-size: 70%; font-size: 70%;