Feature/275 open in background (#285)
* quodana base config * Using constants instead of magic strings * #275 - Added "alt o" to open a note without closing the omnisearch modal
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
IndexingStepType,
|
||||
type ResultNote,
|
||||
SPACE_OR_PUNCTUATION,
|
||||
Action,
|
||||
} from 'src/globals'
|
||||
import { createNote, openNote } from 'src/tools/notes'
|
||||
import {
|
||||
@@ -90,15 +91,16 @@
|
||||
|
||||
onMount(async () => {
|
||||
eventBus.enable('vault')
|
||||
eventBus.on('vault', 'enter', openNoteAndCloseModal)
|
||||
eventBus.on('vault', 'create-note', createNoteAndCloseModal)
|
||||
eventBus.on('vault', 'open-in-new-pane', openNoteInNewPane)
|
||||
eventBus.on('vault', 'insert-link', insertLink)
|
||||
eventBus.on('vault', 'tab', switchToInFileModal)
|
||||
eventBus.on('vault', 'arrow-up', () => moveIndex(-1))
|
||||
eventBus.on('vault', 'arrow-down', () => moveIndex(1))
|
||||
eventBus.on('vault', 'prev-search-history', prevSearchHistory)
|
||||
eventBus.on('vault', 'next-search-history', nextSearchHistory)
|
||||
eventBus.on('vault', Action.Enter, openNoteAndCloseModal)
|
||||
eventBus.on('vault', Action.OpenInBackground, openNoteInBackground)
|
||||
eventBus.on('vault', Action.CreateNote, createNoteAndCloseModal)
|
||||
eventBus.on('vault', Action.OpenInNewPane, openNoteInNewPane)
|
||||
eventBus.on('vault', Action.InsertLink, insertLink)
|
||||
eventBus.on('vault', Action.Tab, switchToInFileModal)
|
||||
eventBus.on('vault', Action.ArrowUp, () => moveIndex(-1))
|
||||
eventBus.on('vault', Action.ArrowDown, () => moveIndex(1))
|
||||
eventBus.on('vault', Action.PrevSearchHistory, prevSearchHistory)
|
||||
eventBus.on('vault', Action.NextSearchHistory, nextSearchHistory)
|
||||
await NotesIndex.refreshIndex()
|
||||
if (settings.showPreviousQueryResults) {
|
||||
previousQuery = (await cacheManager.getSearchHistory())[0]
|
||||
@@ -162,6 +164,11 @@
|
||||
modal.close()
|
||||
}
|
||||
|
||||
function openNoteInBackground(): void {
|
||||
if (!selectedNote) return
|
||||
openSearchResult(selectedNote, true)
|
||||
}
|
||||
|
||||
function openNoteInNewPane(): void {
|
||||
if (!selectedNote) return
|
||||
openSearchResult(selectedNote, true)
|
||||
@@ -324,7 +331,8 @@
|
||||
<span>to cycle history</span>
|
||||
</div>
|
||||
<div class="prompt-instruction">
|
||||
<span class="prompt-instruction-command">{openInCurrentPaneKey}</span><span>to open</span>
|
||||
<span class="prompt-instruction-command">{openInCurrentPaneKey}</span>
|
||||
<span>to open</span>
|
||||
</div>
|
||||
<div class="prompt-instruction">
|
||||
<span class="prompt-instruction-command">tab</span>
|
||||
@@ -335,6 +343,12 @@
|
||||
<span class="prompt-instruction-command">{openInNewPaneKey}</span>
|
||||
<span>to open in a new pane</span>
|
||||
</div>
|
||||
|
||||
<div class="prompt-instruction">
|
||||
<span class="prompt-instruction-command">alt o</span>
|
||||
<span>to open in the background</span>
|
||||
</div>
|
||||
|
||||
<div class="prompt-instruction">
|
||||
<span class="prompt-instruction-command">{createInCurrentPaneKey}</span>
|
||||
<span>to create</span>
|
||||
@@ -349,7 +363,7 @@
|
||||
<span>to insert a link</span>
|
||||
</div>
|
||||
<div class="prompt-instruction">
|
||||
<span class="prompt-instruction-command">ctrl+h</span>
|
||||
<span class="prompt-instruction-command">ctrl h</span>
|
||||
<span>to toggle excerpts</span>
|
||||
</div>
|
||||
<div class="prompt-instruction">
|
||||
|
||||
Reference in New Issue
Block a user