feat: amplifier controls without a Flex/Icom panel — Station Control widget (SPE/ACOM full control, PGXL fan) + status-bar chip (green OPERATE / orange STANDBY / red offline, click opens Settings); warn with a toast when activating a profile whose MySQL is unreachable instead of silently staying on the old logbook
This commit is contained in:
@@ -11214,7 +11214,14 @@ func (a *App) ActivateProfile(id int64) error {
|
||||
// target (local SQLite or its own MySQL) so QSOs go to the right logbook.
|
||||
if p, err := a.profiles.Get(a.ctx, id); err == nil {
|
||||
if err := a.switchLogbook(p); err != nil {
|
||||
// The switch failed (typically: this profile's MySQL is unreachable right
|
||||
// now) and the PREVIOUS logbook stays live. Silently staying on the old
|
||||
// database is how QSOs end up in the wrong log — tell the operator.
|
||||
applog.Printf("activate profile %d: logbook switch failed: %v", id, err)
|
||||
if a.ctx != nil {
|
||||
wruntime.EventsEmit(a.ctx, "toast", fmt.Sprintf(
|
||||
"Profil %q : connexion à sa base impossible — l'ancienne base reste active ! (%v)", p.Name, err))
|
||||
}
|
||||
}
|
||||
}
|
||||
// Re-apply every settings-dependent subsystem for the new profile.
|
||||
|
||||
Reference in New Issue
Block a user