Skip to content

armgit / ente

Public Imported from GitHub
0

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

[auth] Show notes on bottom action bar

Neeraj Gupta9dd18f013771
diff --git a/auth/lib/models/code.dart b/auth/lib/models/code.dart
index cd91354ca1..4ecb4213d4 100644
--- a/auth/lib/models/code.dart
+++ b/auth/lib/models/code.dart
@@ -28,10 +28,14 @@ class Code {
bool get isPinned => display.pinned;
bool get isTrashed => display.trashed;
+ String get note => display.note;
final Object? err;
bool get hasError => err != null;
+ String get issuerAccount =>
+ account.isNotEmpty ? '$issuer ($account)' : issuer;
+
Code(
this.account,
this.issuer,
diff --git a/auth/lib/ui/components/actions_bar_widget.dart b/auth/lib/ui/components/actions_bar_widget.dart
index ad52244e8a..07bc36a260 100644
--- a/auth/lib/ui/components/actions_bar_widget.dart
+++ b/auth/lib/ui/components/actions_bar_widget.dart
@@ -24,34 +24,49 @@ class _ActionBarWidgetState extends State<ActionBarWidget> {
return SizedBox(
child: Padding(
padding: const EdgeInsets.fromLTRB(20, 8, 20, 8),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ child: Column(
+ // left align the text
+ crossAxisAlignment: CrossAxisAlignment.start,
children: [
- Flexible(
- flex: 1,
- child: Text(
- widget.code.issuer,
+ if (widget.code.note.isNotEmpty)
+ Text(
+ widget.code.note,
style: textTheme.miniMuted,
),
- ),
- Flexible(
- flex: 1,
- child: Padding(
- padding: const EdgeInsets.symmetric(vertical: 12),
- child: GestureDetector(
- behavior: HitTestBehavior.opaque,
- onTap: () {
- widget.onCancel?.call();
- },
- child: Align(
- alignment: Alignment.centerRight,
- child: Text(
- context.l10n.cancel,
- style: textTheme.mini,
+ Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Flexible(
+ flex: 1,
+ child: Column(
+ children: [
+ Text(
+ widget.code.issuerAccount,
+ style: textTheme.miniMuted,
+ ),
+ ],
+ ),
+ ),
+ Flexible(
+ flex: 1,
+ child: Padding(
+ padding: const EdgeInsets.symmetric(vertical: 12),
+ child: GestureDetector(
+ behavior: HitTestBehavior.opaque,
+ onTap: () {
+ widget.onCancel?.call();
+ },
+ child: Align(
+ alignment: Alignment.centerRight,
+ child: Text(
+ context.l10n.cancel,
+ style: textTheme.mini,
+ ),
+ ),
),
),
),
- ),
+ ],
),
],
),