PublicUI Changes
Client Applications
PUBLICUI_CHANGES.md
PublicUI Navigation Changes
Changes Made
1. Navigation Menu Updated
File: MCBDS.PublicUI\Components\Layout\NavMenu.razor
- Renamed "Home" "Overview"
- Removed "Weather" tab
- Added "Commands" tab with terminal icon
2. Home Page Updated
File: MCBDS.PublicUI\Components\Pages\Home.razor
- Changed page title from "Hello, world!" to "Overview"
- Added descriptive welcome content
- Added navigation guide for users
3. Commands Page Created
File: MCBDS.PublicUI\Components\Pages\Commands.razor
New page with full functionality:
- Send commands to Minecraft server
- View real-time server log (auto-refreshes every 3 seconds)
- Restart server button
- Status messages with color coding
- Enter key support for sending commands
- Loading indicators for all actions
4. Weather Page Removed
File: MCBDS.PublicUI\Components\Pages\Weather.razor
- Deleted (no longer needed)
Navigation Structure
MCBDS.PublicUI
Overview (/)
Counter (/counter)
Commands (/commands)
Features in Commands Page
Command Input
- Text input with Enter key support
- Send button with loading state
- Status messages (success/error/warning)
Server Log Viewer
- Real-time log display (400px scrollable area)
- Auto-refresh every 3 seconds
- Manual refresh button
- Dark theme for better readability
Server Management
- Restart server button
- Status feedback for all operations
How to Test
- Start the AppHost (to run the API)
- Note the API URL from Aspire Dashboard
- Update the URL in
MCBDS.PublicUI\MauiProgram.csif needed - Run MCBDS.PublicUI
- Navigate to Commands tab
- Try sending commands like:
list- List playerssay Hello World- Broadcast messagehelp- Show available commands
Integration
The Commands page uses the shared BedrockApiService from:
MCBDS.ClientUI.Shared\Services\BedrockApiService.cs
This service connects to the Aspire-orchestrated API endpoints:
GET /api/runner/log- Get server logPOST /api/runner/send- Send commandPOST /api/runner/restart- Restart server