mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-22 01:19:36 +08:00
refactor(safariviewcontroller):
This commit is contained in:
parent
c771abc8c3
commit
d46f22d2a1
@ -1,4 +1,5 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name SafariViewController
|
* @name SafariViewController
|
||||||
@ -39,59 +40,60 @@ import {Plugin, Cordova} from './plugin';
|
|||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
@Plugin({
|
@Plugin({
|
||||||
plugin: 'cordova-plugin-safariviewcontroller',
|
plugin: 'cordova-plugin-safariviewcontroller',
|
||||||
pluginRef: 'SafariViewController',
|
pluginRef: 'SafariViewController',
|
||||||
platforms: ['iOS', 'Android'],
|
platforms: ['iOS', 'Android'],
|
||||||
repo: 'https://github.com/EddyVerbruggen/cordova-plugin-safariviewcontroller'
|
repo: 'https://github.com/EddyVerbruggen/cordova-plugin-safariviewcontroller'
|
||||||
})
|
})
|
||||||
export class SafariViewController {
|
export class SafariViewController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if SafariViewController is available
|
* Checks if SafariViewController is available
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isAvailable(): Promise<boolean> {return; }
|
static isAvailable(): Promise<boolean> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shows Safari View Controller
|
* Shows Safari View Controller
|
||||||
* @param options
|
* @param options
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static show(options?: SafariViewControllerOptions): Promise<any> {return; }
|
static show(options?: SafariViewControllerOptions): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hides Safari View Controller
|
* Hides Safari View Controller
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static hide(): void {}
|
static hide(): void { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tries to connect to the Chrome's custom tabs service. you must call this method before calling any of the other methods listed below.
|
* Tries to connect to the Chrome's custom tabs service. you must call this method before calling any of the other methods listed below.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static connectToService(): Promise<any> {return; }
|
static connectToService(): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this method whenever there's a chance the user will open an external url.
|
* Call this method whenever there's a chance the user will open an external url.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static warmUp(): Promise<any> {return; }
|
static warmUp(): Promise<any> { return; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For even better performance optimization, call this methods if there's more than a 50% chance the user will open a certain URL.
|
||||||
|
* @param url
|
||||||
|
*/
|
||||||
|
@Cordova()
|
||||||
|
static mayLaunchUrl(url: string): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
|
||||||
* For even better performance optimization, call this methods if there's more than a 50% chance the user will open a certain URL.
|
|
||||||
* @param url
|
|
||||||
*/
|
|
||||||
@Cordova()
|
|
||||||
static mayLaunchUrl(url: string): Promise<any> {return; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SafariViewControllerOptions {
|
export interface SafariViewControllerOptions {
|
||||||
url?: string;
|
url?: string;
|
||||||
hidden?: boolean;
|
hidden?: boolean;
|
||||||
toolbarColor?: string;
|
toolbarColor?: string;
|
||||||
animated?: boolean;
|
animated?: boolean;
|
||||||
showDefaultShareMenuItem?: boolean;
|
showDefaultShareMenuItem?: boolean;
|
||||||
enterReaderModeIfAvailable?: boolean;
|
enterReaderModeIfAvailable?: boolean;
|
||||||
tintColor?: string;
|
tintColor?: string;
|
||||||
transition?: string;
|
transition?: string;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user