ux: admin/home: reorganized elements for importance
Massimo Melina committed
Dec 3, 2025 at 18:44 UTC
1973da3cd4aa30bce34eb9f620012ca470fb69f4
2 files changed
+6
-5
admin/src/HomePage.ts
+5
-5
@@ -66,14 +66,13 @@ export default function HomePage() {
66
return h(Box, {},
67
h(RandomPlugin),
68
h(Box, { display:'flex', gap: 2, flexDirection:'column', alignItems: 'flex-start', height: '100%' },
69
- entry('', md("This is the *Admin-panel*, where you manage your server. Access your files on the [Front-end](../..).")),
70
- vfs && !vfs.children?.length && !vfs.source ? entry('warning', "You have no shared files", SOLUTION_SEP, fsLink("add some")) : null,
71
- account?.adminActualAccess ? entry('', "Welcome, "+username)
72
- : entry('', md("You're accessing the Admin-panel without an account because you are on localhost"),
73
- SOLUTION_SEP, "to access from another computer, you must ", h(InLink, { to:'accounts' }, md("create an account with *admin* permission")) ),
69
dontBotherWithKeys(status.alerts?.map(x => entry('warning', md(x, { html: false })))),
70
errors.length ? dontBotherWithKeys(errors.map(msg => entry('error', dontBotherWithKeys(msg))))
71
: entry('success', "Server is working"),
72
+ vfs && !vfs.children?.length && !vfs.source ? entry('warning', "You have no shared files", SOLUTION_SEP, fsLink("add some")) : null,
73
+ account?.adminActualAccess ? entry('', "Welcome, "+username)
74
+ : entry('', md("You're accessing the Admin-panel without an account because you are on localhost"),
75
+ ...status.anyAccountCanLoginAdmin ? [] : [SOLUTION_SEP, "to access from another computer, you must ", h(InLink, { to:'accounts' }, md("create an account with *admin* permission"))] ),
76
!href && entry('warning', "Frontend unreachable: ",
77
_.map(serverErrors, (v,k) => k + " " + (v ? "is in error" : "is off")).join(', '),
78
!errors.length && [ SOLUTION_SEP, cfgLink("switch http or https on") ]
@@ -103,6 +102,7 @@ export default function HomePage() {
102
h('li',{}, md(`configure FRP to connect to HFS <u>not</u> with localhost (safe, but you won't see users' IPs)`)),
103
h('li',{}, `disable "admin access for localhost" in HFS (safe, but you won't see users' IPs)`),
104
)),
105
+ entry('', md("This is the *Admin-panel*, where you manage your server. Access your files on the [Front-end](../..).")),
106
entry('', wikiLink('', "See the documentation"), " and ", h(Link, { target: 'support', href: REPO_URL + 'discussions' }, "get support")),
107
!updates && with_(status.autoCheckUpdateResult, x =>
108
x?.isNewer && h(Update, { info: x, fromAuto: true, bodyCollapsed: true, title: "An update has been found" }) ),
src/adminApis.ts
+1
@@ -137,6 +137,7 @@ export const adminApis = {
137
ips: await getIps(false),
138
baseUrl: await getBaseUrlOrDefault(),
139
roots: roots.get(),
140
+ anyAccountCanLoginAdmin: anyAccountCanLoginAdmin(),
141
updatePossible: !await updateSupported() ? false : (await localUpdateAvailable()) ? 'local' : true,
142
previousVersionAvailable: await previousAvailable(),
143
autoCheckUpdateResult: autoCheckUpdateResult.get(), // in this form, we get the same type of the serialized json