grid: can unsync system OTAs from notifications

When shown the Base Blocked notification, the user can opt to disable
updates so as to continue using out-of-date apps.
This commit is contained in:
tomholford 2022-11-29 06:31:56 -08:00
parent 8239781550
commit d3474705a9

View File

@ -51,14 +51,23 @@ export const BaseBlockedNotification = () => {
const [b, u] = partition(Object.entries(s.pikes), ([, pike]) => pikeIsBlocked(newKelvin, pike));
return [b.map(([d]) => d), u.map(([d]) => d)] as const;
});
const { toggleInstall } = useKilnState();
const blockedCharges = Object.values(pick(charges, blocked));
const count = blockedCharges.length;
const handlePauseOTAs = useCallback(() => {}, []);
const handlePauseOTAs = useCallback(async () => {
const otaSponsor = basePike?.sync?.ship;
if (!otaSponsor) {
return;
}
await toggleInstall('base', otaSponsor);
push('/leap/upgrading');
}, []);
const handleArchiveApps = useCallback(async () => {
api.poke(kilnBump());
await api.poke(kilnBump());
push('/leap/upgrading');
}, []);