wrolpi/app/src/components
Roland 07af0c9f28 controller: de-duplicate the hardware toggles
The Hotspot, Bluetooth, Desktop, VNC and Throttle toggles had each been written
out longhand at four layers. Collapse the shared parts:

- useSubsystemToggle() replaces five near-identical hooks. This also fixes a
  latent bug: only useDesktop/useVnc restored state when a request failed, so a
  failed Bluetooth/Throttle/Hotspot toggle left  at null and — since the
  status poll sees no change — the toggle stayed disabled and read as
  unsupported until it remounted.
- SubsystemToggle renders all five, with the Desktop's stop confirmation and
  VNC's desktop gating as declared options rather than bespoke copies.
- The fallback UI's four update*/toggle* pairs become one config-driven
  implementation (-100 lines).
- _raise_for_action() centralises the 13 endpoint failure checks, including
  VNC's 409-vs-500 split.

Deliberately not shared: the six get_*_status_dict() builders (payloads
genuinely differ) and the per-subsystem mechanisms (nmcli/rfkill/sysfs/systemctl).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:48:08 -06:00
..
admin controller: VNC toggle, gated on the Desktop running 2026-07-29 18:10:05 -06:00
calculators Antenna calculator: harden wavelength/MHz input handlers. 2026-07-15 19:57:48 -06:00
collections Consolidating deletion endpoints. 2026-05-03 19:14:30 -06:00
inventory Focusing on lone input when opening modals. 2026-07-06 15:35:23 -06:00
AddToPlaylist.js Focusing on lone input when opening modals. 2026-07-06 15:35:23 -06:00
Apps.js Moving OTP and Vin decoder to calculators to save Navbar space. Reworking calculators to purpose groups, and adding colors. 2026-07-01 18:48:06 -06:00
Archive.js app: handle form fetch failures without unhandled rejection 2026-07-16 19:40:28 -06:00
ArchivePreview.js Showing preview of zip file contents, allowing user to download individual files without full extraction. 2026-03-15 12:58:40 -06:00
BulkTagModal.js Converting Theme.js to typescript so we can use shorthands like Card.Icon. 2025-12-07 12:41:10 -07:00
BulkTagModal.test.js Converting Theme.js to typescript so we can use shorthands like Card.Icon. 2025-12-07 12:41:10 -07:00
Calculators.js Moving OTP and Vin decoder to calculators to save Navbar space. Reworking calculators to purpose groups, and adding colors. 2026-07-01 18:48:06 -06:00
CbzViewer.js Reworking file preview buttons to be consistent across screens. 2026-04-15 13:18:45 -06:00
Channels.cy.js Moving form fields. 2025-12-06 15:11:37 -07:00
Channels.js Add ordered collections (playlists): polymorphic items + item API (#475) 2026-06-11 19:46:34 -06:00
Common.js controller: de-duplicate the hardware toggles 2026-07-29 19:48:08 -06:00
Common.test.js Fixing error where focusing on an empty Directory search would throw an error. 2026-06-24 15:23:32 -06:00
DatesSelector.js Consolidate search options into a single Filter modal (#497) 2026-06-23 19:49:25 -06:00
DesktopToggle.test.js controller: Desktop start/stop toggle; rename hotspot/bluetooth actions to what they do 2026-07-29 15:19:36 -06:00
Docs.js Search: fast ABC mode by default, opt-in deep search 2026-07-03 10:32:16 -06:00
DomainEditPage.test.js app: handle form fetch failures without unhandled rejection 2026-07-16 19:40:28 -06:00
DomainsPage.test.js Reformatting code. 2025-12-06 15:11:37 -07:00
DomainTagging.test.js Reformatting code. 2025-12-06 15:11:37 -07:00
DonatePage.js Adding noreferrer to all external links. 2026-02-15 17:26:36 -07:00
Download.cy.js Adding edit form for Scrape downloader. 2024-12-03 12:44:38 -07:00
Download.js Archives can be compressed (SingleFileZ self-extracting HTML) (#477) 2026-06-11 19:46:35 -06:00
Download.test.js Reformatting code. 2025-12-06 15:11:37 -07:00
ErrorBoundary.js Adding Upload button to the FileBrowser. Adding ErrorBoundaries to prevent entire app from crashing. 2025-12-25 09:14:00 -07:00
FileBrowser.js Focusing on lone input when opening modals. 2026-07-06 15:35:23 -06:00
FileBrowser.test.js File Browser: add filter input and collapse-all button 2026-07-03 11:31:41 -06:00
FilePreview.js Open in Slicer: launch slicer programmatically from dropdown items. 2026-07-05 13:31:40 -06:00
FilePreview.test.js File preview: Open in Slicer button for STL/3MF files. 2026-07-05 13:31:40 -06:00
Files.js Module pages: always show the deep-search reminder during fast searches 2026-07-03 10:50:57 -06:00
Flasher.js Flasher: show connect error next to the detect button too 2026-07-02 17:26:45 -06:00
Flasher.test.js Address Greptile review: fix chip-id map (17=C5, 18=P4) and drop stale mock 2026-07-02 17:26:37 -06:00
Headline.js Remove stale Postgres references after SQLite cutover. 2026-07-18 13:28:54 -06:00
HelpModal.js Adding videos page hotkeys to help play and navigate videos. Adding f hotkey for all local search fields (channel/domain/etc). Focusing when opening cookie modals. 2026-02-23 17:29:09 -07:00
KeyboardShortcutsProvider.js Adding fullscreen keyboard shortcut. 2026-03-27 17:59:36 -06:00
Map.js Add ordered collections (playlists): polymorphic items + item API (#475) 2026-06-11 19:46:34 -06:00
MapSearchView.js Map search added to global search. Preview cards are displayed for all results in new Map tab. 2026-04-13 12:17:08 -06:00
MapViewer.js Map search added to global search. Preview cards are displayed for all results in new Map tab. 2026-04-13 12:17:08 -06:00
Nav.js Moving OTP and Vin decoder to calculators to save Navbar space. Reworking calculators to purpose groups, and adding colors. 2026-07-01 18:48:06 -06:00
otp.js Move One-Time Pad encryption to the browser (#479) 2026-06-13 13:52:34 -06:00
otp.test.js Move One-Time Pad encryption to the browser (#479) 2026-06-13 13:52:34 -06:00
Placeholder.js Configs are displayed in new ConfigsPage under Admin. 2024-10-16 18:56:45 -06:00
Playlists.js Playlists can be tagged on creation. Playlist destination is no longer empty by default. 2026-06-11 19:46:35 -06:00
Playlists.test.js Add ordered collections (playlists): polymorphic items + item API (#475) 2026-06-11 19:46:34 -06:00
Search.js Search: fast ABC mode by default, opt-in deep search 2026-07-03 10:32:16 -06:00
SearchFilterModal.test.js Search: fast ABC mode by default, opt-in deep search 2026-07-03 10:32:16 -06:00
Share.js Converting Theme.js to typescript so we can use shorthands like Card.Icon. 2025-12-07 12:41:10 -07:00
ShortcutHint.js Displaying cmd+k/ctrl+k global search keyboard shortcut suggestion. 2026-02-23 16:07:22 -07:00
SortableTable.js Adding default 'No results' row when sortable table has no rows. 2024-01-01 17:10:51 -07:00
Tables.js Reworking empty-states for all pages and tables. Removing custom isEmpty in favor of lodash. 2023-01-04 09:14:33 -07:00
TaggedDeleteConfirmModal.js Models like Archive/Video/Doc can be deleted, even if they are tagged. User is shown a warning and must confirm deletion of tagged files. 2026-05-03 19:14:15 -06:00
TaggedDeleteConfirmModal.test.js Models like Archive/Video/Doc can be deleted, even if they are tagged. User is shown a warning and must confirm deletion of tagged files. 2026-05-03 19:14:15 -06:00
Theme.test.js Fix "node.contains is not a function" crash on Modal/Popup triggers 2026-07-20 11:43:14 -06:00
Theme.tsx Fix "node.contains is not a function" crash on Modal/Popup triggers 2026-07-20 11:43:14 -06:00
Upload.js Reformatting code. 2025-12-06 15:11:37 -07:00
Vars.js Restore "Most Views" download order 2026-07-07 16:34:50 -06:00
VideoPlayer.js videos: address review — tighten auto-caption detection 2026-07-16 18:29:18 -06:00
VideoPlayer.test.js videos: address review — tighten auto-caption detection 2026-07-16 18:29:18 -06:00
Videos.js Search: fast ABC mode by default, opt-in deep search 2026-07-03 10:32:16 -06:00
VncToggle.test.js controller: VNC toggle, gated on the Desktop running 2026-07-29 18:10:05 -06:00
Zim.js Fixing bug where zim articles were not aligned in modals. 2026-06-11 19:46:34 -06:00