mirror of
https://github.com/UNITRONIX/BetterDesk.git
synced 2026-10-25 14:00:53 +00:00
9d7a08e7ab
Modernize Commercialization on packages/sessions IA: Settings Time tab with BILLING_TIMEZONE, group-only packages, monthly period history with midnight split, Web Remote report overlay, pending_report in Sessions, and package preview as a centered modal. Includes panel form polish and desktop-client API notes. Refs #456 Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow); muopc (@muopc)
1.4 KiB
1.4 KiB
Commercialization — desktop client / stock RustDesk
Billable sessions are created on the BetterDesk server for every connection that
uses this server’s signal/relay (PrepareRelay → ActivateRelay → EndRelay),
regardless of client SKU.
Stock RustDesk
- No in-client work-report UI.
- When
BILLING_REQUIRE_WORK_REPORTis enabled, ended sessions staypending_reportuntil an operator completes the report in Commercialization → Sessions → Complete report.
BetterDesk-Client (Flutter / UNITRONIX/BetterDesk-Client)
Target UX (same model as Web Remote):
- During a billable session: show package badge + “Work report” action (optional draft).
- On disconnect: prompt for work summary (required when billing requires reports).
- If the app closes without submit: leave the same
billing_sessionsrow aspending_report(no duplicate). Operator finishes it in the panel Sessions tab.
Panel / API hooks (already on BetterDesk server)
| Method | Path | Purpose |
|---|---|---|
| GET | /api/billing/check?device_id= |
package_name, remaining_minutes, allowed |
| GET | /api/billing/sessions/pending?device_id= |
latest pending_report for device |
| POST | /api/billing/sessions/{id}/report |
{ summary, category?, ticket_ref? } |
Client builds should call these with the operator token used for Client API auth. Implementation lives in the BetterDesk-Client repository (not this monorepo).