|
|
@ -1,4 +1,4 @@ |
|
|
|
export default async({ store, redirect, $axios, $toast, route }) => { |
|
|
|
export default async({ store, redirect, $axios, $toast, $api, route }) => { |
|
|
|
// if (!route.path || !route.path.startsWith('/nc/')) { await store.dispatch('plugins/pluginPostInstall', 'Branding') }
|
|
|
|
// if (!route.path || !route.path.startsWith('/nc/')) { await store.dispatch('plugins/pluginPostInstall', 'Branding') }
|
|
|
|
if (window.location.search && |
|
|
|
if (window.location.search && |
|
|
|
/\bscope=|\bstate=/.test(window.location.search) && |
|
|
|
/\bscope=|\bstate=/.test(window.location.search) && |
|
|
@ -63,11 +63,14 @@ export default async({ store, redirect, $axios, $toast, route }) => { |
|
|
|
// fetch latest release info
|
|
|
|
// fetch latest release info
|
|
|
|
const fetchReleaseInfo = async() => { |
|
|
|
const fetchReleaseInfo = async() => { |
|
|
|
try { |
|
|
|
try { |
|
|
|
const releaseInfo = await store.dispatch('sqlMgr/ActSqlOp', [null, 'xcRelease']) |
|
|
|
const releaseInfo = await $api.utils.appInfo() |
|
|
|
if (releaseInfo && releaseInfo.docker && releaseInfo.docker.upgrade) { |
|
|
|
const latestRelease = await $api.utils.appVersion() |
|
|
|
store.commit('app/MutReleaseVersion', releaseInfo.docker.name) |
|
|
|
if (releaseInfo && latestRelease && releaseInfo.version) { |
|
|
|
|
|
|
|
store.commit('app/MutReleaseVersion', releaseInfo.version) |
|
|
|
|
|
|
|
store.commit('app/MutLatestRelease', latestRelease.releaseVersion || null) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
store.commit('app/MutReleaseVersion', null) |
|
|
|
store.commit('app/MutReleaseVersion', null) |
|
|
|
|
|
|
|
store.commit('app/MutLatestRelease', null) |
|
|
|
} |
|
|
|
} |
|
|
|
} catch (e) { |
|
|
|
} catch (e) { |
|
|
|
// ignore
|
|
|
|
// ignore
|
|
|
|