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

name note to imported file

This commit is contained in:
Maurits Lourens
2018-01-15 21:33:17 +01:00
parent 2034ce9e4d
commit 9c0e1f8f1a

View File

@@ -11,6 +11,7 @@ import NoteItem from 'browser/components/NoteItem'
import NoteItemSimple from 'browser/components/NoteItemSimple'
import searchFromNotes from 'browser/lib/search'
import fs from 'fs'
import path from 'path'
import { hashHistory } from 'react-router'
import markdown from 'browser/lib/markdownTextHelper'
import { findNoteTitle } from 'browser/lib/findNoteTitle'
@@ -582,7 +583,7 @@ class NoteList extends React.Component {
const newNote = {
content: content,
folder: folder.key,
title: markdown.strip(findNoteTitle(content)),
title: path.basename(filepath, path.extname(filepath)),
type: 'MARKDOWN_NOTE',
createdAt: birthtime,
updatedAt: mtime