mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
加入版本检测
This commit is contained in:
@@ -78,6 +78,8 @@ export default {
|
||||
'Sync Frequency': '同步频率',
|
||||
'Reset': '重置',
|
||||
'Copy': '复制',
|
||||
'Upgrade': '版本升级',
|
||||
'Ok': '确定',
|
||||
|
||||
// 主页
|
||||
'Total Tasks': '总任务数',
|
||||
@@ -390,6 +392,9 @@ export default {
|
||||
'New directory name': '新目录名称',
|
||||
'Enter new file name': '输入新文件名称',
|
||||
'New file name': '新文件名称',
|
||||
'Release Note': '发布记录',
|
||||
'How to Upgrade': '升级方式',
|
||||
'Release': '发布',
|
||||
|
||||
// 登录
|
||||
'Sign in': '登录',
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
import request from '../../api/request'
|
||||
|
||||
const state = {
|
||||
version: ''
|
||||
version: '',
|
||||
latestRelease: {
|
||||
name: '',
|
||||
body: ''
|
||||
}
|
||||
}
|
||||
|
||||
const getters = {}
|
||||
@@ -7,10 +13,20 @@ const getters = {}
|
||||
const mutations = {
|
||||
SET_VERSION: (state, value) => {
|
||||
state.version = value
|
||||
},
|
||||
SET_LATEST_RELEASE: (state, value) => {
|
||||
state.latestRelease = value
|
||||
}
|
||||
}
|
||||
|
||||
const actions = {}
|
||||
const actions = {
|
||||
async getLatestRelease ({ commit }) {
|
||||
const res = await request.get('/releases/latest')
|
||||
if (!res.data.error) {
|
||||
commit('SET_LATEST_RELEASE', res.data.data)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
|
||||
Reference in New Issue
Block a user