docs: spec for PineAP dashboard mode-card removal
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
# PineAP Dashboard: Remove Mode Card, Move RF Role Card
|
||||
|
||||
Date: 2026-08-23
|
||||
|
||||
## Goal
|
||||
|
||||
Remove the "Passive / Active / Advanced" mode card from the PineAP dashboard and move the "RF Role (radio1)" card into its position, cleaning up all supporting code that becomes dead as a result.
|
||||
|
||||
## Layout
|
||||
|
||||
Current PineAP dashboard rows:
|
||||
|
||||
1. `[Passive/Active/Advanced, Quick Settings]`
|
||||
2. `[RF Role (radio1)]`
|
||||
3. `[Karma, Open Network, Evil WPA]`
|
||||
|
||||
New layout:
|
||||
|
||||
1. `[RF Role (radio1), Quick Settings]`
|
||||
2. `[Karma, Open Network, Evil WPA]`
|
||||
|
||||
## Changes
|
||||
|
||||
### `payload/user/remote_access/pager-webui/www/js/views.js` (`views.pineap`)
|
||||
|
||||
- Remove mode-card UI: `mode` badge, `segBtns`/`modeBar`, `modeInfo`, `saveModeBtn`, `modeCard`.
|
||||
- Append `rfCard` to `modeRow` (first position, before Quick Settings); delete `rfRow`.
|
||||
- Remove functions `selectMode()`, `saveMode()`, `renderModeInfo()`.
|
||||
- Remove state `selectedMode`, `modeDirty`, `modePending`.
|
||||
- Remove `PINEAP_SESSION.mode` and the `'advanced'` write in `rememberAdvanced()` (Quick Settings toggles keep working).
|
||||
- In `load()`: drop the `GET /api/pineap/mode` call, `PINEAP_SESSION.mode` tracking, and the badge-class update on the removed `mode` element.
|
||||
|
||||
### `payload/user/remote_access/pager-webui/www/css/app.css`
|
||||
|
||||
- Remove mode-card-only rules: `.seg`, `.seg-btn`, `.seg-btn + .seg-btn`, `.seg-btn.active`, `.seg-btn:disabled`, `.pineap-card-button-group .seg`, `.pineap-card-button-group .seg-btn`, `.pineap-mode-save`, `.pineap-mode-features`.
|
||||
- Keep `.pineap-card-title-flex` (used by other views).
|
||||
|
||||
## Untouched
|
||||
|
||||
- Backend `/api/pineap/mode` endpoint (still exercised by `tests/test_pineap_modes.py`).
|
||||
- RF role logic, all other views, `build/` (regenerated by `scripts/deploy.sh`).
|
||||
|
||||
## Verification
|
||||
|
||||
- `node --check` on `views.js`.
|
||||
- Manual browser check of the PineAP dashboard layout.
|
||||
Reference in New Issue
Block a user