diff --git a/browser/main/Detail/InfoButton.js b/browser/main/Detail/InfoButton.js index ce9f35de..e4a9dedc 100644 --- a/browser/main/Detail/InfoButton.js +++ b/browser/main/Detail/InfoButton.js @@ -8,7 +8,7 @@ const InfoButton = ({ ) diff --git a/browser/main/Detail/InfoButton.styl b/browser/main/Detail/InfoButton.styl index 41449cfb..45c378fe 100644 --- a/browser/main/Detail/InfoButton.styl +++ b/browser/main/Detail/InfoButton.styl @@ -7,12 +7,15 @@ pointer-events none top 50px z-index 200 - padding 5px line-height normal border-radius 2px opacity 0 transition 0.1s +.infoButton + padding 0px + margin 15px 0 + body[data-theme="dark"] .control-infoButton topBarButtonDark() diff --git a/browser/main/Detail/InfoPanel.js b/browser/main/Detail/InfoPanel.js index 5a1437f7..33858665 100644 --- a/browser/main/Detail/InfoPanel.js +++ b/browser/main/Detail/InfoPanel.js @@ -24,7 +24,7 @@ const InfoPanel = ({
{text}
- ) -} - -LastUpdatedString.propTypes = { - date: PropTypes.string -} - -export default CSSModules(LastUpdatedString, styles) diff --git a/browser/main/Detail/LastUpdatedString.styl b/browser/main/Detail/LastUpdatedString.styl deleted file mode 100644 index e5270dc4..00000000 --- a/browser/main/Detail/LastUpdatedString.styl +++ /dev/null @@ -1,10 +0,0 @@ -.info-right-date - display inline - line-height 24px - padding-right 25px - font-size 11px - color $ui-button-color - -body[data-theme="dark"] - .info-right-date - color $ui-dark-button-color diff --git a/browser/main/Detail/MarkdownNoteDetail.styl b/browser/main/Detail/MarkdownNoteDetail.styl index e641f441..131ff9fd 100644 --- a/browser/main/Detail/MarkdownNoteDetail.styl +++ b/browser/main/Detail/MarkdownNoteDetail.styl @@ -29,7 +29,7 @@ .control-fullScreenButton float right - padding 7px + padding 0 0 2px 0 topBarButtonLight() .body diff --git a/browser/main/Detail/SnippetNoteDetail.js b/browser/main/Detail/SnippetNoteDetail.js index ac857250..1f8e3b90 100644 --- a/browser/main/Detail/SnippetNoteDetail.js +++ b/browser/main/Detail/SnippetNoteDetail.js @@ -18,6 +18,9 @@ import _ from 'lodash' import { findNoteTitle } from 'browser/lib/findNoteTitle' import AwsMobileAnalyticsConfig from 'browser/main/lib/AwsMobileAnalyticsConfig' import TrashButton from './TrashButton' +import InfoButton from './InfoButton' +import InfoPanel from './InfoPanel' +import { formatDate } from 'browser/lib/date-formatter' function pass (name) { switch (name) { @@ -54,7 +57,7 @@ class SnippetNoteDetail extends React.Component { } componentWillReceiveProps (nextProps) { - if (nextProps.note.key !== this.props.note.key) { + if (nextProps.note.key !== this.props.note.key && !this.isMovingNote) { if (this.saveQueue != null) this.saveNow() let nextNote = Object.assign({ description: '' @@ -433,10 +436,18 @@ class SnippetNoteDetail extends React.Component { this.refs['code-' + this.state.snippetIndex].focus() } + handleInfoButtonClick (e) { + const infoPanel = document.querySelector('.infoPanel') + if (infoPanel.style) infoPanel.style.display = infoPanel.style.display === 'none' ? 'inline' : 'none' + } + render () { - let { data, config } = this.props + let { data, config, location } = this.props let { note } = this.state + let storageKey = note.storage + let folderKey = note.folder + let editorFontSize = parseInt(config.editor.fontSize, 10) if (!(editorFontSize > 0 && editorFontSize < 101)) editorFontSize = 14 let editorIndentSize = parseInt(config.editor.indentSize, 10) @@ -491,6 +502,17 @@ class SnippetNoteDetail extends React.Component {