feat: Add Create Channel dialog and related events

- Introduced CreateChannelDialog for user to create new channels with name and topic.
- Added OnCreateChannelRequested event in MainWindow for channel creation.
- Enhanced EchoHubConnection with OnReconnected event for connection state handling.
- Updated EchoHubDbContext to use application base directory for SQLite database path.
- Integrated Serilog for logging in EchoHub.Server.
- Refactored database initialization and migration logic into DatabaseSetup class.
- Implemented FirstRunSetup to ensure appsettings.json and generate JWT secret if needed.
- Updated appsettings files to configure Serilog logging.
- Enhanced error handling and logging in ChatHub methods for better traceability.
This commit is contained in:
HueByte
2026-02-19 04:36:40 +01:00
parent ebc8fffec8
commit c9c76c43fa
15 changed files with 1191 additions and 962 deletions
+6
View File
@@ -74,6 +74,11 @@ public sealed class MainWindow : Runnable
/// </summary>
public event Action? OnSavedServersRequested;
/// <summary>
/// Fired when the user requests to create a new channel.
/// </summary>
public event Action? OnCreateChannelRequested;
public MainWindow(IApplication app)
{
_app = app;
@@ -228,6 +233,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 Line(),
new MenuItem("New C_hannel...", "Create a new channel", () => OnCreateChannelRequested?.Invoke(), Key.Empty),
new MenuItem("_Saved Servers...", "View saved servers", () => OnSavedServersRequested?.Invoke(), Key.Empty)
}),
new MenuBarItem("_User", allUserItems)