fix: admin/home: avoid displaying wrong warning while actually loading data

Massimo Melina committed Mar 30, 2022 at 18:50 UTC 4032e7e04df142e77d2cba451436d8ad8473e551
1 file changed +2 -1
admin/src/HomePage.ts
+2 -1
@@ -33,7 +33,8 @@ export default function HomePage() {
33 !cfg ? spinner() :
34 errors.length ? dontBotherWithKeys(errors.map(msg => entry('error', dontBotherWithKeys(msg))))
35 : entry('success', "Server is working"),
36 - !vfs?.root?.children?.length && !vfs?.root?.source
36 + !vfs ? spinner()
37 + : !vfs.root?.children?.length && !vfs.root?.source
38 ? entry('warning', "You have no files shared", SOLUTION_SEP, fsLink("add some"))
39 : entry('', "Here you manage your server. There is a SEPARATED interface to access your shared files: ",
40 h(Link, { target:'frontend', href: '/' }, "Frontend interface", h(Launch, { sx: { verticalAlign: 'sub', ml: '.2em' } }))),