@@ -115,6 +115,8 @@ type Duration = {
115
115
type UpstreamBundle = {
116
116
compatible: string;
117
117
version: string;
118
+ manifest_hash: string;
119
+ effective_url: string;
118
120
newer_than_installed: boolean;
119
121
};
120
122
@@ -129,6 +131,11 @@ type Channel = {
129
131
bundle?: UpstreamBundle;
130
132
};
131
133
134
+ type UpdateRequest = {
135
+ manifest_hash: string;
136
+ url: string;
137
+ };
138
+
132
139
interface SlotStatusProps {
133
140
setCmdHint: (hint: React.ReactNode | null) => void;
134
141
}
@@ -402,11 +409,16 @@ export function UpdateChannels(props: UpdateChannelsProps) {
402
409
return "Up to date";
403
410
}
404
411
412
+ const request: UpdateRequest = {
413
+ manifest_hash: e.bundle.manifest_hash,
414
+ url: e.bundle.effective_url,
415
+ };
416
+
405
417
return (
406
418
<MqttButton
407
419
iconName="download"
408
420
topic="/v1/tac/update/install"
409
- send={e.url }
421
+ send={request }
410
422
>
411
423
Upgrade
412
424
</MqttButton>
@@ -539,7 +551,16 @@ export function UpdateNotification() {
539
551
if (channels !== undefined) {
540
552
for (let ch of channels) {
541
553
if (ch.enabled && ch.bundle && ch.bundle.newer_than_installed) {
542
- updates.push(ch);
554
+ const request: UpdateRequest = {
555
+ manifest_hash: ch.bundle.manifest_hash,
556
+ url: ch.bundle.effective_url,
557
+ };
558
+
559
+ updates.push({
560
+ name: ch.name,
561
+ display_name: ch.display_name,
562
+ request: request,
563
+ });
543
564
}
544
565
}
545
566
}
@@ -549,7 +570,7 @@ export function UpdateNotification() {
549
570
key={u.name}
550
571
iconName="download"
551
572
topic="/v1/tac/update/install"
552
- send={u.url }
573
+ send={u.request }
553
574
>
554
575
Install new {u.display_name} bundle
555
576
</MqttButton>
0 commit comments