|
|
@@ -102,11 +102,19 @@ class ChromeExtensionBanner extends PureComponent<Props, State> {
|
|
102
|
102
|
*
|
|
103
|
103
|
* @inheritdoc
|
|
104
|
104
|
*/
|
|
105
|
|
- async componentDidUpdate() {
|
|
|
105
|
+ async componentDidUpdate(prevProps) {
|
|
106
|
106
|
if (!this._isSupportedEnvironment()) {
|
|
107
|
107
|
return;
|
|
108
|
108
|
}
|
|
109
|
109
|
|
|
|
110
|
+ if (this.props.chromeExtensionUrl && !prevProps.chromeExtensionUrl) {
|
|
|
111
|
+ logger.info('Chrome extension URL found.');
|
|
|
112
|
+ }
|
|
|
113
|
+
|
|
|
114
|
+ if (this.props.chromeExtensionsInfo.length && !prevProps.chromeExtensionsInfo.length) {
|
|
|
115
|
+ logger.info('Chrome extension(s) info found.');
|
|
|
116
|
+ }
|
|
|
117
|
+
|
|
110
|
118
|
const hasExtensions = await this._checkExtensionsInstalled();
|
|
111
|
119
|
|
|
112
|
120
|
if (
|
|
|
@@ -175,10 +183,6 @@ class ChromeExtensionBanner extends PureComponent<Props, State> {
|
|
175
|
183
|
});
|
|
176
|
184
|
const extensionInstalledFunction = info => isExtensionInstalled(info);
|
|
177
|
185
|
|
|
178
|
|
- if (!this.props.chromeExtensionsInfo.length) {
|
|
179
|
|
- logger.warn('Further configuration needed, missing chrome extension(s) info');
|
|
180
|
|
- }
|
|
181
|
|
-
|
|
182
|
186
|
return Promise.all(
|
|
183
|
187
|
this.props.chromeExtensionsInfo.map(info => extensionInstalledFunction(info))
|
|
184
|
188
|
);
|
|
|
@@ -196,15 +200,10 @@ class ChromeExtensionBanner extends PureComponent<Props, State> {
|
|
196
|
200
|
return true;
|
|
197
|
201
|
}
|
|
198
|
202
|
|
|
199
|
|
- if (!this.props.chromeExtensionUrl) {
|
|
200
|
|
- logger.warn('Further configuration needed, missing chrome extension URL');
|
|
201
|
|
-
|
|
202
|
|
- return true;
|
|
203
|
|
- }
|
|
204
|
|
-
|
|
205
|
203
|
const dontShowAgain = localStorage.getItem(DONT_SHOW_AGAIN_CHECKED) === 'true';
|
|
206
|
204
|
|
|
207
|
|
- return dontShowAgain
|
|
|
205
|
+ return !this.props.chromeExtensionUrl
|
|
|
206
|
+ || dontShowAgain
|
|
208
|
207
|
|| this.state.closePressed
|
|
209
|
208
|
|| !this.state.shouldShow
|
|
210
|
209
|
|| this.props.iAmRecorder;
|