fix: use semver for latest version check
This commit is contained in:
parent
7508d92f92
commit
1a33a43a0d
@ -110,6 +110,7 @@ import _ from 'lodash'
|
|||||||
import AnimatedNumber from 'animated-number-vue'
|
import AnimatedNumber from 'animated-number-vue'
|
||||||
import { get } from 'vuex-pathify'
|
import { get } from 'vuex-pathify'
|
||||||
import gql from 'graphql-tag'
|
import gql from 'graphql-tag'
|
||||||
|
import semverLte from 'semver/functions/lte'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -134,7 +135,7 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
isLatestVersion() {
|
isLatestVersion() {
|
||||||
return this.info.currentVersion === this.info.latestVersion
|
return semverLte(this.info.latestVersion, this.info.currentVersion)
|
||||||
},
|
},
|
||||||
info: get('admin/info'),
|
info: get('admin/info'),
|
||||||
permissions: get('user/permissions')
|
permissions: get('user/permissions')
|
||||||
|
@ -14,7 +14,6 @@ module.exports = {
|
|||||||
tabContent += $.html(celm)
|
tabContent += $.html(celm)
|
||||||
$(celm).remove()
|
$(celm).remove()
|
||||||
})
|
})
|
||||||
console.info(tabContent)
|
|
||||||
tabContents.push(`<div class="tabset-panel">${tabContent}</div>`)
|
tabContents.push(`<div class="tabset-panel">${tabContent}</div>`)
|
||||||
$(hd).remove()
|
$(hd).remove()
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user