feat: implement session persistence with "Remember Me" functionality and logout support

This commit is contained in:
HueByte
2026-02-21 17:29:16 +01:00
parent 23abb9b0bb
commit d4cf35e04e
6 changed files with 211 additions and 22 deletions
+6
View File
@@ -85,6 +85,11 @@ public sealed class MainWindow : Runnable
/// </summary>
public event Action? OnDisconnectRequested;
/// <summary>
/// Fired when the user requests to logout (disconnect + revoke session).
/// </summary>
public event Action? OnLogoutRequested;
/// <summary>
/// Fired when the user requests to open their profile panel.
/// </summary>
@@ -322,6 +327,7 @@ public sealed class MainWindow : Runnable
{
new MenuItem("_Connect...", "Connect to a server", () => OnConnectRequested?.Invoke(), Key.Empty),
new MenuItem("_Disconnect", "Disconnect from server", () => OnDisconnectRequested?.Invoke(), Key.Empty),
new MenuItem("_Logout", "Logout and clear session", () => OnLogoutRequested?.Invoke(), Key.Empty),
new Line(),
new MenuItem("New C_hannel...", "Create a new channel", () => OnCreateChannelRequested?.Invoke(), Key.Empty),
new MenuItem("_Delete Channel", "Delete the current channel", () => OnDeleteChannelRequested?.Invoke(), Key.Empty),