Skip to content

Commit

Permalink
modify: move updated string to the bottom of note detail component
Browse files Browse the repository at this point in the history
  • Loading branch information
sota1235 committed Jan 14, 2017
1 parent f0fcaa6 commit 297553c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 2 additions & 0 deletions browser/main/Detail/LastUpdatedString.styl
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.info-right-date
display inline
line-height 24px
padding-right 25px
font-size 11px
color $ui-button-color

Expand Down
3 changes: 1 addition & 2 deletions browser/main/Detail/MarkdownNoteDetail.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import styles from './MarkdownNoteDetail.styl'
import MarkdownEditor from 'browser/components/MarkdownEditor'
import StarButton from './StarButton'
import TagSelect from './TagSelect'
import LastUpdatedString from './LastUpdatedString'
import dataApi from 'browser/main/lib/dataApi'
import { hashHistory } from 'react-router'
import ee from 'browser/main/lib/eventEmitter'
Expand Down Expand Up @@ -226,7 +225,6 @@ class MarkdownNoteDetail extends React.Component {
/>
</div>
<div styleName='info-right'>
<LastUpdatedString date={note.updatedAt} />
<button styleName='info-right-button'
onClick={(e) => this.handleContextButtonClick(e)}
>
Expand All @@ -248,6 +246,7 @@ class MarkdownNoteDetail extends React.Component {

<StatusBar
{..._.pick(this.props, ['config', 'location', 'dispatch'])}
date={note.updatedAt}
/>
</div>
)
Expand Down
3 changes: 1 addition & 2 deletions browser/main/Detail/SnippetNoteDetail.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import CodeEditor from 'browser/components/CodeEditor'
import MarkdownEditor from 'browser/components/MarkdownEditor'
import StarButton from './StarButton'
import TagSelect from './TagSelect'
import LastUpdatedString from './LastUpdatedString'
import dataApi from 'browser/main/lib/dataApi'
import { hashHistory } from 'react-router'
import ee from 'browser/main/lib/eventEmitter'
Expand Down Expand Up @@ -535,7 +534,6 @@ class SnippetNoteDetail extends React.Component {
/>
</div>
<div styleName='info-right'>
<LastUpdatedString date={note.updatedAt} />
<button styleName='info-right-button'
onClick={(e) => this.handleContextButtonClick(e)}
>
Expand Down Expand Up @@ -596,6 +594,7 @@ class SnippetNoteDetail extends React.Component {

<StatusBar
{..._.pick(this.props, ['config', 'location', 'dispatch'])}
date={note.updatedAt}
/>
</div>
)
Expand Down
6 changes: 5 additions & 1 deletion browser/main/StatusBar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { PropTypes } from 'react'
import CSSModules from 'browser/lib/CSSModules'
import styles from './StatusBar.styl'
import ZoomManager from 'browser/main/lib/ZoomManager'
import LastUpdatedString from '../Detail/LastUpdatedString'

const electron = require('electron')
const { remote, ipcRenderer } = electron
Expand Down Expand Up @@ -67,6 +68,8 @@ class StatusBar extends React.Component {
</button>
: null
}

<LastUpdatedString date={this.props.date} />
</div>
)
}
Expand All @@ -76,7 +79,8 @@ StatusBar.contextTypes = {
status: PropTypes.shape({
updateReady: PropTypes.bool.isRequired
}).isRequired,
config: PropTypes.shape({}).isRequired
config: PropTypes.shape({}).isRequired,
date: PropTypes.string
}

StatusBar.propTypes = {
Expand Down

0 comments on commit 297553c

Please sign in to comment.