Skip to content

Commit

Permalink
perf: ♻️ Search interaction
Browse files Browse the repository at this point in the history
  • Loading branch information
viarotel committed May 15, 2024
1 parent 091d503 commit a195b7e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions electron/exposes/search/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@ export default () => {
}

function close() {
remote.getCurrentWebContents().stopFindInPage('clearSelection')

if (!findInPage) {
return false
}

return findInPage.closeFindWindow()
}

Expand Down Expand Up @@ -62,6 +65,8 @@ export default () => {
: {}),
})

console.log('findInPage', findInPage)

return findInPage
}

Expand Down
3 changes: 2 additions & 1 deletion src/components/AppSearch/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</template>

<script setup>
import { useThemeStore } from '$/store'
import { useThemeStore } from '$/store/theme/index.js'
const themeStore = useThemeStore()
Expand All @@ -32,6 +32,7 @@ window.electron.ipcRenderer.on('focus-on-search', (event, ret) => {
function openPageModal() {
window.findInPageModal.open({ isDark: themeStore.isDark })
}
function closePageModal() {
window.findInPageModal.close()
}
Expand Down

0 comments on commit a195b7e

Please sign in to comment.