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
@@ -58,13 +58,16 @@ export default function GroupsPanel() {
|
||||
/** Runs a change of a group, 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(group: Group) {
|
||||
|
||||
@@ -95,13 +95,16 @@ export default function ServiceAccountsPanel() {
|
||||
/** Runs a change of an account, 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(account: User) {
|
||||
|
||||
@@ -114,13 +114,16 @@ export default function SiteFiles(props: { site: string | null; onSite: (name: s
|
||||
/** Runs a change of the files, then reads the folder 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)
|
||||
}
|
||||
}
|
||||
|
||||
/** Uploads the files one after the other into the folder shown, a zip archive extracted there while extract is on. */
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -97,16 +97,19 @@ export default function UsersPanel() {
|
||||
void refresh()
|
||||
}, [refresh])
|
||||
|
||||
/** Runs a change of a user, then reads the list again; a failure is shown above the list. */
|
||||
/** Runs a change of a user, then reads the list again; a failure is shown above the list after the reading. */
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
||||
async function download(name: string) {
|
||||
|
||||
Reference in new issue
Block a user