Skip to content

Commit

Permalink
fixed error behavior and backdrop in install dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
matthme committed Aug 21, 2024
1 parent 3254b0d commit d3d15d5
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/renderer/src/routes/(main)/app-store/[slug]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,11 @@
appName: app?.title
}
},
response: ({ appId, networkSeed }: { appId: string; networkSeed: string }) => {
modalStore.close();
response: (r) => {
if (!r || r === true) {
return;
}
const { appId, networkSeed } = r;
if (appId.length === 0) {
return;
}
Expand All @@ -90,13 +93,21 @@
},
{
onSuccess: () => {
modalStore.close();
$installedApps.refetch();
toastStore.trigger({
message: `${appId} ${$i18n.t('installedSuccessfully')}`
});
goto(`/${APPS_VIEW}?${PRESEARCH_URL_QUERY}=${appId}`);
},
onError: (error) => handleError(error, versionEntity)
onError: (error) => {
console.error(error);
const errorMessage = getErrorMessage(error);
toastStore.trigger({
message: $i18n.t(errorMessage),
background: 'variant-filled-error'
});
}
}
);
}
Expand Down

0 comments on commit d3d15d5

Please sign in to comment.