feat: Station Control amp parity + all amps, Help→Send log to F4BPO, bulk-edit frequency, fix Cluster midnight sort
- Station Control: the amplifier panel is now the exact same card as the FlexRadio panel (extracted shared AmpCard: OPERATE/STANDBY, ON/OFF, power level, output-power bar, live FWD/ID/temp meters). Every configured amp gets its own card — no dropdown. - Help → "Send log to F4BPO" (only when SMTP is configured): e-mails opslog.log + previous session + crash log to the developer. New email.SendFiles for multi-attachment. - Bulk edit: new "Frequency (MHz)" field sets freq_hz AND recomputes band; out-of-band values rejected. Fixes a run logged on a stale/default freq after CAT dropped. - Cluster: Time column sorted lexically on the HHMMZ string, so spots after 0000Z sorted below 2359Z and looked frozen at the UTC rollover. Now sorts by real arrival time. - Also folds in the DVK auto-CQ/2-column layout and Station Control dashboard batch (changelog 0.20.10, EN+FR).
This commit is contained in:
+14
-2
@@ -41,6 +41,16 @@ func (c Config) opts() []mail.Option {
|
||||
|
||||
// Send delivers a plain-text email to `to`, optionally attaching a file.
|
||||
func Send(cfg Config, to, subject, body, attachPath string) error {
|
||||
var attach []string
|
||||
if attachPath != "" {
|
||||
attach = []string{attachPath}
|
||||
}
|
||||
return SendFiles(cfg, to, subject, body, attach)
|
||||
}
|
||||
|
||||
// SendFiles is like Send but attaches any number of files (missing paths are
|
||||
// skipped by the mail library at send time).
|
||||
func SendFiles(cfg Config, to, subject, body string, attachPaths []string) error {
|
||||
if cfg.Host == "" {
|
||||
return fmt.Errorf("SMTP server not configured")
|
||||
}
|
||||
@@ -65,8 +75,10 @@ func Send(cfg Config, to, subject, body, attachPath string) error {
|
||||
}
|
||||
m.Subject(subject)
|
||||
m.SetBodyString(mail.TypeTextPlain, body)
|
||||
if attachPath != "" {
|
||||
m.AttachFile(attachPath)
|
||||
for _, p := range attachPaths {
|
||||
if p != "" {
|
||||
m.AttachFile(p)
|
||||
}
|
||||
}
|
||||
client, err := mail.NewClient(cfg.Host, cfg.opts()...)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user