Add better release check logic
This commit is contained in:
parent
934447b32b
commit
57b004431f
|
@ -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) => {
|
||||
|
|
Loading…
Reference in New Issue