@samitouri / QOSami-HFS / commits / 0dddf0c1

admin/home: show warning for any plugin error

Massimo Melina committed Oct 17, 2024 at 00:02 UTC 0dddf0c1d034920383435e3daa7979a5cf6c098f
1 file changed +4 -2
admin/src/HomePage.ts
+4 -2
@@ -61,8 +61,10 @@ export default function HomePage() {
61 !errors.length && [ SOLUTION_SEP, cfgLink("switch http or https on") ]
62 ),
63 with_(status.acmeRenewError, x => x && entry('warning', x)),
64 - with_(status.blacklistedInstalledPlugins, x => x?.length > 0 && entry('warning', "Found blacklisted plugin(s): ", x.join(', ')) ),
65 - plugins.find(x => x.badApi) && entry('warning', "Some plugins may be incompatible"),
64 + with_(status.blacklistedInstalledPlugins, x => x?.length > 0
65 + && entry('warning', "Found blacklisted plugin(s): ", x.join(', ')) ),
66 + with_(plugins?.filter(x => x.error || x.badApi).length, x => x > 0
67 + && entry('warning', `${x} plugin(s) failing`, SOLUTION_SEP, h(InLink, { to:'plugins' }, "check now"))),
68 !cfg.data?.split_uploads && (Date.now() - Number(status.cloudflareDetected || 0)) < DAY
69 && entry('', wikiLink('Reverse-proxy#cloudflare', "Cloudflare detected, read our guide")),
70 !vfs ? h(LinearProgress)