mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-05-02 00:07:23 +08:00
refactor(lib): run prettier
This commit is contained in:
@@ -1,11 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
Cordova,
|
||||
CordovaCheck,
|
||||
CordovaProperty,
|
||||
IonicNativePlugin,
|
||||
Plugin
|
||||
} from '@ionic-native/core';
|
||||
import { Cordova, CordovaCheck, CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable, merge } from 'rxjs';
|
||||
|
||||
declare const navigator: any;
|
||||
@@ -15,10 +9,10 @@ export enum Connection {
|
||||
ETHERNET,
|
||||
WIFI,
|
||||
CELL_2G,
|
||||
CELL_3G ,
|
||||
CELL_3G,
|
||||
CELL_4G,
|
||||
CELL,
|
||||
NONE
|
||||
NONE,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -68,11 +62,10 @@ export enum Connection {
|
||||
plugin: 'cordova-plugin-network-information',
|
||||
pluginRef: 'navigator.connection',
|
||||
repo: 'https://github.com/apache/cordova-plugin-network-information',
|
||||
platforms: ['Amazon Fire OS', 'Android', 'Browser', 'iOS', 'Windows']
|
||||
platforms: ['Amazon Fire OS', 'Android', 'Browser', 'iOS', 'Windows'],
|
||||
})
|
||||
@Injectable()
|
||||
export class Network extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Constants for possible connection types
|
||||
*/
|
||||
@@ -84,7 +77,7 @@ export class Network extends IonicNativePlugin {
|
||||
CELL_3G: '3g',
|
||||
CELL_4G: '4g',
|
||||
CELL: 'cellular',
|
||||
NONE: 'none'
|
||||
NONE: 'none',
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -115,7 +108,7 @@ export class Network extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'offline',
|
||||
element: document
|
||||
element: document,
|
||||
})
|
||||
onDisconnect(): Observable<any> {
|
||||
return;
|
||||
@@ -128,7 +121,7 @@ export class Network extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
eventObservable: true,
|
||||
event: 'online',
|
||||
element: document
|
||||
element: document,
|
||||
})
|
||||
onConnect(): Observable<any> {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user