feat: add desktop repo (#1071)

This commit is contained in:
Mo
2022-06-07 11:52:15 -05:00
committed by GitHub
parent 0bb12db948
commit 0b7ce82aaa
135 changed files with 17821 additions and 180 deletions

View File

@@ -0,0 +1,15 @@
import { WebContents } from 'electron'
import { SearchManagerInterface } from './SearchManagerInterface'
export function initializeSearchManager(webContents: WebContents): SearchManagerInterface {
return {
findInPage(text: string) {
webContents.stopFindInPage('clearSelection')
if (text && text.length > 0) {
// This option arrangement is required to avoid an issue where clicking on a
// different note causes scroll to jump.
webContents.findInPage(text)
}
},
}
}

View File

@@ -0,0 +1,3 @@
export interface SearchManagerInterface {
findInPage(text: string): void
}