Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[auth] add notes & secret to html export file

Aman Raj941b3263287d
diff --git a/auth/lib/ui/settings/data/html_export.dart b/auth/lib/ui/settings/data/html_export.dart
index 86090dc634..705bd8507c 100644
--- a/auth/lib/ui/settings/data/html_export.dart
+++ b/auth/lib/ui/settings/data/html_export.dart
@@ -38,7 +38,10 @@ Future<String> generateOTPEntryHtml(
BuildContext context,
) async {
final qrBase64 = await generateQRImageBase64(code.rawData);
-
+ String notes = code.display.note;
+ if (notes.isNotEmpty) {
+ notes = '<p>Note: <b>$notes</b></p>';
+ }
return '''
<div class="otp-entry">
<div>
@@ -48,6 +51,8 @@ Future<String> generateOTPEntryHtml(
<p>Type: <b>${code.type.name}</b></p>
<p>Algorithm: <b>${code.algorithm.name}</b></p>
<p>Digits: <b>${code.digits}</b></p>
+ <p>Recovery Code: <b>${code.secret}</b></p>
+ $notes
</div>
<img src="data:image/png;base64,$qrBase64" alt="QR Code">
</div>