Fix modal flashing when reverting app version and fix version number being incorrect
This commit is contained in:
parent
a7a081da8c
commit
4eb6d1e624
|
@ -38,7 +38,9 @@
|
||||||
if (response.status !== 200) {
|
if (response.status !== 200) {
|
||||||
throw json.message
|
throw json.message
|
||||||
}
|
}
|
||||||
await refreshAppPackage()
|
|
||||||
|
// Don't wait for the async refresh, since this causes modal flashing
|
||||||
|
refreshAppPackage()
|
||||||
notifications.success(
|
notifications.success(
|
||||||
`App updated successfully to version ${clientPackage.version}`
|
`App updated successfully to version ${clientPackage.version}`
|
||||||
)
|
)
|
||||||
|
@ -49,6 +51,7 @@
|
||||||
|
|
||||||
const revert = async () => {
|
const revert = async () => {
|
||||||
try {
|
try {
|
||||||
|
const revertableVersion = $store.revertableVersion
|
||||||
const response = await api.post(
|
const response = await api.post(
|
||||||
`/api/applications/${appId}/client/revert`
|
`/api/applications/${appId}/client/revert`
|
||||||
)
|
)
|
||||||
|
@ -56,9 +59,11 @@
|
||||||
if (response.status !== 200) {
|
if (response.status !== 200) {
|
||||||
throw json.message
|
throw json.message
|
||||||
}
|
}
|
||||||
await refreshAppPackage()
|
|
||||||
|
// Don't wait for the async refresh, since this causes modal flashing
|
||||||
|
refreshAppPackage()
|
||||||
notifications.success(
|
notifications.success(
|
||||||
`App reverted successfully to version ${$store.revertableVersion}`
|
`App reverted successfully to version ${revertableVersion}`
|
||||||
)
|
)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
notifications.error(`Error reverting app: ${err}`)
|
notifications.error(`Error reverting app: ${err}`)
|
||||||
|
|
Loading…
Reference in New Issue