Block other actions during update
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
1a034ce699
commit
67753321b3
|
@ -258,14 +258,17 @@ const actions = {
|
||||||
updateApp(context, { appId }) {
|
updateApp(context, { appId }) {
|
||||||
return api.requireAdmin().then((response) => {
|
return api.requireAdmin().then((response) => {
|
||||||
context.commit('startLoading', appId);
|
context.commit('startLoading', appId);
|
||||||
|
context.commit('startLoading', 'install');
|
||||||
return api.get(OC.generateUrl(`settings/apps/update/${appId}`))
|
return api.get(OC.generateUrl(`settings/apps/update/${appId}`))
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
|
context.commit('stopLoading', 'install');
|
||||||
context.commit('stopLoading', appId);
|
context.commit('stopLoading', appId);
|
||||||
context.commit('updateApp', appId);
|
context.commit('updateApp', appId);
|
||||||
return true;
|
return true;
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
context.commit('stopLoading', appId);
|
context.commit('stopLoading', appId);
|
||||||
|
context.commit('stopLoading', 'install');
|
||||||
context.commit('APPS_API_FAILURE', { appId, error })
|
context.commit('APPS_API_FAILURE', { appId, error })
|
||||||
})
|
})
|
||||||
}).catch((error) => context.commit('API_FAILURE', { appId, error }));
|
}).catch((error) => context.commit('API_FAILURE', { appId, error }));
|
||||||
|
|
Loading…
Reference in New Issue