mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-05-02 00:07:23 +08:00
Merge branch 'master' into v5
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { checkAvailability, Cordova, CordovaInstance, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import {
|
||||
Cordova,
|
||||
CordovaInstance,
|
||||
IonicNativePlugin,
|
||||
Plugin,
|
||||
checkAvailability
|
||||
} from '@ionic-native/core';
|
||||
|
||||
declare const Notification: any;
|
||||
|
||||
@@ -7,23 +13,25 @@ declare const Notification: any;
|
||||
* @hidden
|
||||
*/
|
||||
export class PLNObject {
|
||||
|
||||
private _objectInstance: any;
|
||||
|
||||
constructor(title: string, options: LocalNotificationOptions) {
|
||||
if (checkAvailability(PhonegapLocalNotification.pluginRef, null, PhonegapLocalNotification.pluginName) === true) {
|
||||
if (
|
||||
checkAvailability(
|
||||
PhonegapLocalNotification.pluginRef,
|
||||
null,
|
||||
PhonegapLocalNotification.pluginName
|
||||
) === true
|
||||
) {
|
||||
this._objectInstance = new Notification(title, options);
|
||||
}
|
||||
}
|
||||
|
||||
@CordovaInstance({ sync: true })
|
||||
close(): void {
|
||||
}
|
||||
|
||||
close(): void {}
|
||||
}
|
||||
|
||||
export interface LocalNotificationOptions {
|
||||
|
||||
/**
|
||||
* Sets the direction of the notification. One of "auto", "ltr" or "rtl"
|
||||
*/
|
||||
@@ -48,7 +56,6 @@ export interface LocalNotificationOptions {
|
||||
* Sets the icon of the notification
|
||||
*/
|
||||
icon?: string;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -95,7 +102,6 @@ export interface LocalNotificationOptions {
|
||||
})
|
||||
@Injectable()
|
||||
export class PhonegapLocalNotification extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* A global object that lets you interact with the Notification API.
|
||||
* @param title {string} Title of the local notification.
|
||||
@@ -114,5 +120,4 @@ export class PhonegapLocalNotification extends IonicNativePlugin {
|
||||
requestPermission(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user