Show pane selector on initial viewer
This commit is contained in:
parent
8dae098659
commit
771e1a6fc0
2 changed files with 19 additions and 5 deletions
|
|
@ -41,9 +41,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">
|
||||
<link rel="stylesheet" href="/static/style.css?v=20260706-2">
|
||||
<script src="/static/htmx.min.js"></script>
|
||||
<script src="/static/app.js" defer></script></head>
|
||||
<script src="/static/app.js?v=20260706-2" defer></script></head>
|
||||
<body class="ol2013">
|
||||
<header class="ribbon">
|
||||
<nav class="ribbon-tabs">
|
||||
|
|
@ -65,13 +65,12 @@ func renderShell(w http.ResponseWriter, active, readingPane string) {
|
|||
</section>
|
||||
<div class="pane-resizer" data-resize-index="1"></div>
|
||||
<section class="pane pane-read" id="read">
|
||||
<div class="pane-head">Quelle</div>
|
||||
<div class="read-body">%s</div>
|
||||
%s
|
||||
</section>
|
||||
</div>
|
||||
<footer class="statusbar"><span id="mig-status"
|
||||
hx-get="/migrate/status" hx-trigger="every 3s" hx-swap="innerHTML">bereit</span></footer>
|
||||
</body></html>`, active, readingPane)
|
||||
</body></html>`, active, renderInitialReadPane(readingPane))
|
||||
}
|
||||
|
||||
// --- Stubs fuer die noch nicht gebauten Handler (TODO Codex) ---
|
||||
|
|
|
|||
|
|
@ -262,6 +262,21 @@ func renderInitialTargetPane() string {
|
|||
return `<div class="pane-head mode-head"><div class="mode-switch"><button class="btn compact active" type="button">Quelle</button><button class="btn secondary compact" type="button">Ziel</button></div><div></div></div><div class="read-body"><div class="ef-empty">Nachricht waehlen.</div></div>`
|
||||
}
|
||||
|
||||
func renderInitialReadPane(body string) string {
|
||||
if strings.TrimSpace(body) == "" {
|
||||
body = `<div class="ef-empty">Nachricht waehlen.</div>`
|
||||
}
|
||||
var b strings.Builder
|
||||
b.WriteString(`<div class="pane-head mode-head"><div class="mode-switch"><button class="btn compact active" type="button">Quelle</button><button class="btn secondary compact" type="button">Ziel</button></div><form class="target-select-form"><select id="source-account-select" name="source" class="target-select">`)
|
||||
for _, opt := range sourceAccountOptions() {
|
||||
fmt.Fprintf(&b, `<option value="%s">%s</option>`, html.EscapeString(opt.Value), html.EscapeString(opt.Label))
|
||||
}
|
||||
b.WriteString(`</select></form></div><div class="read-body">`)
|
||||
b.WriteString(body)
|
||||
b.WriteString(`</div>`)
|
||||
return b.String()
|
||||
}
|
||||
|
||||
func renderReadContent(w io.Writer, subject, from, date, body string) {
|
||||
if subject == "" {
|
||||
subject = "(ohne Betreff)"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue