diff --git a/README.md b/README.md index b3f307e5..9fa1a529 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@
-
-
+
+
diff --git a/src/config.ts b/src/config.ts
index c3b03af2..9c9b605b 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -18,7 +18,7 @@
/**
* @private
*/
-const PICKER_VERSION = '1.4.7';
+const PICKER_VERSION = '1.4.8';
/**
* @private
diff --git a/src/lib/picker.ts b/src/lib/picker.ts
index 162afd49..1af048f3 100644
--- a/src/lib/picker.ts
+++ b/src/lib/picker.ts
@@ -155,6 +155,13 @@ export interface PickerFileMetadata {
url: string;
}
+export interface CustomAuthTextOptions {
+ [key: string]: {
+ top?: string[],
+ bottom?: string[]
+ };
+}
+
export interface PickerResponse {
filesUploaded: PickerFileMetadata[];
filesFailed: PickerFileMetadata[];
@@ -387,6 +394,36 @@ export interface PickerOptions {
cleanupImageExif?: boolean | {
keepOrientation: boolean
};
+ /**
+ * Customize the text on the cloud authentication screen in Picker.
+ * Use a cloud source name (see [[PickerOptions.fromSources]])
+ * or a 'default' as a key, then put your custom notice or consent
+ * to the 'top' or the 'bottom' key to show it respectivly above or under 'Connect button'.
+ *
+ * ```javascript
+ * customAuthText: {
+ * // use it for every cloud authentication screen
+ * default: {
+ * top: [
+ * 'default top first line',
+ * 'default top second line'
+ * ],
+ * bottom: [
+ * 'default bottom first line',
+ * 'default bottom second line'
+ * ]
+ * },
+ * // override a default bottom text for only gmail
+ * gmail: {
+ * bottom: [
+ * 'We need your permission to access your data and',
+ * 'process it with our machine learning system.'
+ * ]
+ * }
+ * }
+ * ```
+ */
+ customAuthText?: CustomAuthTextOptions;
/**
* Picker display mode, one of `'inline'`, `'overlay'`, `'dropPane'` - default is `'overlay'`.
*/