mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 17:44:35 +03:00
web interfaces: don't include version number in html, only return it after authentication
second round for issue #322
This commit is contained in:
@ -2,12 +2,13 @@
|
||||
|
||||
// From HTML.
|
||||
declare let page: HTMLElement
|
||||
declare let moxversion: string
|
||||
declare let moxgoos: string
|
||||
declare let moxgoarch: string
|
||||
// From customization script.
|
||||
declare let moxBeforeDisplay: (webmailroot: HTMLElement) => void
|
||||
|
||||
let moxversion: string
|
||||
let moxgoos: string
|
||||
let moxgoarch: string
|
||||
|
||||
const login = async (reason: string) => {
|
||||
return new Promise<string>((resolve: (v: string) => void, _) => {
|
||||
const origFocus = document.activeElement
|
||||
@ -206,13 +207,14 @@ const crumbs = (...l: ({text: string, path: string} | string)[]) => {
|
||||
|
||||
const errmsg = (err: unknown) => ''+((err as any).message || '(no error message)')
|
||||
|
||||
const footer = dom.div(
|
||||
style({marginTop: '6ex', opacity: 0.75}),
|
||||
link('https://www.xmox.nl', 'mox'),
|
||||
' ',
|
||||
moxversion,
|
||||
', ', dom.a(attr.href('licenses.txt'), 'licenses')
|
||||
)
|
||||
const footer = () =>
|
||||
dom.div(
|
||||
style({marginTop: '6ex', opacity: 0.75}),
|
||||
link('https://www.xmox.nl', 'mox'),
|
||||
' ',
|
||||
moxversion,
|
||||
', ', dom.a(attr.href('licenses.txt'), 'licenses')
|
||||
)
|
||||
|
||||
const domainName = (d: api.Domain) => {
|
||||
return d.Unicode || d.ASCII
|
||||
@ -1602,7 +1604,7 @@ openssl pkcs12 \\
|
||||
),
|
||||
dom.br(),
|
||||
|
||||
footer,
|
||||
footer(),
|
||||
)
|
||||
|
||||
;(async () => {
|
||||
@ -1944,6 +1946,8 @@ const destination = async (name: string) => {
|
||||
const init = async () => {
|
||||
let curhash: string | undefined
|
||||
|
||||
[moxversion, moxgoos, moxgoarch] = await client.Version()
|
||||
|
||||
const hashChange = async () => {
|
||||
if (curhash === window.location.hash) {
|
||||
return
|
||||
|
Reference in New Issue
Block a user