diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2020-05-19 10:57:22 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-19 10:57:22 +0300 |
commit | 18ebbb1546c7cb7105b6f4f1f3ff3672d50cc3be (patch) | |
tree | 3f3577978c0d039f5cf817c6b6b78ca515028ac5 | |
parent | 31d1bc129ff3a21ef9c5cbb670c240e6be0275ae (diff) | |
parent | d12b4a10521f258b8a532867d05334c5c2f85a55 (diff) |
Merge pull request #3613 from nextcloud/backport/3611/stable19
[stable19] Fix browser version comparison with Chromium
-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 |