Named-peers registry + Options → Manage named peers dialog
Turns the flat friendly-name map into a proper machine-wide book (AppConfig.NamedPeers), and adds a management dialog. Held for next release. * New NamedPeer record (machine name, friendly name, last address, last-seen UTC). AppConfig gains NamedPeers; the legacy PeerFriendlyNames map is migrated into it once on load, then no longer written. The book stays machine-wide and profile-independent (it always was — this just enriches it). * Only deliberately-renamed peers are recorded (per Ed) so the list can't balloon. A named peer's last address / last-seen are updated in memory each tick while connected; persisted on address change and on app close (timestamp-only changes don't thrash the disk). * Options → Manage named peers (Alt+O, N): lists each named peer as "friendly — machine — last seen date, address"; Rename (Alt+R / F2 / double-click) reuses RenamePeerDialog; Delete (Alt+D / Del) forgets the name. Edits refresh the connected/discovered lists, the volume/pan/EQ list and details box live. * ApplyFriendlyName now records machine name + last address alongside the name. Manual updated (readme.html + MANUAL.md). Build clean; --selftest passes; deployed to both test folders. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
289bb2b15c
commit
3c449d78b3
@@ -75,9 +75,14 @@ public sealed class AppConfig
|
||||
/// <see cref="Profile.PeerShaping"/>.</summary>
|
||||
public bool ShowPanEqTab { get; set; } = true;
|
||||
|
||||
/// <summary>Custom friendly names the user has given to peers, keyed by the peer's stable identity —
|
||||
/// its machine name when known, otherwise its address. Machine-wide (a name applies in every profile)
|
||||
/// and shown wherever that peer appears. Empty by default. See the Connectivity tab's Rename peer.</summary>
|
||||
/// <summary>The machine-wide "named peers" book — peers the user has deliberately renamed, keyed by
|
||||
/// the peer's stable identity (machine name, or address for a nameless manual peer). A name applies in
|
||||
/// every profile and shows wherever that peer appears. Managed via the Connectivity tab's Rename peer
|
||||
/// and the Options → Manage named peers dialog. Empty by default.</summary>
|
||||
public Dictionary<string, NamedPeer> NamedPeers { get; set; } = new();
|
||||
|
||||
/// <summary>Legacy flat name map (friendly name only). Kept so pre-registry configs still deserialise;
|
||||
/// migrated into <see cref="NamedPeers"/> on load, then no longer written.</summary>
|
||||
public Dictionary<string, string> PeerFriendlyNames { get; set; } = new();
|
||||
|
||||
/// <summary>If true (the default), RemSound plays the startup cue once, right after this
|
||||
|
||||
Reference in New Issue
Block a user