mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +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
|
||||
@ -39,59 +40,60 @@ import {Plugin, Cordova} from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
plugin: 'cordova-plugin-safariviewcontroller',
|
||||
pluginRef: 'SafariViewController',
|
||||
platforms: ['iOS', 'Android'],
|
||||
repo: 'https://github.com/EddyVerbruggen/cordova-plugin-safariviewcontroller'
|
||||
plugin: 'cordova-plugin-safariviewcontroller',
|
||||
pluginRef: 'SafariViewController',
|
||||
platforms: ['iOS', 'Android'],
|
||||
repo: 'https://github.com/EddyVerbruggen/cordova-plugin-safariviewcontroller'
|
||||
})
|
||||
export class SafariViewController {
|
||||
|
||||
/**
|
||||
* Checks if SafariViewController is available
|
||||
*/
|
||||
@Cordova()
|
||||
static isAvailable(): Promise<boolean> {return; }
|
||||
/**
|
||||
* Checks if SafariViewController is available
|
||||
*/
|
||||
@Cordova()
|
||||
static isAvailable(): Promise<boolean> { return; }
|
||||
|
||||
/**
|
||||
* Shows Safari View Controller
|
||||
* @param options
|
||||
*/
|
||||
@Cordova()
|
||||
static show(options?: SafariViewControllerOptions): Promise<any> {return; }
|
||||
/**
|
||||
* Shows Safari View Controller
|
||||
* @param options
|
||||
*/
|
||||
@Cordova()
|
||||
static show(options?: SafariViewControllerOptions): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Hides Safari View Controller
|
||||
*/
|
||||
@Cordova()
|
||||
static hide(): void {}
|
||||
/**
|
||||
* Hides Safari View Controller
|
||||
*/
|
||||
@Cordova()
|
||||
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.
|
||||
*/
|
||||
@Cordova()
|
||||
static connectToService(): Promise<any> {return; }
|
||||
/**
|
||||
* 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()
|
||||
static connectToService(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Call this method whenever there's a chance the user will open an external url.
|
||||
*/
|
||||
@Cordova()
|
||||
static warmUp(): Promise<any> {return; }
|
||||
/**
|
||||
* Call this method whenever there's a chance the user will open an external url.
|
||||
*/
|
||||
@Cordova()
|
||||
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 {
|
||||
url?: string;
|
||||
hidden?: boolean;
|
||||
toolbarColor?: string;
|
||||
animated?: boolean;
|
||||
showDefaultShareMenuItem?: boolean;
|
||||
enterReaderModeIfAvailable?: boolean;
|
||||
tintColor?: string;
|
||||
transition?: string;
|
||||
url?: string;
|
||||
hidden?: boolean;
|
||||
toolbarColor?: string;
|
||||
animated?: boolean;
|
||||
showDefaultShareMenuItem?: boolean;
|
||||
enterReaderModeIfAvailable?: boolean;
|
||||
tintColor?: string;
|
||||
transition?: string;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user