diff --git a/js/app.sync.js b/js/app.sync.js index 4b2dc9c..1c2cf3a 100644 --- a/js/app.sync.js +++ b/js/app.sync.js @@ -846,7 +846,11 @@ async function runSyncNow(_attempt) { // not the same as none. `branch` is omitted too, so the repo's // default branch is used instead of a name we would be guessing. const env = { - message: 'sync from ' + (state.username || 'desktop'), + // NI LE NOM DU COMPTE NI CE QU'IL GARDE. L'historique du + // depot affichait "sync from " a chaque + // envoi : le contenu est chiffre, cette ligne ne l'etait pas. + // L'appareil d'origine suffit a savoir qui a publie. + message: 'update from desktop', content: bytesToBase64(containerBytes) }; if (remoteEtag) env.sha = remoteEtag; diff --git a/mainApk.pas b/mainApk.pas index fcae712..f334715 100644 --- a/mainApk.pas +++ b/mainApk.pas @@ -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); 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);