Files

29 lines
2.6 KiB
Markdown
Raw Permalink Normal View History

# Compact profile modal and note tooltip: implementation plan (2026-10-04)
Goal: (1) make the profile details modal compact with a balanced layout, (2) show the profile note in a tooltip when hovering over the client name in the Certificates list. UI only; no API or DB changes.
## Steps
### 1. Compact modal (`APP_UI/src/components/ProfileDetailsModal.vue`)
- Remove `modal-lg`: use the default Bootstrap width (500 px) and `modal-dialog-centered`; on phones it stays full width minus margins.
- Layout of the details block: a compact two-column "label : value" list (fixed narrow label column, value left-aligned right next to it) instead of two wide columns. Rows: Status, Created, Expires (with days remaining next to the date, e.g. `2027-01-10 (98 d)`), Revoked (only if set), File.
- Header: client name as the title with the status badge next to it; the separate "Client Name" and "Status" rows are removed.
- File path: single line, `text-break`, small muted font.
- Note: textarea with 3 rows, counter under it on the right; Save / Close buttons stay in the footer.
- Dates: one short format (`YYYY-MM-DD HH:mm`) instead of locale date plus time.
### 2. Note tooltip (`APP_UI/src/views/Certificates.vue`)
- Hovering the username cell (both active and expired/revoked rows) shows a tooltip with the note text. No note: no tooltip.
- Implementation: Bootstrap Tooltip (already a dependency) via a small directive `v-note-tooltip="cert.note"` in `APP_UI/src/directives/` (create on mount, update the text when the note changes after saving, dispose on unmount). Options: `placement: 'top'`, `container: 'body'`, `html: false` (note is plain text, so no XSS), long text wrapped to a max width of about 320 px, line breaks preserved.
- Small note marker (`fa-note-sticky` icon, muted) next to the username when a note exists, so it is visible which clients have a note.
- Styles in `assets/main.css`: tooltip max width, `white-space: pre-wrap`, dark theme colours via existing variables.
### 3. Verification (containers, no new tests)
- No new automated tests (UI only, no UI test infrastructure).
- Rebuild `app-ui` in the existing stand (`ovpmon-test`, port 8089) and check manually: modal width and layout in light and dark themes and on a narrow window; tooltip on active and revoked rows; tooltip text updates right after saving a note; no tooltip for clients without a note; long and multi-line notes.
### 4. Documentation
- Summary appended to `DOCS/Changes/2026-10-04_Profile_Notes.md`; one line in the `README.md` changes table.
## Out of scope
Showing the note as a table column, editing the note from the list, API changes.