@adea-ai/ui 0.25.6 → 0.25.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -95,7 +95,9 @@ function VersionDialog(props) {
|
|
|
95
95
|
setBusy(true);
|
|
96
96
|
setError("");
|
|
97
97
|
try {
|
|
98
|
-
|
|
98
|
+
const next = await props.adapter.install(version);
|
|
99
|
+
setUpdate(next);
|
|
100
|
+
if (next.phase === "failed") setError(errorMessage(next.error, "Update installation failed"));
|
|
99
101
|
} catch (caught) {
|
|
100
102
|
setError(errorMessage(caught, "Update installation failed"));
|
|
101
103
|
await loadCurrentStatus();
|
package/package.json
CHANGED
|
@@ -157,7 +157,14 @@ export function VersionDialog(props: {
|
|
|
157
157
|
setBusy(true)
|
|
158
158
|
setError('')
|
|
159
159
|
try {
|
|
160
|
-
|
|
160
|
+
const next = await props.adapter.install(version)
|
|
161
|
+
setUpdate(next)
|
|
162
|
+
// A refused install answers with a normal status payload whose phase is
|
|
163
|
+
// `failed` (the shell's download/extract/apply errors). Without this,
|
|
164
|
+
// clicking install looked like nothing happened at all.
|
|
165
|
+
if (next.phase === 'failed') {
|
|
166
|
+
setError(errorMessage(next.error, 'Update installation failed'))
|
|
167
|
+
}
|
|
161
168
|
} catch (caught) {
|
|
162
169
|
setError(errorMessage(caught, 'Update installation failed'))
|
|
163
170
|
await loadCurrentStatus()
|