controller: Desktop start/stop toggle; rename hotspot/bluetooth actions to what they do

Add a Desktop toggle to the Controller (both UIs) that starts/stops
display-manager.service. Fail open: the unit is never enabled/disabled,
so the desktop always returns on reboot; users who want it disabled
across reboots can set the default target themselves.

Rename the hotspot and bluetooth actions to reflect their real behavior:
- enable/disable_hotspot -> start/stop_hotspot (/api/hotspot/start|stop)
- enable/disable_bluetooth -> unblock/block_bluetooth (rfkill semantics,
  /api/bluetooth/unblock|block)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Roland 2026-07-29 14:57:28 -06:00 • committed by lrnselfreliance
parent a4eeba14ee
commit 3e559e1bf8
14 changed files with 712 additions and 132 deletions

View file

@ -92,12 +92,12 @@ export async function updateHotspotSettings(settings) {
return controllerFetch('/hotspot/settings', {method: 'POST', body: JSON.stringify(settings)});
}
export async function enableHotspot() {
return controllerFetch('/hotspot/enable', {method: 'POST'});
export async function startHotspot() {
return controllerFetch('/hotspot/start', {method: 'POST'});
}
export async function disableHotspot() {
return controllerFetch('/hotspot/disable', {method: 'POST'});
export async function stopHotspot() {
return controllerFetch('/hotspot/stop', {method: 'POST'});
}
export async function getThrottleStatus() {
@ -116,12 +116,24 @@ export async function getBluetoothStatus() {
return controllerFetch('/bluetooth/status');
}
export async function enableBluetooth() {
return controllerFetch('/bluetooth/enable', {method: 'POST'});
export async function unblockBluetooth() {
return controllerFetch('/bluetooth/unblock', {method: 'POST'});
}
export async function disableBluetooth() {
return controllerFetch('/bluetooth/disable', {method: 'POST'});
export async function blockBluetooth() {
return controllerFetch('/bluetooth/block', {method: 'POST'});
}
export async function getDesktopStatus() {
return controllerFetch('/desktop/status');
}
export async function startDesktop() {
return controllerFetch('/desktop/start', {method: 'POST'});
}
export async function stopDesktop() {
return controllerFetch('/desktop/stop', {method: 'POST'});
}
// --- Samba Endpoints ---