Giter VIP home page Giter VIP logo

electron-alert's Introduction

⭐   the project to show your appreciation. ↗️

ElectronAlert

ElectronAlert is a beautiful and developer-friendly alert for Electron applications. It is powered by SweetAlert2 and works directly from the main process.


See ElectronAlert in action ↗

Features

  • Standard and Frameless alerts that are visually stunning
  • Toasts with timers
  • Exception handling alert
  • Sounds
  • SweetAlert2-esque API* (v11)
  • Consistent UI across all platforms

Documentation

Please issue a PR if you discover a bug or wish to add a feature!

Community Projects

voiceflow

Bitfinex

theCucumber.app

If you use ElectronAlert in your project, add it here.

Legal Information

MIT license. Refer to LICENSE file for more details.

© 2019-22 PJ Engineering and Business Solutions Pty. Ltd.

electron-alert's People

Contributors

dependabot[bot] avatar pjebs avatar power-f-god avatar rocketlaunchr-cto avatar tehcpu avatar zimkaru avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

electron-alert's Issues

Electron alert not working in electron": "15.1.1"

const Alert = require('electron-alert')

 let swalOptions = {
        position: "top",
        title: "Correct",
        icon: "success",
        showConfirmButton: true,
        timer: 8000
      };
     
      Alert.fireToast(swalOptions);

The above doesn't work in lastest version of electron. It works only on the lower version. Please have a look at it. Thanks

Font family ignored in title (or html) properties for swalOptions

const toastOptions = {
    position: 'top-end',
    showConfirmButton: false,
    timer: 6000,
    timerProgressBar: true,
    icon: 'info',
    title: '<span style="font-size: 1.15rem; font-weight: bold; font-family: "Montserrat" !important; ">Title of Toast</span>',
    text: Toast Subtitle,
    color: 'white',
    iconColor: '#03d8d8',
  };

We are setting up the title to include inline styling. Both the font-size and font-weight and are applied but not the font-family.

Use contextIsolation

Hi)
It would be great to use contextIsolation flag to have the ability to use electron v12
electron/electron#23506

(node:8475) electron: The default of contextIsolation is deprecated and will be changing from false to true in a future release of Electron.  See https://github.com/electron/electron/issues/23506 for more information

bwOptions title fix

In the firewithFrame, shouldn't it be bwOptions.title ? bwOptions.title instead of title ? title. Believe its line 199

bwOptions = Object.assign(bwOptions, {
			frame: true,
			transparent: false,
			thickFrame: true,
			closable: true,
			title: bwOptions.title ? bwOptions.title : "name" in app ? app.name : app.getName(),
		});

Otherwise, what you set in swalOptions as the title won't be transferred to the bwOptions.

globalShortcut.registerAll is not a function

Using this nice library I got the error in the object at line 373.
I changed the code removing registerAll and adding:

globalShortcut.register(
	"CommandOrControl+R",
	() => {}
);
globalShortcut.register(
	"CommandOrControl+Shift+R",
	() => {}
);

Now it seems working...which is the difference?

Position toast with respect to window not desktop

When firing a toast, the position values are absolute - they're calculated with respect to the desktop.

There should be an option to position them relative to the window bounds instead of desktop bounds.

For instance, these lines could be updated to include
window-top-right
window-top-left

etc.

I don't have time or would have raised a PR.

Toast positioning

Hi, I have problem with Toast.
I saw I can call it from Alert promise and this is wonderful, but I don't know why, any Toast appears in top-start (I think) whatever position I give (even without set it).

Which could be the problem?

Problem with Menu

Setup:
S.O: windows 10
electron : ^4.1.4
electron-alert: ^0.1.3

Import:
const Alert = require("electron-alert")

My code on index.js:

image

When i click test i recive this exception: TypeError: this.browserWindow.removeMenu is not a function at Alert.fire

allowOutsideClick option

Hi,
I am trying create undismissable alert, users will not be able to click outside of the alert box, on full screen app. sweet alert do this by allowOutsideClick to false. I tried with this library, it did not work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.