chore (viewerpage): refactor for plugins

This commit is contained in:
MickaelK 2025-04-22 13:13:21 +10:00
parent 2c09815c4e
commit e7c8ee3bc9

View file

@ -58,7 +58,7 @@ export default WithShell(async function(render) {
// feature: render viewer application
effect(rxjs.of(getConfig("mime", {})).pipe(
rxjs.map((mimes) => opener(basename(getCurrentPath()), mimes)),
rxjs.mergeMap(([opener, opts]) => rxjs.from(loadModule(opener)).pipe(rxjs.tap((module) => {
rxjs.mergeMap(([opener, opts]) => rxjs.from(loadModule(opener)).pipe(rxjs.switchMap(async (module) => {
module.default(createRender($page), { ...opts, acl$: options(), getFilename, getDownloadUrl });
}))),
rxjs.catchError(ctrlError()),