admin/home: better english
Massimo Melina committed
Oct 5, 2025 at 19:28 UTC
baa49a490dcd3ed6b3f8c76b537557256d5cd9f9
3 files changed
+6
-10
admin/src/HomePage.ts
+4
-7
@@ -68,9 +68,11 @@ export default function HomePage() {
68
return h(Box, {},
69
h(RandomPlugin),
70
h(Box, { display:'flex', gap: 2, flexDirection:'column', alignItems: 'flex-start', height: '100%' },
71
+ entry('', md("This is the *Admin-panel*, where you manage your server. Access your files on the [Front-end](../..).")),
72
+ !vfs ? h(LinearProgress) : !vfs.root?.children?.length && !vfs.root?.source ? entry('warning', "You have no shared files", SOLUTION_SEP, fsLink("add some")) : null,
73
account?.adminActualAccess ? entry('', "Welcome, "+username)
72
- : entry('', md("On <u>localhost</u> you don't need to login"),
73
- SOLUTION_SEP, "to access Admin-panel from another computer ", h(InLink, { to:'accounts' }, md("create an account with *admin* permission")) ),
74
+ : entry('', md("You're accessing the Admin-panel without an account because you are on localhost"),
75
+ SOLUTION_SEP, "to access from another computer, you must ", h(InLink, { to:'accounts' }, md("create an account with *admin* permission")) ),
76
dontBotherWithKeys(status.alerts?.map(x => entry('warning', md(x, { html: false })))),
77
errors.length ? dontBotherWithKeys(errors.map(msg => entry('error', dontBotherWithKeys(msg))))
78
: entry('success', "Server is working"),
@@ -85,11 +87,6 @@ export default function HomePage() {
87
&& entry('warning', `${x} plugin(s) failing`, SOLUTION_SEP, h(InLink, { to:'plugins' }, "check now"))),
88
!cfg.data?.split_uploads && (Date.now() - Number(status.cloudflareDetected || 0)) < DAY
89
&& entry('', wikiLink('Reverse-proxy#cloudflare', "Cloudflare detected, read our guide")),
88
- !vfs ? h(LinearProgress)
89
- : !vfs.root?.children?.length && !vfs.root?.source ? entry('warning', "You have no files shared", SOLUTION_SEP, fsLink("add some"))
90
- : entry('', md("This is the Admin-panel, where you manage your server. Access your files on "),
91
- h(Link, { target:'frontend', href: '../..' }, "Front-end", h(Launch, { sx: { verticalAlign: 'sub', ml: '.2em' } }))),
92
-
90
with_(proxyWarning(cfg.data, status), x => x && entry('warning', x,
91
SOLUTION_SEP, cfgLink("set the number of proxies"),
92
SOLUTION_SEP, "unless you are sure and you can ", h(Btn, {
frontend/src/components.ts
+1
-2
@@ -69,8 +69,7 @@ interface SelectProps<T> extends Omit<SelectHTMLAttributes<HTMLSelectElement>, '
69
}
70
export function Select<T extends string>({ onChange, value, options, ...props }: SelectProps<T>) {
71
return h('select', {
72
- onChange: ev =>
73
- onChange?.((ev.target as any).value),
72
+ onChange: ev => onChange?.((ev.target as any).value),
73
value,
74
...props,
75
}, options.map(({ value, label }) => h('option', { key: value, value }, label)))
src/update.ts
+1
-1
@@ -121,7 +121,7 @@ export async function update(tagOrUrl: string='') {
121
else throw e
122
}) as Release | undefined
123
if (!update)
124
- throw "Update not found"
124
+ throw "No update has been found"
125
const plat = '-' + xlate(process.platform, { win32: 'windows', darwin: 'mac' })
126
const assetSearch = `${plat}-${process.arch}`
127
const legacyAssetSearch = `${plat}${prefix('-', xlate(process.arch, { x64: '', arm64: 'arm' }))}.zip` // legacy pre-0.53.0-rc16