feat(apk): bouton de copie du code 2FA sur chaque ligne de la liste

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
r-zakarya
2026-09-18 14:58:09 +01:00
parent 255d685e73
commit 0e32a51bf1
3 changed files with 17 additions and 0 deletions
+10
View File
@@ -2032,6 +2032,16 @@ begin
begin
E := FVault.Entry(LIdx);
if Param('f') = 'user' then CopyToClipboard(E.Username, 'Username')
else if Param('f') = 'rtotp' then
begin
// Calcule a l'instant de la copie : un code se perime en 30 s.
var LLeft, LPeriod: Integer;
var LCode := TotpNow(E.Totp, LLeft, LPeriod);
if LCode <> '' then
CopyToClipboard(LCode, Format('2FA code (%d s left)', [LLeft]))
else
WebCall('PM.toast("Unreadable 2FA secret")');
end
else if E.IsNote then CopyToClipboard(E.Password, 'Content')
else CopyToClipboard(E.Password, 'Password');
end;