mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-28 19:22:31 +01:00
fix (admin): 0 connection error
This commit is contained in:
parent
16245a1b93
commit
005cdddfc7
1 changed files with 11 additions and 7 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { createElement, createRender } from "../../lib/skeleton/index.js";
|
||||
import rxjs, { effect, applyMutations, onClick } from "../../lib/rx.js";
|
||||
import rxjs, { effect, applyMutations, applyMutation, onClick } from "../../lib/rx.js";
|
||||
import { createForm } from "../../lib/form.js";
|
||||
import { qs, qsa } from "../../lib/dom.js";
|
||||
import { formTmpl } from "../../components/form.js";
|
||||
|
|
@ -89,16 +89,20 @@ export default async function(render) {
|
|||
return $fieldset;
|
||||
},
|
||||
}))))),
|
||||
rxjs.map((nodeList) => {
|
||||
if (nodeList.length === 0) { return [createElement(`
|
||||
rxjs.tap(() => $enabled.innerHTML = ""),
|
||||
rxjs.mergeMap((nodeList) => {
|
||||
if (nodeList.length === 0) return rxjs.of(createElement(`
|
||||
<div class="alert">
|
||||
You need to select at least 1 storage backend
|
||||
</div>
|
||||
`)]; }
|
||||
return nodeList;
|
||||
`)).pipe(
|
||||
applyMutation($enabled, "appendChild"),
|
||||
rxjs.mergeMap(() => rxjs.EMPTY),
|
||||
);
|
||||
return rxjs.of(nodeList).pipe(
|
||||
applyMutations($enabled, "appendChild"),
|
||||
);
|
||||
}),
|
||||
rxjs.tap(() => $enabled.innerHTML = ""),
|
||||
applyMutations($enabled, "appendChild"),
|
||||
rxjs.share(),
|
||||
);
|
||||
effect(setupForm$);
|
||||
|
|
|
|||
Loading…
Reference in a new issue