@page @model RR3CommunityServer.Pages.DeviceSettingsModel @{ ViewData["Title"] = "Device Server Settings"; }

📱 Device Server Settings

Configure server URLs for individual devices (syncs with APK)

← Back to Dashboard
@if (TempData["Message"] != null) { }
➕ Add New Device Configuration
Enter the device ID from the APK
Include port if not 80/443
â„šī¸ How It Works
  1. Add device configuration here
  2. User opens RR3 APK
  3. User taps "🔄 Sync from Web Panel"
  4. APK fetches settings from this server
  5. Game restarts with new settings
đŸ—‚ī¸ Configured Devices (@Model.DeviceSettings.Count)
@if (Model.DeviceSettings.Count == 0) {
No device settings configured yet. Add one above to get started.
} else {
@foreach (var setting in Model.DeviceSettings) { }
Device ID Mode Server URL Last Updated Actions
@setting.DeviceId @if (setting.Mode == "online") { 🌐 Online } else { 📱 Offline } @if (!string.IsNullOrEmpty(setting.ServerUrl)) { @setting.ServerUrl } else { — } @setting.LastUpdated.ToLocalTime().ToString("MMM dd, yyyy HH:mm")
}
📚 API Endpoints
GET /api/settings/getUserSettings?deviceId={deviceId}

Returns server configuration for a device (called by APK sync button)

{
  "mode": "online",
  "serverUrl": "https://rr3.example.com:8443",
  "message": "Settings retrieved successfully"
}
POST /api/settings/updateUserSettings

Update settings from web panel (this page uses it)

{
  "deviceId": "device_abc123",
  "mode": "online",
  "serverUrl": "https://rr3.example.com:8443"
}
GET /api/settings/getAllUserSettings

Get all device settings (admin only)

@section Scripts { }