diff options
Diffstat (limited to 'src/mixins/browserCheck.js')
-rw-r--r-- | src/mixins/browserCheck.js | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/mixins/browserCheck.js b/src/mixins/browserCheck.js index 719f33f85..d7af88150 100644 --- a/src/mixins/browserCheck.js +++ b/src/mixins/browserCheck.js @@ -26,7 +26,7 @@ import UAParser from 'ua-parser-js' const browserCheck = { methods: { checkBrowser() { - console.info('Detected browser ' + this.browser.name + ' ' + this.browser.version) + console.info('Detected browser ' + this.browser.name + ' ' + this.majorVersion + ' (' + this.browser.version + ')') if (!this.isFullySupported) { showError( this.unsupportedWarning, @@ -58,17 +58,21 @@ const browserCheck = { return this.browser.name === 'IE' || this.browser.name === 'IEMobile' }, + majorVersion() { + return parseInt(this.browser.version.split('.')[0], 10) + }, + isFullySupported() { - return (this.isFirefox && this.browser.version >= 52) - || (this.isChrome && this.browser.version >= 49) - || (this.isSafari && this.browser.version >= 12) + return (this.isFirefox && this.majorVersion >= 52) + || (this.isChrome && this.majorVersion >= 49) + || (this.isSafari && this.majorVersion >= 12) || this.isEdge }, // Disable the call button and show the tooltip blockCalls() { - return (this.isFirefox && this.browser.version < 52) - || (this.isChrome && this.browser.version < 49) - || (this.isSafari && this.browser.version < 12) + return (this.isFirefox && this.majorVersion < 52) + || (this.isChrome && this.majorVersion < 49) + || (this.isSafari && this.majorVersion < 12) || this.isIE }, // Used both in the toast and in the call button tooltip |