fix: the webui does not allow to disable the last admin now.
Release / release (push) Failing after 4s
Release / release (push) Failing after 4s
This commit is contained in:
1 parent
5fff009320
commit
ff0c93ed73
10 files changed
+46
-15
No files matched your search
@@ -79,13 +79,16 @@ export default function SitesPanel(props: { onOpenFiles: (name: string) => void
|
||||
/** Runs a change of a site, then reads the list again; a failure is shown above the list. */
|
||||
async function change(work: () => Promise<unknown>) {
|
||||
setBusy(true)
|
||||
let failure: string | null = null
|
||||
try {
|
||||
await work()
|
||||
setError(null)
|
||||
} catch (caught) {
|
||||
setError((caught as Error).message)
|
||||
failure = (caught as Error).message
|
||||
}
|
||||
await refresh()
|
||||
if (failure !== null) {
|
||||
setError(failure)
|
||||
}
|
||||
}
|
||||
|
||||
function remove(site: Site) {
|
||||
|
||||
Reference in new issue
Block a user