π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
fix auth qr position
Prateek Sunaleb1991e2df6d
diff --git a/mobile/apps/auth/lib/ui/code_widget.dart b/mobile/apps/auth/lib/ui/code_widget.dartindex 9f3f292e7c..752f909d2d 100644--- a/mobile/apps/auth/lib/ui/code_widget.dart+++ b/mobile/apps/auth/lib/ui/code_widget.dart@@ -936,8 +936,8 @@ class _CodeWidgetState extends State<CodeWidget> {builder: (BuildContext dialogContext) {return AuthQrDialog(data: qrData,- title: widget.code.account,- subtitle: widget.code.issuer,+ title: widget.code.issuer,+ subtitle: widget.code.account,shareFileName: 'ente_auth_qr_${widget.code.account}.png',shareText: 'QR code for ${widget.code.account}',dialogTitle: context.l10n.qrCode,diff --git a/mobile/apps/auth/lib/ui/components/auth_qr_dialog.dart b/mobile/apps/auth/lib/ui/components/auth_qr_dialog.dartindex 1e40209ead..306272cbee 100644--- a/mobile/apps/auth/lib/ui/components/auth_qr_dialog.dart+++ b/mobile/apps/auth/lib/ui/components/auth_qr_dialog.dart@@ -152,37 +152,42 @@ class _AuthQrDialogState extends State<AuthQrDialog> {const SizedBox(height: 8),RepaintBoundary(key: _qrKey,- child: Container(- width: double.infinity,- padding: const EdgeInsets.fromLTRB(20, 20, 20, 12),- decoration: BoxDecoration(- color: qrBoxColor,- borderRadius: BorderRadius.circular(22),- ),- child: Stack(- alignment: Alignment.center,- children: [- // Ente Auth icon at top right- Positioned(- top: -16,- right: -16,- child: Transform.rotate(- angle: -4 * 3.14159 / 180, // -4 degrees- child: Image.asset(- 'assets/qr_logo.png',- height: 64,- width: 64,+ child: ClipRRect(+ borderRadius: BorderRadius.circular(22),+ child: Container(+ width: double.infinity,+ decoration: const BoxDecoration(+ color: qrBoxColor,+ ),+ child: Stack(+ clipBehavior: Clip.none,+ alignment: Alignment.center,+ children: [+ // Ente Auth icon at top right - positioned at corner+ Positioned(+ top: -6,+ right: -6,+ child: Transform.rotate(+ angle: -4 * 3.14159 / 180, // -4 degrees+ child: Image.asset(+ 'assets/qr_logo.png',+ height: 52,+ width: 52,+ ),),),- ),- Column(+ Padding(+ padding: const EdgeInsets.fromLTRB(20, 20, 20, 12),+ child: Column(mainAxisSize: MainAxisSize.min,crossAxisAlignment: CrossAxisAlignment.center,children: [- // Account name at top center+ const SizedBox(height: 8),+ // Issuer at top center+ // Leave space for the logo (64px) + some paddingConstrainedBox(constraints: BoxConstraints(- maxWidth: qrSize,+ maxWidth: qrSize - 72,),child: Text(widget.title,@@ -230,24 +235,26 @@ class _AuthQrDialogState extends State<AuthQrDialog> {version: QrVersions.auto,size: qrSize,),- const SizedBox(height: 42),- ],+ const SizedBox(height: 42),+ ],+ ),),- // Auth branding at bottom right- Positioned(- bottom: 0,- right: 2,- child: SvgPicture.asset(- 'assets/svg/auth-logo.svg',- height: 16,- colorFilter: const ColorFilter.mode(- accentColor,- BlendMode.srcIn,+ // Auth branding at bottom right+ Positioned(+ bottom: 12,+ right: 22,+ child: SvgPicture.asset(+ 'assets/svg/auth-logo.svg',+ height: 16,+ colorFilter: const ColorFilter.mode(+ accentColor,+ BlendMode.srcIn,+ ),),),- ),- ],+ ],+ ),),),),diff --git a/mobile/apps/auth/lib/ui/home_page.dart b/mobile/apps/auth/lib/ui/home_page.dartindex 7ac99dabef..26660830f5 100644--- a/mobile/apps/auth/lib/ui/home_page.dart+++ b/mobile/apps/auth/lib/ui/home_page.dart@@ -460,8 +460,8 @@ class _HomePageState extends State<HomePage> {builder: (BuildContext dialogContext) {return AuthQrDialog(data: qrData,- title: code.account,- subtitle: code.issuer,+ title: code.issuer,+ subtitle: code.account,shareFileName: 'ente_auth_qr_${code.account}.png',shareText: 'QR code for ${code.account}',dialogTitle: context.l10n.qrCode,diff --git a/mobile/apps/auth/pubspec.lock b/mobile/apps/auth/pubspec.lockindex 1394739ea7..b9ca09c4fb 100644--- a/mobile/apps/auth/pubspec.lock+++ b/mobile/apps/auth/pubspec.lock@@ -465,13 +465,6 @@ packages:relative: truesource: pathversion: "0.0.1"- ente_qr_ui:- dependency: "direct overridden"- description:- path: "../../packages/qr"- relative: true- source: path- version: "0.0.1"ente_strings:dependency: "direct main"description:@@ -1364,15 +1357,6 @@ packages:url: "https://pub.dev"source: hostedversion: "6.0.3"- pretty_qr_code:- dependency: transitive- description:- path: "."- ref: HEAD- resolved-ref: "80ebafb9c99ac22520092b008579013d2fcffbe1"- url: "https://github.com/ente-io/flutter_pretty_qr_fork"- source: git- version: "3.5.0"privacy_screen:dependency: "direct main"description:diff --git a/mobile/apps/auth/pubspec_overrides.yaml b/mobile/apps/auth/pubspec_overrides.yamlindex 9c97026955..bf3e0b7f5d 100644--- a/mobile/apps/auth/pubspec_overrides.yaml+++ b/mobile/apps/auth/pubspec_overrides.yaml@@ -1,4 +1,4 @@-# melos_managed_dependency_overrides: ente_accounts,ente_base,ente_configuration,ente_events,ente_lock_screen,ente_logging,ente_network,ente_strings,ente_ui,ente_utils,dir_utils,ente_qr_ui+# melos_managed_dependency_overrides: ente_accounts,ente_base,ente_configuration,ente_events,ente_lock_screen,ente_logging,ente_network,ente_strings,ente_ui,ente_utils,dir_utilsdependency_overrides:dir_utils:path: ../../packages/dir_utils@@ -16,8 +16,6 @@ dependency_overrides:path: ../../packages/loggingente_network:path: ../../packages/network- ente_qr_ui:- path: ../../packages/qrente_strings:path: ../../packages/stringsente_ui: