mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 18:24:35 +03:00
add subcommand that prints licenses, and link to licenses from the webadmin/webaccount/webmail interfaces
This commit is contained in:
@ -235,6 +235,17 @@ func handle(apiHandler http.Handler, isForwarded bool, accountPath string, w htt
|
||||
}
|
||||
return
|
||||
|
||||
case "/licenses.txt":
|
||||
switch r.Method {
|
||||
case "GET", "HEAD":
|
||||
h := w.Header()
|
||||
h.Set("Content-Type", "text/plain; charset=utf-8")
|
||||
mox.LicensesWrite(w)
|
||||
default:
|
||||
http.Error(w, "405 - method not allowed - use get", http.StatusMethodNotAllowed)
|
||||
}
|
||||
return
|
||||
|
||||
case "/msg.js", "/text.js":
|
||||
switch r.Method {
|
||||
default:
|
||||
|
@ -2513,7 +2513,7 @@ const cmdHelp = async () => {
|
||||
return;
|
||||
}
|
||||
window.alert('"mailto:" protocol handler unregistered.');
|
||||
})), dom.div(style({ marginTop: '2ex' }), 'Mox is open source email server software, this is version ', moxversion, ', built with ', moxgoversion, '. Feedback, including bug reports, is appreciated! ', link('https://github.com/mjl-/mox/issues/new'), '.'))));
|
||||
})), dom.div(style({ marginTop: '2ex' }), 'Mox is open source email server software, this is version ', moxversion, ', built with ', moxgoversion, ', see ', dom.a(attr.href('licenses.txt'), 'licenses'), '.', dom.br(), 'Feedback, including bug reports, is appreciated! ', link('https://github.com/mjl-/mox/issues/new')))));
|
||||
};
|
||||
// Show tooltips for either the focused element, or otherwise for all elements
|
||||
// that aren't reachable with tabindex and aren't marked specially to prevent
|
||||
|
@ -1335,7 +1335,7 @@ const cmdHelp = async () => {
|
||||
window.alert('"mailto:" protocol handler unregistered.')
|
||||
}),
|
||||
),
|
||||
dom.div(style({marginTop: '2ex'}), 'Mox is open source email server software, this is version ', moxversion, ', built with ', moxgoversion, '. Feedback, including bug reports, is appreciated! ', link('https://github.com/mjl-/mox/issues/new'), '.'),
|
||||
dom.div(style({marginTop: '2ex'}), 'Mox is open source email server software, this is version ', moxversion, ', built with ', moxgoversion, ', see ', dom.a(attr.href('licenses.txt'), 'licenses'), '.', dom.br(), 'Feedback, including bug reports, is appreciated! ', link('https://github.com/mjl-/mox/issues/new')),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
Reference in New Issue
Block a user