mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
Displaying the notebook's name in the Note toolbar when search is active.
This commit is contained in:
parent
eb43ddc701
commit
c7f61271a0
@ -224,6 +224,7 @@ class NoteTextComponent extends React.Component {
|
||||
let noteId = null;
|
||||
let note = null;
|
||||
let loadingNewNote = true;
|
||||
let parentFolder = null;
|
||||
|
||||
if (props.newNote) {
|
||||
note = Object.assign({}, props.newNote);
|
||||
@ -296,10 +297,16 @@ class NoteTextComponent extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
if (note)
|
||||
{
|
||||
parentFolder = Folder.byId(props.folders, note.parent_id);
|
||||
}
|
||||
|
||||
let newState = {
|
||||
note: note,
|
||||
lastSavedNote: Object.assign({}, note),
|
||||
webviewReady: webviewReady,
|
||||
folder: parentFolder,
|
||||
};
|
||||
|
||||
if (!note) {
|
||||
@ -829,6 +836,15 @@ class NoteTextComponent extends React.Component {
|
||||
|
||||
const toolbarItems = [];
|
||||
|
||||
if (note
|
||||
&& this.state.folder !== null
|
||||
&& this.props.notesParentType == 'Search') {
|
||||
toolbarItems.push({
|
||||
title: _(this.state.folder.title),
|
||||
iconName: 'fa-folder-o',
|
||||
});
|
||||
}
|
||||
|
||||
toolbarItems.push({
|
||||
title: _('Attach file'),
|
||||
iconName: 'fa-paperclip',
|
||||
|
Loading…
Reference in New Issue
Block a user