mirror of
https://github.com/RedWizardsLab/EchoHub.git
synced 2026-09-05 15:46:01 +02:00
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:
@@ -16,6 +16,7 @@ public sealed class EchoHubConnection : IAsyncDisposable
|
||||
public event Action<UserPresenceDto>? OnUserStatusChanged;
|
||||
public event Action<string>? OnError;
|
||||
public event Action<string>? OnConnectionStateChanged;
|
||||
public event Action? OnReconnected;
|
||||
|
||||
public bool IsConnected => _connection.State == HubConnectionState.Connected;
|
||||
|
||||
@@ -42,6 +43,7 @@ public sealed class EchoHubConnection : IAsyncDisposable
|
||||
_connection.Reconnected += _ =>
|
||||
{
|
||||
OnConnectionStateChanged?.Invoke("Connected");
|
||||
OnReconnected?.Invoke();
|
||||
return Task.CompletedTask;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user