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

Merge branch 'master' into localization

This commit is contained in:
Simon
2018-03-14 12:49:40 +01:00
committed by GitHub
7 changed files with 105 additions and 37 deletions

View File

@@ -21,6 +21,7 @@ import i18n from 'browser/lib/i18n'
const { remote } = require('electron')
const { Menu, MenuItem, dialog } = remote
const WP_POST_PATH = '/wp/v2/posts'
const markdown = new Markdown()
function sortByCreatedAt (a, b) {
return new Date(b.createdAt) - new Date(a.createdAt)
@@ -670,7 +671,7 @@ class NoteList extends React.Component {
}
copyNoteLink (note) {
const noteLink = `[${note.title}](${note.storage}-${note.key})`
const noteLink = `[${note.title}](${note.key})`
return copy(noteLink)
}
@@ -709,7 +710,7 @@ class NoteList extends React.Component {
authToken = `Bearer ${token}`
}
const contentToRender = firstNote.content.replace(`# ${firstNote.title}`, '')
var data = {
const data = {
title: firstNote.title,
content: markdown.render(contentToRender),
status: 'publish'