Files
UserOnlineStatus/Xboard/plugins/UserOnlineDevices/README.md
2026-04-07 17:19:59 +08:00

27 lines
1.1 KiB
Markdown

# User Online Devices Plugin
This plugin adds a user-facing online device dashboard for Xboard.
## Features
- Shows the current online device count based on Xboard's built-in `DeviceStateService`
- Shows the current online IP list for the logged-in user
- Optionally shows Sanctum login sessions
- Provides an authenticated API endpoint for the frontend to fetch the dashboard URL
- Provides a temporary signed dashboard page that auto-refreshes
## Routes
- `GET /api/v1/user-online-devices/summary`
- `GET /api/v1/user-online-devices/panel-url`
- `GET /userstatus`
- `GET /user-online-devices/userstatus`
- `GET /user-online-devices/panel/{user}` (temporary signed URL)
## Notes
- This plugin reuses Xboard's existing real-time device state data from Redis.
- In current Xboard releases, plugin development is primarily backend-oriented, so this plugin ships a standalone user-side page instead of patching the compiled SPA bundle directly.
- The "online device" count is effectively the number of unique online IPs reported by nodes.
- The easiest user entry is now `/userstatus`, which reads the current Xboard login token and shows the current user's own status.