Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
Fixes #4986 - Hide edit button on mobile (#5103)
Browse files Browse the repository at this point in the history
  • Loading branch information
punamdahiya authored and jaredhirsch committed Oct 31, 2018
1 parent 1c9bbaa commit d4e9aeb
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions server/src/pages/shot/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,17 +397,18 @@ class Body extends React.Component {
cancelDeleteHandler={this.cancelDeleteHandler.bind(this)}
staticLink={this.props.staticLink} key="delete-shot-button" />;

editButton = this.props.enableAnnotations ? <div className="edit-shot-button" key="edit-shot-button">
<Localized id="shotPageEditButton" attrs={{title: true}}>
<button className="button transparent nav-button"
title="Edit this image"
onClick={this.onClickEdit.bind(this)}
ref={(edit) => { this.editButton = edit; }}>
<img src={this.props.staticLink("/static/img/icon-pen.svg")} />
</button>
</Localized>
<PromoDialog promoClose={this.promoClose.bind(this)} display={this.state.promoDialog} />
{ highlight }
editButton = this.props.enableAnnotations && !this.props.isMobile ?
<div className="edit-shot-button" key="edit-shot-button">
<Localized id="shotPageEditButton" attrs={{title: true}}>
<button className="button transparent nav-button"
title="Edit this image"
onClick={this.onClickEdit.bind(this)}
ref={(edit) => { this.editButton = edit; }}>
<img src={this.props.staticLink("/static/img/icon-pen.svg")} />
</button>
</Localized>
<PromoDialog promoClose={this.promoClose.bind(this)} display={this.state.promoDialog} />
{ highlight }
</div> : null;

copyButton = <div className="copy-img-button" key="copy-img-button"
Expand Down

0 comments on commit d4e9aeb

Please sign in to comment.