feat(android): an entry can get its icon, through the same relay as the desktop

Fetching https://<site>/favicon.ico directly would resolve a DNS name - and
open a connection - to EVERY domain kept in the vault. The list of sites where
someone holds an account is precisely what this vault protects; handing it to
the network for a sixteen-pixel drawing would be a poor trade. The relay sees
only that someone is interested in one domain, which is why the call is asked
for entry by entry and never happens on its own.

Two tries: the full host, then the second-level domain - chat.qwen.ai has no
icon at the relay, qwen.ai does. The type comes from the first bytes, never
from the extension: the relay answers PNG under a .ico address.

A dedicated patch rather than PatchEntryField, because icon_custom is a NUMBER
in the snapshot and writing it as a string would give "0" - which the desktop
reads with GetValue<Boolean> and would choke on. It is set to zero: the icon
comes from an automatic lookup, not from a choice, and that flag is what stops
the desktop from ever replacing a chosen icon during a refresh.

Base64 without line breaks. Delphi's encoder wraps at 76 characters by
default, a wrapped data: URI does not display, and that trap has already been
paid once on the containers.
This commit is contained in:
r-zakarya
2026-08-22 15:39:19 +01:00
parent 73e3faa24c
commit 2010dec22a
6 changed files with 332 additions and 6 deletions
+9 -1
View File
@@ -1260,7 +1260,9 @@ function closeMenu() {
/// un menu qui apparait loin du doigt ne se rattache a rien.
function openMenu() {
var m = document.getElementById('menu');
m.innerHTML = '<button data-dup>Duplicate entry</button>'
m.innerHTML = '<button data-icon="fetch">Fetch icon</button>'
+ '<button data-icon="clear">Remove icon</button>'
+ '<button data-dup>Duplicate entry</button>'
+ '<button class="danger" data-del>Delete entry</button>';
m.hidden = false;
}
@@ -1274,6 +1276,12 @@ document.getElementById('kebab').addEventListener('click', function (ev) {
function onMenuClick(ev) {
var b = ev.target.closest('button');
if (!b) return;
var ic = b.getAttribute('data-icon');
if (ic !== null) {
closeMenu();
send('icon?a=' + ic);
return;
}
if (b.getAttribute('data-dup') !== null) {
closeMenu();
send('dupentry');