Promote archive mailbox menu
This commit is contained in:
parent
fe3ece17ba
commit
84bc0de876
2 changed files with 61 additions and 34 deletions
|
|
@ -55,9 +55,9 @@ func renderShell(w http.ResponseWriter, active, readingPane string) {
|
|||
fmt.Fprintf(w, `<!doctype html><html lang="de"><head><meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>Mail-Graveyard</title>
|
||||
<link rel="stylesheet" href="/static/style.css?v=20260712-8">
|
||||
<link rel="stylesheet" href="/static/style.css?v=20260712-9">
|
||||
<script src="/static/htmx.min.js"></script>
|
||||
<script src="/static/app.js?v=20260712-8" defer></script></head>
|
||||
<script src="/static/app.js?v=20260712-9" defer></script></head>
|
||||
<body class="ol2013">
|
||||
<header class="ribbon">
|
||||
<button class="app-menu-button" type="button" aria-label="Mail-Graveyard-Menue" aria-expanded="false" data-backstage-toggle><span class="mail-logo" aria-hidden="true"></span></button>
|
||||
|
|
@ -74,7 +74,7 @@ func renderShell(w http.ResponseWriter, active, readingPane string) {
|
|||
<a class="backstage-item active" href="/view">Archiv-Boxen</a>
|
||||
<a class="backstage-item" href="/view">Import/Export</a>
|
||||
<a class="backstage-item" href="/accounts">Konten-Verwaltung</a>
|
||||
<a class="backstage-item sub" href="/archives">Archiv-mbox Verwaltung</a>
|
||||
<a class="backstage-item" href="/archives">Archiv-mbox Verwaltung</a>
|
||||
<a class="backstage-item" href="/view">Mail-Transfer</a>
|
||||
<a class="backstage-item" href="/accounts">Einstellungen</a>
|
||||
</aside>
|
||||
|
|
@ -295,9 +295,9 @@ func renderAccountsPage(w http.ResponseWriter, accounts []Account, edit Account,
|
|||
fmt.Fprintf(w, `<!doctype html><html lang="de"><head><meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>Konten-Verwaltung - Mail-Graveyard</title>
|
||||
<link rel="stylesheet" href="/static/style.css?v=20260712-8">
|
||||
<link rel="stylesheet" href="/static/style.css?v=20260712-9">
|
||||
<script src="/static/htmx.min.js"></script>
|
||||
<script src="/static/app.js?v=20260712-8" defer></script></head>
|
||||
<script src="/static/app.js?v=20260712-9" defer></script></head>
|
||||
<body class="ol2013">
|
||||
<header class="ribbon">
|
||||
<button class="app-menu-button" type="button" aria-label="Mail-Graveyard-Menue" aria-expanded="false" data-backstage-toggle><span class="mail-logo" aria-hidden="true"></span></button>
|
||||
|
|
@ -314,7 +314,7 @@ func renderAccountsPage(w http.ResponseWriter, accounts []Account, edit Account,
|
|||
<a class="backstage-item" href="/view">Archiv-Boxen</a>
|
||||
<a class="backstage-item" href="/view">Import/Export</a>
|
||||
<a class="backstage-item active" href="/accounts">Konten-Verwaltung</a>
|
||||
<a class="backstage-item sub" href="/archives">Archiv-mbox Verwaltung</a>
|
||||
<a class="backstage-item" href="/archives">Archiv-mbox Verwaltung</a>
|
||||
<a class="backstage-item" href="/view">Mail-Transfer</a>
|
||||
<a class="backstage-item" href="/accounts">Einstellungen</a>
|
||||
</aside>
|
||||
|
|
@ -338,9 +338,9 @@ func renderArchivesPage(w http.ResponseWriter, archives []string, accounts []Acc
|
|||
fmt.Fprintf(w, `<!doctype html><html lang="de"><head><meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>Archiv-mbox Verwaltung - Mail-Graveyard</title>
|
||||
<link rel="stylesheet" href="/static/style.css?v=20260712-8">
|
||||
<link rel="stylesheet" href="/static/style.css?v=20260712-9">
|
||||
<script src="/static/htmx.min.js"></script>
|
||||
<script src="/static/app.js?v=20260712-8" defer></script></head>
|
||||
<script src="/static/app.js?v=20260712-9" defer></script></head>
|
||||
<body class="ol2013">
|
||||
<header class="ribbon">
|
||||
<button class="app-menu-button" type="button" aria-label="Mail-Graveyard-Menue" aria-expanded="false" data-backstage-toggle><span class="mail-logo" aria-hidden="true"></span></button>
|
||||
|
|
@ -357,7 +357,7 @@ func renderArchivesPage(w http.ResponseWriter, archives []string, accounts []Acc
|
|||
<a class="backstage-item" href="/view">Archiv-Boxen</a>
|
||||
<a class="backstage-item" href="/view">Import/Export</a>
|
||||
<a class="backstage-item" href="/accounts">Konten-Verwaltung</a>
|
||||
<a class="backstage-item sub active" href="/archives">Archiv-mbox Verwaltung</a>
|
||||
<a class="backstage-item active" href="/archives">Archiv-mbox Verwaltung</a>
|
||||
<a class="backstage-item" href="/view">Mail-Transfer</a>
|
||||
<a class="backstage-item" href="/accounts">Einstellungen</a>
|
||||
</aside>
|
||||
|
|
@ -369,9 +369,11 @@ func renderArchivesPage(w http.ResponseWriter, archives []string, accounts []Acc
|
|||
if errMsg != "" {
|
||||
fmt.Fprintf(w, `<div class="notice bad">%s</div>`, html.EscapeString(errMsg))
|
||||
}
|
||||
fmt.Fprint(w, `<section class="archive-page-layout"><div class="pane-head">Archiv-mbox Verwaltung</div>`)
|
||||
renderArchiveManager(w, archives, accounts)
|
||||
fmt.Fprint(w, `</section></main><footer class="statusbar"><span id="mig-status" hx-get="/migrate/status" hx-trigger="load,every 3s" hx-swap="innerHTML">bereit</span></footer></body></html>`)
|
||||
fmt.Fprint(w, `<section class="archive-page-layout"><div class="archive-list-panel"><div class="pane-head">Archiv-mboxen</div>`)
|
||||
renderArchiveList(w, archives, accounts)
|
||||
fmt.Fprint(w, `</div><div class="archive-form-panel"><div class="pane-head">Archiv-mbox anlegen</div>`)
|
||||
renderArchiveForm(w)
|
||||
fmt.Fprint(w, `</div></section></main><footer class="statusbar"><span id="mig-status" hx-get="/migrate/status" hx-trigger="load,every 3s" hx-swap="innerHTML">bereit</span></footer></body></html>`)
|
||||
}
|
||||
|
||||
func renderAccountsTable(w http.ResponseWriter, accounts []Account, editName string) {
|
||||
|
|
@ -401,13 +403,9 @@ func renderAccountsTable(w http.ResponseWriter, accounts []Account, editName str
|
|||
fmt.Fprint(w, `</tbody></table>`)
|
||||
}
|
||||
|
||||
func renderArchiveManager(w http.ResponseWriter, archives []string, accounts []Account) {
|
||||
fmt.Fprint(w, `<div class="archive-manager"><form class="archive-create" method="post" action="/archives/create">
|
||||
<input class="input" name="archive_name" placeholder="neue Archiv-Mailbox">
|
||||
<button class="btn compact" type="submit">Erstellen</button>
|
||||
</form>`)
|
||||
func renderArchiveList(w http.ResponseWriter, archives []string, accounts []Account) {
|
||||
if len(archives) == 0 {
|
||||
fmt.Fprint(w, `<div class="ef-empty">Noch keine Archiv-Mailbox angelegt.</div></div>`)
|
||||
fmt.Fprint(w, `<div class="ef-empty">Noch keine Archiv-Mailbox angelegt.</div>`)
|
||||
return
|
||||
}
|
||||
fmt.Fprint(w, `<table class="archive-table"><thead><tr><th>Archiv-Mailbox</th><th>Zuordnung</th><th></th></tr></thead><tbody>`)
|
||||
|
|
@ -420,7 +418,19 @@ func renderArchiveManager(w http.ResponseWriter, archives []string, accounts []A
|
|||
}
|
||||
fmt.Fprintf(w, `<tr><td>%s</td><td>%s</td><td class="archive-action">%s</td></tr>`, html.EscapeString(archive), html.EscapeString(uses), action)
|
||||
}
|
||||
fmt.Fprint(w, `</tbody></table></div>`)
|
||||
fmt.Fprint(w, `</tbody></table>`)
|
||||
}
|
||||
|
||||
func renderArchiveForm(w http.ResponseWriter) {
|
||||
fmt.Fprint(w, `<form class="archive-create-panel" method="post" action="/archives/create">
|
||||
<label class="label">Neue Archiv-Mailbox<input class="input" name="archive_name" placeholder="z.B. kunde-altarchiv"></label>
|
||||
<button class="btn" type="submit">Erstellen</button>
|
||||
</form>
|
||||
<div class="archive-help">
|
||||
<div class="archive-help-title">Schutzlogik</div>
|
||||
<p>Archiv-mboxen werden als lokale Ordner unter dem Backup-Root angelegt.</p>
|
||||
<p>Entfernen ist nur moeglich, wenn die Mailbox keinem Konto zugeordnet und leer ist.</p>
|
||||
</div>`)
|
||||
}
|
||||
|
||||
func renderAccountForm(w http.ResponseWriter, a Account, archives []string) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue