Rework the telnet window's cluster favourites and login tabs

Favourites show the callsign in bold, the address and the sysop's note,
and each keeps its own password, commands, logon call and note. Clicking
one fills the boxes for editing. Autoconnect marks the favourite to
connect to at start and replaces the old reconnect-to-last-node setting.
A new published list refreshes the notes of the favourites in it. The
published list now spans the window, and the Spot comment tab becomes
Login & Spots with the logon call and keep-alive.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-24 13:03:13 +00:00
co-authored by Claude Sonnet 5.5
parent 7be51b72c7
commit d22787fb66
8 changed files with 286 additions and 99 deletions
+25 -1
View File
@@ -941,6 +941,30 @@ public sealed partial class AppSession : IDisposable
radios.Clear();
}
private static string FirstNonEmpty(params string[] values) =>
values.FirstOrDefault(v => v.Length > 0) ?? "";
/// The favourite the program connects to when it starts, if one is marked.
public StoredClusterNode? AutoConnectNode => Settings.ClusterNodes.FirstOrDefault(n => n.AutoConnect);
/// Connects to the favourite marked for it. Without one, nothing connects.
public void ConnectAutoCluster()
{
if (AutoConnectNode is not { } node)
{
return;
}
Save(Settings with
{
ClusterHost = node.Host,
ClusterPort = node.Port,
ClusterPassword = node.Password,
ClusterCommands = node.Commands,
ClusterNodeLogonCall = node.LogonCall,
});
ConnectCluster();
}
public void ConnectCluster()
{
cluster?.Dispose();
@@ -948,7 +972,7 @@ public sealed partial class AppSession : IDisposable
cluster = new ClusterClient(
Settings.ClusterHost,
Settings.ClusterPort,
Settings.ClusterLogonCall.Length > 0 ? Settings.ClusterLogonCall : Settings.Station.Callsign,
FirstNonEmpty(Settings.ClusterNodeLogonCall, Settings.ClusterLogonCall, Settings.Station.Callsign),
Settings.ClusterCommands,
Settings.ClusterPassword,
autoLogon: Settings.ClusterAutoLogon,