Add better release check logic

This commit is contained in:
Preston 2020-12-18 11:57:20 -05:00
parent 934447b32b
commit 57b004431f
1 changed files with 9 additions and 1 deletions

View File

@ -172,7 +172,15 @@ export default Vue.extend({
const message = this.$t('Version $ is now available! Click for more details')
this.updateBannerMessage = message.replace('$', versionNumber)
if (version < versionNumber) {
const appVersion = version.split('.')
const latestVersion = versionNumber.split('.')
if (parseInt(appVersion[0]) < parseInt(latestVersion[0])) {
this.showUpdatesBanner = true
} else if (parseInt(appVersion[1]) < parseInt(latestVersion[1])) {
this.showUpdatesBanner = true
} else if (parseInt(appVersion[2]) < parseInt(latestVersion[2])) {
this.showUpdatesBanner = true
}
}).fail((xhr, textStatus, error) => {