electron-dialog-manager
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published

electron-dialog-manager

Typescript wrapper to use async dialogs in electron renderer process.

npm version

Install

npm install -s electron-dialog-manager

Usage

Activate in the main process:

import { ElectronDialogManagerMain } from 'electron-dialog-manager'

ElectronDialogManagerMain.activate()

Use in a renderer process:

import { ElectronDialogManagerRenderer } from 'electron-dialog-manager'

ElectronDialogManagerRenderer.showMessageBox({
    title: 'Hello',
    message: 'Hello world',
    buttons: [ 'Hey', 'Cancel' ]
})
.then((result) => {
    // print the button index that was clicked
    console.log(result.response)
})

Main Process Methods

  • [x] activate(): boolean
  • [x] deactivate(): boolean

Renderer Process Methods

  • [x] showErrorBox(title: string, content: string): void
  • [x] async showCertificateTrustDialog(options: CertificateTrustDialogOptions): Promise<void>
  • [x] async showMessageBox(options: MessageBoxOptions): Promise<MessageBoxReturnValue>
  • [x] async showOpenDialog(options: OpenDialogOptions): Promise<OpenDialogReturnValue>
  • [x] async showSaveDialog(options: SaveDialogOptions): Promise<SaveDialogReturnValue>

Package Sidebar

Install

npm i electron-dialog-manager

Weekly Downloads

0

Version

1.0.7

License

CC0 1.0

Unpacked Size

22 kB

Total Files

9

Last publish

Collaborators

  • konijima