mirror of
https://github.com/wukko/cobalt.git
synced 2025-06-13 05:37:44 +02:00
web/dialog: refactor types and logic
This commit is contained in:
@ -19,9 +19,7 @@
|
||||
bodySubText={dialog.bodySubText}
|
||||
buttons={dialog.buttons}
|
||||
/>
|
||||
{/if}
|
||||
|
||||
{#if dialog.type === "picker"}
|
||||
{:else if dialog.type === "picker"}
|
||||
<PickerDialog
|
||||
id={dialog.id}
|
||||
items={dialog.items}
|
||||
|
@ -69,7 +69,7 @@
|
||||
restoreDownloadButton();
|
||||
|
||||
return createDialog({
|
||||
...(defaultErrorPopup as DialogInfo),
|
||||
...defaultErrorPopup,
|
||||
bodyText: "couldn't access the api",
|
||||
});
|
||||
}
|
||||
@ -79,7 +79,7 @@
|
||||
restoreDownloadButton();
|
||||
|
||||
return createDialog({
|
||||
...(defaultErrorPopup as DialogInfo),
|
||||
...defaultErrorPopup,
|
||||
bodyText: response.text,
|
||||
});
|
||||
}
|
||||
@ -106,7 +106,7 @@
|
||||
restoreDownloadButton();
|
||||
|
||||
return createDialog({
|
||||
...(defaultErrorPopup as DialogInfo),
|
||||
...defaultErrorPopup,
|
||||
bodyText: "couldn't probe the stream",
|
||||
});
|
||||
}
|
||||
@ -146,7 +146,7 @@
|
||||
restoreDownloadButton();
|
||||
|
||||
return createDialog({
|
||||
...(defaultErrorPopup as DialogInfo),
|
||||
...defaultErrorPopup,
|
||||
bodyText: "unknown/unsupported status",
|
||||
});
|
||||
};
|
||||
|
Reference in New Issue
Block a user