feat(sync): messages de commit neutres des deux cotes
L'historique du depot affichait "sync from <utilisateur du coffre>" a chaque
envoi du poste, et le telephone y ecrivait ce qu'il venait de faire ("new entry
from phone", "icon fetched from phone", "entries deleted from phone"). Le
contenu est chiffre, ces lignes ne l'etaient pas. Il ne reste que l'appareil
d'origine - le detail vit dans le journal local, ou il sert au diagnostic sans
quitter l'appareil.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
+14
-10
@@ -1061,6 +1061,10 @@ end;
|
||||
/// TIRER, sinon il ecraserait ce qu'un autre appareil a publie entre-temps.
|
||||
///
|
||||
/// AReopenUuid vide = revenir a la liste plutot qu'a une entree.
|
||||
/// AComment EST LE MESSAGE DU COMMIT : il part au depot et s'y lit dans
|
||||
/// l'historique. Il dit donc "update from phone" et rien de plus - ni le nom
|
||||
/// du compte, ni ce qui a change. Le detail reste dans le journal local, ou
|
||||
/// il sert au diagnostic sans quitter l'appareil.
|
||||
procedure TForm8.CommitChange(const ALabel, AComment, AReopenUuid: string;
|
||||
const APatch: TFunc<string, string>);
|
||||
begin
|
||||
@@ -1272,7 +1276,7 @@ begin
|
||||
end;
|
||||
LUuid := FCurrent.Uuid;
|
||||
LTitle := FCurrent.Display;
|
||||
CommitChange('Saved: ' + LTitle, AField + ' change from phone', LUuid,
|
||||
CommitChange('Saved: ' + LTitle, 'update from phone', LUuid,
|
||||
function (APlain: string): string
|
||||
begin
|
||||
Result := PatchEntryField(APlain, LUuid, AField, ANewValue);
|
||||
@@ -1308,7 +1312,7 @@ begin
|
||||
LUuid := FCurrent.Uuid;
|
||||
LTitle := FCurrent.Display;
|
||||
CommitChange('Saved: ' + LTitle,
|
||||
Format('%d field(s) changed from phone', [Length(AFields)]), LUuid,
|
||||
'update from phone', LUuid,
|
||||
function (APlain: string): string
|
||||
var
|
||||
J: Integer;
|
||||
@@ -1400,7 +1404,7 @@ begin
|
||||
end;
|
||||
|
||||
LBody := EncryptContainerWithKey(LMerged, FKey, FKeySalt, FKeyIters);
|
||||
LPut := LClient.Put(LBody, FETag, 'offline changes from phone');
|
||||
LPut := LClient.Put(LBody, FETag, 'update from phone');
|
||||
if LPut.Status = ssOK then
|
||||
begin
|
||||
FETag := LPut.ETag;
|
||||
@@ -1540,7 +1544,7 @@ begin
|
||||
// quelques secondes, et il n'arrive qu'une fois.
|
||||
if FKey = nil then LBody := EncryptContainer(LMerged, FSyncPwd)
|
||||
else LBody := EncryptContainerWithKey(LMerged, FKey, FKeySalt, FKeyIters);
|
||||
LPut := LClient.Put(LBody, LGet.ETag, 'reconciled from phone');
|
||||
LPut := LClient.Put(LBody, LGet.ETag, 'update from phone');
|
||||
if LPut.Status = ssOK then
|
||||
begin
|
||||
FETag := LPut.ETag;
|
||||
@@ -1645,7 +1649,7 @@ begin
|
||||
// Pas de rang a rouvrir : les entrees n'existeront plus. AdoptVault ramene la
|
||||
// liste, ce qui est exactement ou l'on veut se retrouver.
|
||||
CommitChange(Format('Deleted %d', [Length(LUuids)]),
|
||||
'entries deleted from phone', '',
|
||||
'update from phone', '',
|
||||
function (APlain: string): string
|
||||
var
|
||||
I: Integer;
|
||||
@@ -1736,7 +1740,7 @@ begin
|
||||
Exit;
|
||||
end;
|
||||
CommitChange(Format('Duplicated %d', [Length(LUuids)]),
|
||||
'entries duplicated from phone', '',
|
||||
'update from phone', '',
|
||||
function (APlain: string): string
|
||||
var
|
||||
I: Integer;
|
||||
@@ -1757,7 +1761,7 @@ begin
|
||||
RefuseChange('Give it at least a name');
|
||||
Exit;
|
||||
end;
|
||||
CommitChange('Added: ' + ATitle, 'new entry from phone', '',
|
||||
CommitChange('Added: ' + ATitle, 'update from phone', '',
|
||||
function (APlain: string): string
|
||||
begin
|
||||
Result := AddEntry(APlain, ATitle, ASite, AUser, APwd, AKind, AFolder,
|
||||
@@ -3466,7 +3470,7 @@ begin
|
||||
|
||||
if not AFetch then
|
||||
begin
|
||||
CommitChange('Icon removed: ' + LTitle, 'icon removed from phone', LUuid,
|
||||
CommitChange('Icon removed: ' + LTitle, 'update from phone', LUuid,
|
||||
function (APlain: string): string
|
||||
begin
|
||||
Result := PatchEntryIcon(APlain, LUuid, '', False);
|
||||
@@ -3507,7 +3511,7 @@ begin
|
||||
// Provenance a FAUX : elle vient d'une recherche automatique, pas
|
||||
// d'un choix. Le poste ne remplace jamais une icone choisie lors
|
||||
// d'un rafraichissement, et ce drapeau est ce qui le lui dit.
|
||||
CommitChange('Icon set: ' + LTitle, 'icon fetched from phone', LUuid,
|
||||
CommitChange('Icon set: ' + LTitle, 'update from phone', LUuid,
|
||||
function (APlain: string): string
|
||||
begin
|
||||
Result := PatchEntryIcon(APlain, LUuid, LUri, False);
|
||||
@@ -3567,7 +3571,7 @@ begin
|
||||
LSmall.Free;
|
||||
end;
|
||||
Log(Format('icon: picked image, %d chars', [Length(LUri)]));
|
||||
CommitChange('Icon set: ' + LTitle, 'icon picked on phone', LUuid,
|
||||
CommitChange('Icon set: ' + LTitle, 'update from phone', LUuid,
|
||||
function (APlain: string): string
|
||||
begin
|
||||
Result := PatchEntryIcon(APlain, LUuid, LUri, True);
|
||||
|
||||
Reference in New Issue
Block a user