Show target dropdown before message selection
This commit is contained in:
parent
d69e7afa82
commit
f455da54af
2 changed files with 14 additions and 4 deletions
|
|
@ -208,6 +208,13 @@ func renderTargetPane(account, folder, targetAccount string, index int, raw []by
|
|||
return b.String()
|
||||
}
|
||||
|
||||
func renderInitialTargetPane() string {
|
||||
var b strings.Builder
|
||||
b.WriteString(renderTargetAccountSelect("", "", "", -1))
|
||||
b.WriteString(`<div class="read-body"><div class="ef-empty">Nachricht waehlen.</div></div>`)
|
||||
return b.String()
|
||||
}
|
||||
|
||||
func renderReadContent(w io.Writer, subject, from, date, body string) {
|
||||
if subject == "" {
|
||||
subject = "(ohne Betreff)"
|
||||
|
|
@ -326,7 +333,11 @@ func renderTargetAccountSelect(account, folder, selected string, index int) stri
|
|||
selected = ""
|
||||
}
|
||||
var b strings.Builder
|
||||
fmt.Fprintf(&b, `<div class="pane-head target-head"><span>Zielkopie</span><form class="target-select-form" hx-get="/view/target" hx-target="#read-target" hx-swap="innerHTML" hx-trigger="change from:#target-account-select">
|
||||
fmt.Fprintf(&b, `<div class="pane-head target-head"><span>Zielkopie</span><form class="target-select-form"`)
|
||||
if account != "" && folder != "" && index >= 0 {
|
||||
fmt.Fprintf(&b, ` hx-get="/view/target" hx-target="#read-target" hx-swap="innerHTML" hx-trigger="change from:#target-account-select"`)
|
||||
}
|
||||
fmt.Fprintf(&b, `>
|
||||
<input type="hidden" name="account" value="%s">
|
||||
<input type="hidden" name="folder" value="%s">
|
||||
<input type="hidden" name="index" value="%d">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue