From b7452d3c10e208f17a3d146df00d4f40d8d06c4e Mon Sep 17 00:00:00 2001 From: fydne <121295212+fydne@users.noreply.github.com> Date: Mon, 3 Jul 2023 18:46:55 +0500 Subject: [PATCH] 1.2.1 - added: NotifyManager.isLoaded() : boolean - added: NotifyManager.getWindow() : BrowserWindow --- NotifyManager.js | 8 ++++++++ README.md | 2 +- files/index.d.ts | 12 ++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 24 insertions(+), 4 deletions(-) diff --git a/NotifyManager.js b/NotifyManager.js index 5e42999..9e1d504 100644 --- a/NotifyManager.js +++ b/NotifyManager.js @@ -85,6 +85,14 @@ module.exports = class NotifyManager { })(); } + isLoaded() { + return this.loaded; + } + + getWindow() { + return this.win; + } + /** * @param {Notify} notify Notification to show */ diff --git a/README.md b/README.md index 0e3a993..2439044 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ You can test the library with `npm run test` or `npm run test.reply`. And also s #### Approximate result: - + > You can change the appearance of the notification by adding your style when creating the NotifyManager diff --git a/files/index.d.ts b/files/index.d.ts index 7416398..86926cb 100644 --- a/files/index.d.ts +++ b/files/index.d.ts @@ -1,3 +1,5 @@ +import { BrowserWindow } from "electron"; + export class Notify { /** * @param title Title of notify @@ -112,4 +114,14 @@ export class NotifyManager { * @param notify Notification to destroy */ destroy(notify: Notify) : void; + + /** + * Displays whether initialization has ended or not. + */ + isLoaded() : boolean; + + /** + * Gets the BrowserWindow of notification manager. + */ + getWindow() : BrowserWindow; }; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 48a122e..0f18087 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "notify-manager-electron", - "version": "1.2.0", + "version": "1.2.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "notify-manager-electron", - "version": "1.2.0", + "version": "1.2.1", "license": "MIT", "devDependencies": { "electron": "^23.1.0" diff --git a/package.json b/package.json index ab6b370..87ef859 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "notify-manager-electron", - "version": "1.2.0", + "version": "1.2.1", "description": "Create beautiful and functional notifications on electron", "main": "files/index.js", "types": "files/index.d.ts",