1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 01:36:22 +00:00

Merge pull request #709 from asmsuechan/add-exports-to-infoPanel

Add exports to infoPanel
This commit is contained in:
SuenagaRyota
2017-07-22 15:47:01 +09:00
committed by GitHub
4 changed files with 37 additions and 3 deletions

View File

@@ -466,6 +466,15 @@ class SnippetNoteDetail extends React.Component {
if (infoPanel.style) infoPanel.style.display = infoPanel.style.display === 'none' ? 'inline' : 'none'
}
showWarning () {
dialog.showMessageBox(remote.getCurrentWindow(), {
type: 'warning',
message: 'Sorry!',
detail: 'md/text import is available only a markdown note.',
buttons: ['OK']
})
}
render () {
let { data, config, location } = this.props
let { note } = this.state
@@ -591,6 +600,8 @@ class SnippetNoteDetail extends React.Component {
noteLink={`[${note.title}](${location.query.key})`}
updatedAt={formatDate(note.updatedAt)}
createdAt={formatDate(note.createdAt)}
exportAsMd={this.showWarning}
exportAsTxt={this.showWarning}
/>
</div>
</div>