feat(client): redesign native UI, themes, settings and avatars
Separate conversation drafts and voice view state, add native settings and restricted CSS themes, implement validated avatar cropping, and refresh dependencies with documented desktop compatibility backports.
This commit is contained in:
parent
44d284a568
commit
8e5ab56611
276 changed files with 53546 additions and 3399 deletions
|
|
@ -193,3 +193,31 @@ cargo build --release
|
|||
# Binary
|
||||
./target/release/vnox-client
|
||||
```
|
||||
|
||||
## Native client redesign (October 2026)
|
||||
|
||||
The current Slint shell uses neutral graphite surfaces, a server/channel sidebar,
|
||||
readable variable-height messages, a collapsible member panel, and persistent
|
||||
voice/profile controls below navigation. DM selection uses conversation IDs.
|
||||
Drafts are isolated per conversation and are cleared when leaving a server.
|
||||
Editable text, settings tabs, and keyfile forms survive UI synchronization.
|
||||
|
||||
Audio settings expose actual device lists, transmission mode, volume, and bitrate;
|
||||
preferences are saved in the platform config directory at `vnox/audio.json`.
|
||||
Push-to-talk has a hold control in the voice view. Encrypted identity vaults show
|
||||
an unlock screen at startup. Message deletion asks for confirmation.
|
||||
|
||||
The UI has no demo members/messages. Threads, uploads, camera, screen sharing,
|
||||
and global Hub features remain future work. The existing client JSON transport
|
||||
still needs migration to the server's Protobuf/TLS contract. The server currently
|
||||
has a single channel membership per session, so independent server-side text and
|
||||
voice subscriptions are not guaranteed by the new local view state. Legacy E2EE
|
||||
DM sends are blocked with a retained draft until a verified nonce/message-ID
|
||||
contract is implemented; the client does not advertise unverified E2EE status.
|
||||
|
||||
For native headless rendering and binding regressions, run `cargo test --workspace`.
|
||||
Set `VNOX_UI_SNAPSHOT_DIR=/tmp/vnox-ui` to emit test-only PPM screenshots for the
|
||||
chat, settings, voice, and connection views. These screenshots use test fixtures
|
||||
and do not connect to a server.
|
||||
|
||||
See [Themes and profile photos](themes.md) for appearance presets, restricted CSS themes, and the local avatar cropper.
|
||||
|
|
|
|||
72
docs/04-clients/themes.md
Normal file
72
docs/04-clients/themes.md
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
# Themes and appearance
|
||||
|
||||
Open **Settings → Appearance** to choose Light, Dark, Mega-dark or Custom. The
|
||||
same palette applies to chat, voice rooms, settings, dialogs and profile unlock.
|
||||
Text size ranges from 12 to 22 px; smaller metadata remains at least 11 px.
|
||||
|
||||
## Custom CSS format
|
||||
|
||||
Vnox is a native Slint application. Its theme files accept a restricted CSS
|
||||
custom-property format, not a browser stylesheet. Exactly one `:root { … }`
|
||||
block is allowed; comments are supported. Selectors, layout rules, `@import`,
|
||||
`url()`, scripts, external resources and unknown/duplicate variables are rejected.
|
||||
Files must have a `.css` extension and contain at most 16 KiB of UTF-8 text.
|
||||
|
||||
```css
|
||||
:root {
|
||||
--vnox-bg: #242424;
|
||||
--vnox-text: #eeeeee;
|
||||
--vnox-accent: #c8b797;
|
||||
--vnox-font-size: 17px;
|
||||
}
|
||||
```
|
||||
|
||||
Unspecified colors inherit the standard dark palette. For a complete starting
|
||||
point, export a built-in theme or edit [forest.css](../../examples/themes/forest.css).
|
||||
Colors support `#RGB`, `#RGBA`, `#RRGGBB` and `#RRGGBBAA` (alpha comes last).
|
||||
Font size must be a finite number from `12px` to `22px`.
|
||||
|
||||
| Variable | Controls |
|
||||
| --- | --- |
|
||||
| `--vnox-bg` | Main content background |
|
||||
| `--vnox-surface` | Sidebar and settings surfaces |
|
||||
| `--vnox-rail` | Server rail and slider tracks |
|
||||
| `--vnox-hover` | Hover backgrounds |
|
||||
| `--vnox-elevated` | Raised sections and profile surfaces |
|
||||
| `--vnox-input` | Inputs and controls |
|
||||
| `--vnox-selected` | Selected rows and text selection |
|
||||
| `--vnox-border` | Borders and dividers |
|
||||
| `--vnox-accent` | Focus, actions and accents |
|
||||
| `--vnox-text` | Primary text |
|
||||
| `--vnox-text-secondary` | Supporting text |
|
||||
| `--vnox-text-muted` | Metadata and hints |
|
||||
| `--vnox-text-disabled` | Disabled/de-emphasized text |
|
||||
| `--vnox-danger` | Destructive actions and errors |
|
||||
| `--vnox-success` | Voice and success states |
|
||||
| `--vnox-font-size` | Base text size |
|
||||
|
||||
## Preview, save and files
|
||||
|
||||
Built-in choices apply and save immediately. Selecting Custom opens its editor.
|
||||
**Preview** validates and applies the editor contents without saving; closing
|
||||
settings restores the last saved palette. **Apply** saves the custom theme.
|
||||
**Reset** restores the standard dark theme and default custom template.
|
||||
|
||||
The custom text-size slider updates the CSS preview; apply it to save. Import
|
||||
reads a local `.css` file and previews it. Export writes validated CSS to the
|
||||
specified path, replacing that file if it already exists. No theme data is sent
|
||||
over the network. Appearance preferences live in the platform config directory
|
||||
at `vnox/appearance.json`; the default import/export path is
|
||||
`vnox/custom-theme.css` in that directory.
|
||||
|
||||
## Profile photos
|
||||
|
||||
Settings → Identity offers a native photo picker, square crop with circular
|
||||
preview, drag/pan, zoom and confirm/cancel. PNG, JPEG and static WebP are accepted;
|
||||
SVG and animated images are rejected. Encoded input is limited to 10 MiB, image
|
||||
sides to 4096 px, and decoding allocations to 64 MiB. EXIF orientation is applied
|
||||
before cropping. Confirm writes a 256×256 PNG in `vnox/avatars/`, scoped to the
|
||||
current identity. Cancel and validation/save failures preserve the old photo.
|
||||
|
||||
Photos currently affect the local own-profile display only. There is no server
|
||||
profile-photo API yet, so other users/devices do not receive these photos.
|
||||
52
docs/maintenance/dependency-audit.md
Normal file
52
docs/maintenance/dependency-audit.md
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
# Аудит зависимостей клиента
|
||||
|
||||
Проверены crates.io/upstream metadata, Cargo registry и RustSec advisory database. Edition остаётся2024. Объявленный минимум поднят доRust1.94 для согласованности проекта; актуальный Slint требует1.92. Сборка и проверки выполняются Rust1.99.0; компилятор1.94 отдельно не проверялся.
|
||||
|
||||
## Прямые зависимости
|
||||
|
||||
| Crate | До (lock) | После (lock) |
|
||||
|---|---|---|
|
||||
| anyhow | 1.0.103 | 1.0.104 |
|
||||
| argon2 | 0.5.3 | 0.6.0 |
|
||||
| chacha20poly1305 | 0.10.1 | 0.11.0 |
|
||||
| cpal | 0.17.3, 0.18.1 | 0.18.2 |
|
||||
| dirs | 6.0.0 | 7.0.0 |
|
||||
| ed25519-dalek | 2.2.0 | 3.0.0 |
|
||||
| hex | 0.4.3 | 0.4.3 |
|
||||
| hkdf | 0.13.0 | 0.13.0 |
|
||||
| image | новая прямая зависимость | 0.25.10 |
|
||||
| nnnoiseless | 0.5.2 | 0.5.2 |
|
||||
| opus | 0.3.1 | 0.4.0 |
|
||||
| rand | 0.8.6, 0.9.5, 0.10.2 | 0.9.5, 0.10.3 |
|
||||
| rfd | новая прямая зависимость | 0.17.2 |
|
||||
| serde | 1.0.228 | 1.0.229 |
|
||||
| serde_bytes | 0.11.19 | 0.11.19 |
|
||||
| serde_json | 1.0.150 | 1.0.154 |
|
||||
| sha2 | 0.10.9, 0.11.0 | 0.11.1 |
|
||||
| slint | 1.17.1 | 1.18.1 |
|
||||
| slint-build | 1.17.1 | 1.18.1 |
|
||||
| tokio | 1.52.3 | 1.54.1 |
|
||||
| tracing | 0.1.44 | 0.1.44 |
|
||||
| tracing-subscriber | 0.3.23 | 0.3.23 |
|
||||
| uuid | 1.23.4 | 1.29.0 |
|
||||
| x25519-dalek | 2.0.1 | 3.0.0 |
|
||||
|
||||
Неиспользуемый rodio удалён: аудиопайплайн использует cpal напрямую. Убраны неиспользуемые default backend/system-tray features Slint, сохранены Winit, OpenGL/software renderer и accessibility. Для аватара добавлены image с PNG/JPEG/WebP и rfd с portal/Wayland/Tokio.
|
||||
|
||||
## Безопасность
|
||||
|
||||
RustSec до обновления:5 advisories. После обновления:0 известных уязвимостей. Это не доказательство отсутствия неизвестных ошибок.
|
||||
|
||||
Все пять прежних имён (`bincode`, `ttf-parser`, `zbus_names`, `zvariant`, `zvariant_derive`) полностью удалены из lock-файла. Финальный RustSec audit: **0 известных уязвимостей, 0 предупреждений**. Advisory ignores не добавлялись.
|
||||
|
||||
Для этого обновлён rfd до0.17.2, parent UI/accessibility callers адаптированы к поддерживаемому zbus6, Wayland CSD использует crossfont0.9. Accessibility, portal и Wayland сохранены. `typed-index-collections` закреплён на совместимом3.2.3, чтобы убрать неиспользуемый optional bincode из resolution; это осознанное исключение из выбора самой новой версии.
|
||||
|
||||
Локальные compatibility backports — отдельная обязанность сопровождения, а не релизы upstream. Точные исходные версии, SHA256, лицензии, исходные ревизии и девять компактных diff записаны в `patches/`. Патчи следует удалить после соответствующих upstream релизов. Для Linux нужны FreeType/fontconfig development packages (`libfreetype6-dev libfontconfig1-dev` на Ubuntu).
|
||||
|
||||
## Совместимость и проверки
|
||||
|
||||
Криптографические API мигрированы без изменения формата nonce/KDF/vault. Добавлен фиксированный независимый fixture Argon2id+ChaCha20Poly1305 и проверка повреждённого nonce. Проверены49workspace тестов, сборка, Clippy-Dwarnings, форматирование и отдельный реальный privateD-Bus smoke. Дополнительно1141/1141 сохранённых upstream atspi-common тестов прошли без пропусков; инструкции воспроизведения в patches/test-upstream.py. Windows/macOS, реальный screen reader и Rust1.94 в этой задаче не проверялись.
|
||||
|
||||
Основной клиент/сервер всё ещё требуют отдельной миграции JSON→Protobuf/TLS; обновление crates этого не исправляет. Существующая u32 область nonce/sequence требует rekey/disconnect до повторного использования.
|
||||
|
||||
Источники: https://crates.io/ ; https://docs.rs/slint/latest/slint/ ; https://docs.rs/image/latest/image/ ; https://docs.rs/rfd/latest/rfd/ ; https://rustsec.org/ .
|
||||
Loading…
Add table
Add a link
Reference in a new issue