-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: add context menu base * fix: add runtime rename logic to backend * fix: rename tab support * fix: duplicate and close right functionality * fix: close others and close functions for tabs * fix: remove runner console.logs * fix: when app closes last tab, close app
- Loading branch information
1 parent
391dac8
commit 9491744
Showing
9 changed files
with
968 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ContextMenuParams, shell } from 'electron' | ||
import { BootstrapContext } from './index' | ||
import contextMenu, { Actions } from 'electron-context-menu' | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
export async function createContext(_: BootstrapContext): Promise<void> { | ||
contextMenu({ | ||
showSaveImageAs: true, | ||
prepend: (_: Actions, parameters: ContextMenuParams) => { | ||
return [ | ||
{ | ||
label: 'Search Google for “{selection}”', | ||
visible: parameters.selectionText.trim().length > 0, | ||
click: (): void => { | ||
shell.openExternal( | ||
`https://google.com/search?q=${encodeURIComponent(parameters.selectionText)}` | ||
) | ||
} | ||
} | ||
] | ||
} | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.