esim: show the profile icon image and its data size
pySim already requests the Icon tag (0x94) together with the other ProfileInfo tags; the mapping dropped it, so the PWA only had the icon type. - esim.profiles(): each profile now carries `icon` (the image bytes as hex) and `icon_size` (byte count), null when the card sent no image. - PWA: esimIconDataUrl() builds a data: URL (png/jpg -> image/png|jpeg) and the profile card shows the image unscaled to the left of the metadata rows; the Icon row keeps the type and adds the data size (e.g. 'png · 1234 B'). - tests: profiles icon/icon_size mapping (+ the absent case) and the frontend data URL / row / render checks; docs and sw simple-v231.
This commit is contained in:
+5
-1
@@ -225,7 +225,11 @@ lock; `GET /api/status` reports `euicc` and `eid` for the PWA.
|
||||
- `GET /api/esim/profiles` — `{"profiles": [{"iccid": "8970…",
|
||||
"isdp_aid": "A000…", "state": "enabled"|"disabled", "nickname": …,
|
||||
"provider": …, "name": …, "class": "test"|"provisioning"|"operational",
|
||||
"owner": "250-99", "icon_type": "png"|"jpg"}], "error": null}`.
|
||||
"owner": "250-99", "icon_type": "png"|"jpg", "icon": "89504E47…",
|
||||
"icon_size": 1234}], "error": null}`. `icon` is the SGP.22 icon data
|
||||
(tag `0x94`) as hex and `icon_size` its byte count, so a client can show
|
||||
the profile image (`data:image/<type>;base64,…`); both are `null` when the
|
||||
card sent no icon.
|
||||
- `GET /api/esim/notifications` — `{"notifications": [{"seq_number": 3,
|
||||
"operations": ["enable"], "address": "smdp.example.org",
|
||||
"iccid": "8970…"}], "error": null}`.
|
||||
|
||||
Reference in New Issue
Block a user