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
+66 -44
View File
@@ -2,6 +2,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Nonemm.App.Windows"
xmlns:theming="using:Nonemm.App.Theming"
xmlns:config="using:Nonemm.App.Configuration"
x:Class="Nonemm.App.Windows.TelnetWindow"
Title="Telnet" Width="760" Height="520">
<Window.Styles>
@@ -47,50 +48,65 @@
</TabItem>
<TabItem Header="Clusters">
<Grid ColumnDefinitions="*,12,300" Margin="10">
<Grid RowDefinitions="Auto,2*,Auto,Auto,3*">
<TextBlock Classes="label" Text="Favourites" Margin="0,0,0,1" />
<ListBox Grid.Row="1" Name="NodeList" SelectionChanged="OnNodePicked" />
<StackPanel Grid.Row="2" Orientation="Horizontal" Spacing="6" Margin="0,6,0,0">
<Button Content="Connect" Click="OnConnect" />
<Button Content="Disconnect" Click="OnDisconnect" />
<Button Content="Remove" Click="OnRemoveNode" />
</StackPanel>
<Grid Grid.Row="3" ColumnDefinitions="*,Auto" Margin="0,12,0,1">
<Grid RowDefinitions="3*,12,2*" Margin="10">
<Grid ColumnDefinitions="*,12,300">
<Grid RowDefinitions="Auto,*,Auto">
<TextBlock Classes="label" Text="Favourites" Margin="0,0,0,1" />
<ListBox Grid.Row="1" Name="NodeList" SelectionChanged="OnNodePicked">
<ListBox.ItemTemplate>
<DataTemplate x:DataType="config:StoredClusterNode">
<StackPanel>
<StackPanel Orientation="Horizontal" Spacing="8">
<TextBlock Text="{Binding Title}" FontWeight="Bold" />
<TextBlock Text="{Binding Address}" Opacity="0.75" />
<TextBlock Text="auto-connect" FontSize="11" VerticalAlignment="Center"
Foreground="{DynamicResource SystemControlHighlightAccentBrush}"
IsVisible="{Binding AutoConnect}" />
</StackPanel>
<TextBlock Text="{Binding Description}" FontSize="11" Opacity="0.7"
IsVisible="{Binding HasDescription}" />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<StackPanel Grid.Row="2" Orientation="Horizontal" Spacing="6" Margin="0,6,0,0">
<Button Content="Connect" Click="OnConnect" />
<Button Content="Disconnect" Click="OnDisconnect" />
<Button Name="AutoConnectButton" Content="Autoconnect" Click="OnToggleAutoConnect" />
<Button Content="Remove" Click="OnRemoveNode" />
</StackPanel>
</Grid>
<ScrollViewer Grid.Column="2">
<StackPanel>
<TextBlock Classes="label" Text="Name" Margin="0,0,0,1" />
<TextBox Name="NameBox" />
<Grid ColumnDefinitions="*,8,80">
<StackPanel>
<TextBlock Classes="label" Text="Node" />
<TextBox Name="HostBox" PlaceholderText="dxc.example.net" />
</StackPanel>
<StackPanel Grid.Column="2">
<TextBlock Classes="label" Text="Port" />
<TextBox Name="PortBox" />
</StackPanel>
</Grid>
<TextBlock Classes="label" Text="Password, if the node asks for one" />
<TextBox Name="PasswordBox" PasswordChar="•" />
<TextBlock Classes="label" Text="Log on with" />
<TextBox Name="NodeLogonBox" PlaceholderText="Same as in Login &amp; Spots" />
<TextBlock Classes="label" Text="Commands sent after login, one per line" />
<TextBox Name="CommandsBox" AcceptsReturn="True" Height="70" />
<Button Name="SaveNodeButton" Content="Save to favourites" Click="OnStoreNode" Margin="0,8,0,0" />
</StackPanel>
</ScrollViewer>
</Grid>
<Grid Grid.Row="2" RowDefinitions="Auto,*">
<Grid ColumnDefinitions="*,Auto" Margin="0,0,0,1">
<TextBlock Classes="label" Name="PublishedText" Text="Published list" VerticalAlignment="Center" />
<Button Grid.Column="1" Content="Download" Click="OnDownloadNodes" />
</Grid>
<ListBox Grid.Row="4" Name="PublishedNodeList" SelectionChanged="OnPublishedNodePicked" />
<ListBox Grid.Row="1" Name="PublishedNodeList" SelectionChanged="OnPublishedNodePicked" />
</Grid>
<ScrollViewer Grid.Column="2">
<StackPanel>
<TextBlock Classes="label" Text="Name" Margin="0,0,0,1" />
<TextBox Name="NameBox" />
<Grid ColumnDefinitions="*,8,80" >
<StackPanel>
<TextBlock Classes="label" Text="Node" />
<TextBox Name="HostBox" PlaceholderText="dxc.example.net" />
</StackPanel>
<StackPanel Grid.Column="2">
<TextBlock Classes="label" Text="Port" />
<TextBox Name="PortBox" />
</StackPanel>
</Grid>
<TextBlock Classes="label" Text="Password, if the node asks for one" />
<TextBox Name="PasswordBox" PasswordChar="•" />
<TextBlock Classes="label" Text="Commands sent after login, one per line" />
<TextBox Name="CommandsBox" AcceptsReturn="True" Height="70" />
<Button Content="Save to favourites" Click="OnStoreNode" Margin="0,8,0,0" />
<TextBlock Classes="label" Text="Options" Margin="0,14,0,1" />
<CheckBox Name="AutoLogonBox" Content="Log on automatically" />
<TextBlock Classes="label" Text="Log on with" />
<TextBox Name="LogonCallBox" PlaceholderText="the station callsign" />
<TextBlock Classes="label" Text="Keep alive every (minutes)" />
<TextBox Name="KeepAliveBox" Width="60" HorizontalAlignment="Left" />
<Button Content="Save options" Click="OnSaveOptions" Margin="0,8,0,0" />
</StackPanel>
</ScrollViewer>
</Grid>
</TabItem>
@@ -139,11 +155,17 @@
</DockPanel>
</TabItem>
<TabItem Header="Spot comment">
<StackPanel Margin="10">
<TextBlock Classes="label" Text="Sent with the spots you put on the cluster" />
<TabItem Header="Login &amp; Spots">
<StackPanel Margin="10" Width="300" HorizontalAlignment="Left">
<TextBlock Classes="label" Text="Log on with" Margin="0,0,0,1" />
<TextBox Name="LogonCallBox" PlaceholderText="the station callsign" />
<TextBlock Classes="label" Text="Keep alive every (minutes)" />
<NumericUpDown Name="KeepAliveBox" Minimum="1" Maximum="60" Increment="1"
FormatString="0" HorizontalAlignment="Left" Width="120" />
<TextBlock Classes="label" Text="Spot comment, sent with the spots you put on the cluster" />
<TextBox Name="SpotCommentBox" PlaceholderText="CQ contest" />
<Button Content="Save" Click="OnSaveSpotComment" Margin="0,10,0,0" />
<Button Content="Save" Click="OnSaveLogin" Margin="0,10,0,0" />
<TextBlock Classes="label" Text="The login applies on the next connection." />
</StackPanel>
</TabItem>
</TabControl>