Merge the identity defaults: one default, one identities page
The development branch's identity work and this wave's Profiles page
were two models of the same thing: the store's default identity (schema
4: where each identity came from and which one is the default, which the
import on start relies on to replace Voelin's own identity once) next to
this wave's identity.default setting, and a separate Identities section
next to Profiles. They are one now.
- The store's default is the only default: the identity.default setting
is gone (never released, so nothing to migrate). Choosing an identity
calls Store::set_default_identity as the user's choice, which no
import replaces, and says it applies from the next connection.
- One place picks the identity of a connection: the bookmark's own if it
names one that exists, else the store's default. Connecting, My
Account and each identity's "Used by" all go through it.
- Profiles has what Identities had: each identity's origin ("Made in
Voelin", "Imported", "Chosen by you") with its level, the Default
badge or "Use as default", and the switch for importing the official
clients' identities on start, next to this wave's rename, export,
delete, security level, import by hand and identity per server. The
Identities section, its sidebar entry and the phone's sixth tab are
gone; VOELIN_OPEN=settings:identities opens Profiles.
- docs/identity.md and docs/ui.md say so; the Identities screenshot gives
way to the Profiles one, taken from a store with the created identity
and a synthetic TeamSpeak one.
Checked headless with a fake home and synthetic identities only: the
first start creates Default; the second, with a synthetic TeamSpeak 6
database, makes its identity the default once and says so; the third
changes nothing, and My Account shows the store's default.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
301f472ecf
24 files changed
+541
-137
No files matched your search
+28
-8
@@ -171,14 +171,34 @@ voelinctl identity export <id> <path> [--store <db>]
|
||||
**On every start** the app does the same as `import --auto`
|
||||
(`voelin_core::identity::import_new`): identities found in the default
|
||||
locations that the client database does not have yet are added, the files
|
||||
are only read. The identity the official client uses by default (field 5 of
|
||||
its payload, below) goes in first, so when Voelin has no identity of its own
|
||||
yet, that one becomes Voelin's default (the first identity) and servers see
|
||||
the same unique id; otherwise Voelin's default stays. What was imported is
|
||||
shown once, in the status line (the toast on desktop), by nickname. The
|
||||
runtime setting `identity.import_from_teamspeak` (default on) turns it off,
|
||||
e.g. `--set identity.import_from_teamspeak=false`. The sample data of
|
||||
`VOELIN_DEMO_UI` never imports.
|
||||
are only read. The user should appear as on the official client, so the
|
||||
identity the official client uses by default (field 5 of its payload, below;
|
||||
TeamSpeak 6's before TeamSpeak 3's) becomes Voelin's default when Voelin has
|
||||
none, or only the one it created on its own the first time it started,
|
||||
which nobody chose. That happens once: the created identity is kept, and
|
||||
choosing it again in Settings → Profiles makes it the user's own, which
|
||||
no import replaces; identities that were imported or chosen are never
|
||||
replaced. The store keeps where each identity came from and which one is the
|
||||
default (`identities.origin`: `created`, `imported`, `user`;
|
||||
`identities.is_default`; schema version 4, which marks the first identity
|
||||
named `Default` of an older database as created). What happened is shown
|
||||
once in the status line (the toast on desktop), by nickname, e.g. "You now
|
||||
use your TeamSpeak identity "X"; your previous one is kept". The runtime
|
||||
setting `identity.import_from_teamspeak` (default on, also in Settings →
|
||||
Profiles) turns it off, e.g. `--set identity.import_from_teamspeak=false`.
|
||||
The sample data of `VOELIN_DEMO_UI` never imports.
|
||||
|
||||
**Settings → Profiles** lists the stored identities with where they came
|
||||
from ("Made in Voelin", "Imported", "Chosen by you"), their security level
|
||||
and unique ids; "Use as default" picks the one servers see from the next
|
||||
connection on (`Store::set_default_identity` as the user's choice). The
|
||||
store's default is the only default: a server connects with the identity its
|
||||
bookmark names, if any (Profiles → Identity per server), else with the
|
||||
store's default, and My Account shows the one the current server uses. The
|
||||
page also renames, exports, deletes and raises the security level of
|
||||
identities, and finds and imports the official clients' identities by
|
||||
hand. `voelinctl identity list` shows the same (origin and default).
|
||||
`VOELIN_OPEN=settings:profiles` (or `settings:identities`) opens it.
|
||||
|
||||
- **Import** prints what it found as nickname, unique id and security level —
|
||||
all three are public, everything else in an identity is the private key —
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 133 KiB After Width: | Height: | Size: 128 KiB |
+10
-3
@@ -178,7 +178,7 @@ Settings sections (`settings:<section>`):
|
||||
| Section | Holds |
|
||||
|---|---|
|
||||
| `account` | The identity in use (nickname, TeamSpeak 3 and 6 unique ids, security level) and why there is no myTeamSpeak sign-in |
|
||||
| `profiles` | Identities: rename, make default (`identity.default`), export as a TeamSpeak 3 .ini, delete, raise the security level on every core; import from the official clients' settings and .ini files (key material is never shown); the identity per server |
|
||||
| `profiles` (also `identities`) | Identities with where they came from: rename, use as default (the store's default, `Store::set_default_identity`), export as a TeamSpeak 3 .ini, delete, raise the security level on every core; the import of the official clients' identities on start (`identity.import_from_teamspeak`) and by hand from their settings and .ini files (key material is never shown); the identity per server |
|
||||
| `appearance` | Theme, text size, the phone layout's width, the image cache |
|
||||
| `voice` | Microphone (device, test, level, noise suppression, echo cancellation, automatic gain), output (device, test sound, volume), streaming permissions, camera (device, preview with the background effect), video settings (resolution, frame rate, codec, hardware acceleration, mirror), stream quality presets with free bitrate entry and the upload it takes |
|
||||
| `streaming` | Frame rate, bitrate, codec, capture backend, simulcast layers, the stream's audio sources (desktop without Voelin, applications, the shared window's application, microphone; gain and mute each), recording and replay |
|
||||
@@ -264,6 +264,14 @@ server is saved without one and when it connects
|
||||
and one found is stored as if typed. `bookmark` and `bookmark:edit` open
|
||||
it (below).
|
||||
|
||||
Settings → Profiles (`ProfilesSection` in `screens/settings-pages.slint`;
|
||||
`settings_pages.rs`, and `identities.rs` for the default and the import
|
||||
switch) lists the stored identities with where they came from, marks the
|
||||
store's default and has "Use as default" for the others, plus the switch
|
||||
for importing the official clients' identities on start
|
||||
([identity.md](identity.md)). `settings:profiles` opens it, and
|
||||
`settings:identities` as well.
|
||||
|
||||
## Adding a screen
|
||||
|
||||
1. Write the screen in `ui/screens/<name>.slint` from the components
|
||||
@@ -299,7 +307,6 @@ live when they change (settings page, `--set`, another window):
|
||||
| `ui.image_preview_kb` | kilobytes | 8192 | pictures linked in chat up to this size show as pictures (0: never) |
|
||||
| `notify.mentions`, `notify.private_messages`, `notify.pokes`, `notify.event_reminders`, `notify.friends_online` | off / app / desktop | desktop (friends: app) | what the bell and the desktop say about each kind |
|
||||
| `video.camera`, `video.background`, `video.resolution`, `video.mirror` | device id; none / blur; auto or WxH; bool | first camera, none, auto, true | the camera of the preview and the default of camera sources |
|
||||
| `identity.default` | identity id | 0 (the first) | the identity used where a bookmark names none |
|
||||
| `studio.ui` | JSON | see below | the Stream Studio's stream settings: `title`, `game`, `message` (go-live), `show_viewers`, `show_chat`, `show_now_playing`, `audio` (stream audio), `preview_width` (960), `preview_fps` (15) |
|
||||
|
||||
In a config file write them as dotted keys at the top level
|
||||
@@ -329,7 +336,7 @@ Environment variables (see `src/dev.rs`):
|
||||
|
||||
- `VOELIN_DEMO_UI=1`: sample servers, channels, members, chat with emoji and
|
||||
a stream, without a server (nothing is stored).
|
||||
- `VOELIN_OPEN=<what>[,<what>...]`: `home`, `server`, `settings[:voice|keybinds|streaming|privacy|appearance]`,
|
||||
- `VOELIN_OPEN=<what>[,<what>...]`: `home`, `server`, `settings[:voice|keybinds|streaming|privacy|appearance|profiles]` (`identities` is the same as `profiles`),
|
||||
`about`, `share[:live]`, `bookmark[:edit]`, `emoji`, `client`, `panel`, `no-panel`,
|
||||
`voice`, `pins`, `topics`, `topic:<id>`, `member`, `watch`, `popout`
|
||||
(the server page, above), `tab:<home|servers|chat|activity|you>` (phone
|
||||
|
||||
Reference in new issue
Block a user