feat(extension-banner) Show edge extension when edge browser detected
This commit is contained in:
parent
06d0cbd418
commit
1ee9f6a7e5
|
@ -949,12 +949,18 @@ var config = {
|
|||
// chromeExtensionBanner: {
|
||||
// // The chrome extension to be installed address
|
||||
// url: 'https://chrome.google.com/webstore/detail/jitsi-meetings/kglhbbefdnlheedjiejgomgmfplipfeb',
|
||||
// edgeUrl: 'https://microsoftedge.microsoft.com/addons/detail/jitsi-meetings/eeecajlpbgjppibfledfihobcabccihn',
|
||||
|
||||
// // Extensions info which allows checking if they are installed or not
|
||||
// chromeExtensionsInfo: [
|
||||
// {
|
||||
// id: 'kglhbbefdnlheedjiejgomgmfplipfeb',
|
||||
// path: 'jitsi-logo-48x48.png'
|
||||
// },
|
||||
// // Edge extension info
|
||||
// {
|
||||
// id: 'eeecajlpbgjppibfledfihobcabccihn',
|
||||
// path: 'jitsi-logo-48x48.png'
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
|
|
|
@ -116,6 +116,7 @@
|
|||
},
|
||||
"chromeExtensionBanner": {
|
||||
"buttonText": "Install Chrome Extension",
|
||||
"buttonTextEdge": "Install Edge Extension",
|
||||
"close": "Close",
|
||||
"dontShowAgain": "Don’t show me this again",
|
||||
"installExtensionText": "Install the extension for Google Calendar and Office 365 integration"
|
||||
|
|
|
@ -104,6 +104,7 @@ class ChromeExtensionBanner extends PureComponent<Props, State> {
|
|||
shouldShow: false
|
||||
};
|
||||
|
||||
this.isEdge = /Edg(e)?/.test(navigator.userAgent);
|
||||
this._onClosePressed = this._onClosePressed.bind(this);
|
||||
this._onInstallExtensionClick = this._onInstallExtensionClick.bind(this);
|
||||
this._shouldNotRender = this._shouldNotRender.bind(this);
|
||||
|
@ -196,8 +197,10 @@ class ChromeExtensionBanner extends PureComponent<Props, State> {
|
|||
* @returns {void}
|
||||
*/
|
||||
_onInstallExtensionClick() {
|
||||
const { edgeUrl, url } = this.props.bannerCfg;
|
||||
|
||||
sendAnalytics(createChromeExtensionBannerEvent(true));
|
||||
window.open(this.props.bannerCfg.url);
|
||||
window.open(this.isEdge && edgeUrl ? edgeUrl : url);
|
||||
this.setState({ closePressed: true });
|
||||
}
|
||||
|
||||
|
@ -264,7 +267,7 @@ class ChromeExtensionBanner extends PureComponent<Props, State> {
|
|||
|
||||
return null;
|
||||
}
|
||||
const { t } = this.props;
|
||||
const { bannerCfg, t } = this.props;
|
||||
const mainClassNames = this.props.conference
|
||||
? 'chrome-extension-banner chrome-extension-banner__pos_in_meeting'
|
||||
: 'chrome-extension-banner';
|
||||
|
@ -306,7 +309,10 @@ class ChromeExtensionBanner extends PureComponent<Props, State> {
|
|||
<div
|
||||
className = 'chrome-extension-banner__button-text'
|
||||
id = 'chrome-extension-banner__button-text'>
|
||||
{ t('chromeExtensionBanner.buttonText') }
|
||||
{ t(this.isEdge && bannerCfg.edgeUrl
|
||||
? 'chromeExtensionBanner.buttonTextEdge'
|
||||
: 'chromeExtensionBanner.buttonText')
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue