Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

Commit

Permalink
#510 Not saved indicator improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
damianprzygodzki committed Mar 8, 2017
1 parent cf74ba9 commit 53c6510
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 25 deletions.
8 changes: 0 additions & 8 deletions src/assets/css/indicator.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
.document-save-indicator {
color: $brand-danger-color;
}

.document-save-indicator:hover{
background: none;
}

.indicators-wrapper {
border: 1px solid $brand-border-color;
border-radius: 3px;
Expand Down
7 changes: 5 additions & 2 deletions src/components/app/Indicator.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@ class Indicator extends Component {
}

render() {
const {indicator} = this.props;
const {indicator, isDocumentNotSaved} = this.props;

return (
<div>
<div className={'indicator-bar indicator-' + indicator} />
<div className={
'indicator-bar indicator-' + indicator +
(isDocumentNotSaved ? ' indicator-error ' : ' ')
} />
</div>
)
}
Expand Down
16 changes: 1 addition & 15 deletions src/components/header/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,20 +292,6 @@ class Header extends Component {
<img src={logo} className="header-logo pointer" onClick={() => this.handleDashboardLink()} />
</div>
<div className="header-right-side">
<ReactCSSTransitionGroup
transitionName="fade"
transitionEnterTimeout={300}
transitionLeaveTimeout={300}
>
{isDocumentNotSaved &&
<div className="document-save-indicator header-item-container">
<div className="text-xs-center">
<i className="meta-icon-save" />
</div>
<small>Not saved</small>
</div>
}
</ReactCSSTransitionGroup>
{docStatus &&
<div
className="hidden-sm-down tooltip-parent"
Expand Down Expand Up @@ -386,7 +372,7 @@ class Header extends Component {
</div>
</div>
</div>
{showIndicator && <Indicator />}
{showIndicator && <Indicator {...{isDocumentNotSaved}}/>}
</nav>

{isSubheaderShow && <Subheader
Expand Down

0 comments on commit 53c6510

Please sign in to comment.