updated webclient setttings

This commit is contained in:
2026-08-15 21:49:25 +01:00
parent 15678c1b6e
commit f60dbcc6b0
41 changed files with 3147 additions and 770 deletions
+21 -2
View File
@@ -170,7 +170,7 @@ var standalonePages = []string{
"login.html", "login_mfa.html", "mfa_setup_required.html", "totp_setup.html",
"webmail_login.html", "webmail_login_mfa.html", "webmail_account.html", "webmail_totp_setup.html", "webmail_mfa_setup_required.html",
"webmail_folder.html", "webmail_message.html", "webmail_compose.html", "webmail_rules.html", "webmail_certs.html",
"webmail_signatures.html",
"webmail_signatures.html", "webmail_contacts.html", "webmail_blocklist.html",
// A bare HTML fragment (no <html>/base.html chrome at all), fetched via JS and
// injected into logs.html's full-screen modal — not a page anyone navigates to
// directly, so it doesn't need to look like a standalone document the way the
@@ -188,7 +188,7 @@ var standalonePages = []string{
// something that opens a popup of its own.
var pagesWithComposeWidget = []string{
"webmail_folder.html", "webmail_message.html", "webmail_rules.html", "webmail_certs.html", "webmail_account.html",
"webmail_signatures.html",
"webmail_signatures.html", "webmail_contacts.html", "webmail_blocklist.html",
}
func hasComposeWidget(page string) bool {
@@ -200,6 +200,22 @@ func hasComposeWidget(page string) bool {
return false
}
// pagesWithSettingsChrome are the settings sections consolidated into one
// Outlook-style left-nav/right-content layout — see webmail_settings_chrome.html.
var pagesWithSettingsChrome = []string{
"webmail_account.html", "webmail_rules.html", "webmail_signatures.html", "webmail_certs.html",
"webmail_contacts.html", "webmail_blocklist.html",
}
func hasSettingsChrome(page string) bool {
for _, p := range pagesWithSettingsChrome {
if p == page {
return true
}
}
return false
}
// pagesWithShortcuts are the two pages keyboard shortcuts make sense on — the
// message list (j/k/Enter/o) and a single open message (r/a/f/#). See
// webmail_shortcuts.html's {{define "webmail_shortcuts"}}.
@@ -233,6 +249,9 @@ func (a *App) loadTemplates() error {
if hasComposeWidget(page) {
files = append(files, "templates/webmail_compose_widget.html")
}
if hasSettingsChrome(page) {
files = append(files, "templates/webmail_settings_chrome.html")
}
if hasShortcuts(page) {
files = append(files, "templates/webmail_shortcuts.html")
}