This repository has been archived by the owner on Jul 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #179 from Siderus/feature/add-context-menu-automat…
…ically Add the context menu after the welcome window
- Loading branch information
Showing
4 changed files
with
25 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import * as WinShell from './win-shell' | ||
|
||
/** | ||
* This adds the option "Add to IPFS via Orion" to the context menu of the OS, for files | ||
* and directories. Currently only on windows. | ||
*/ | ||
export function ensureContextMenuEnabled () { | ||
const isWindows = process.platform === 'win32' | ||
|
||
if (isWindows) { | ||
WinShell.contextMenus.isRegistered().then(status => { | ||
// if it's not enabled, do it | ||
if (!status) { | ||
WinShell.contextMenus.register().then(() => { | ||
console.log('Successfully added Orion to the windows context menu!') | ||
}) | ||
} | ||
}) | ||
} | ||
} |
File renamed without changes.
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