Remove hardcodes and implement WebClient

This commit is contained in:
tyuXX 2026-10-10 17:53:31 +00:00
parent f25ba8adcd
commit c316ef0092
11 changed files with 2062 additions and 75 deletions

View file

@ -132,17 +132,33 @@ This deploys GsDChat in an isolated container with zero open host ports, securel
### 4. Run the Client TUI
Launch the client interactively:
```bash
dotnet run --project src/GsDChat.Client
```
When launched, GsDChat opens a user-friendly **Server Selection Menu**:
- Displays a quick-access list of your recently visited servers and remembered usernames (like Discord server list).
- Option `[N]` to connect to a new server URL or IP.
- Option `[D]` to delete an entry from history.
- Prompts for credentials (or uses saved username) and masked password.
Or connect directly with credentials:
Or connect directly via command-line arguments:
```bash
dotnet run --project src/GsDChat.Client -- --server http://localhost:5000 --username Alice --password MyPassword123!
dotnet run --project src/GsDChat.Client -- --server https://chat.example.com --username Alice --password MyPassword123!
```
---
## Zero-Install WebClient (Mobile & Desktop)
GsDChat includes a responsive, zero-install WebClient built with pure HTML5, CSS3, and JavaScript (served directly from the server's `wwwroot/`):
- **Access**: Open `http://<server-ip>:5000/` or your Cloudflare Tunnel URL in any browser.
- **Mobile Optimized**: Designed specifically for phones and touchscreens with responsive navigation tabs, bottom chat bar, and native file pickers.
- **Offline / Private LAN Ready**: 100% self-contained with zero external CDN dependencies.
- **Features**: Real-time WebSocket messaging, channel switching, online user presence, authenticated file uploads, and downloads. Session tokens are remembered in browser storage.
---
## Client TUI Navigation
| Key | Action |