π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mob][locker] Update Legacy pdf design (#11536)
Aman Raj2d2b0dbda9af
diff --git a/mobile/apps/auth/android/gradle/wrapper/gradle-wrapper.properties b/mobile/apps/auth/android/gradle/wrapper/gradle-wrapper.propertiesindex efdcc4ace9..02767eb1ca 100644--- a/mobile/apps/auth/android/gradle/wrapper/gradle-wrapper.properties+++ b/mobile/apps/auth/android/gradle/wrapper/gradle-wrapper.properties@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOMEdistributionPath=wrapper/distszipStoreBase=GRADLE_USER_HOMEzipStorePath=wrapper/dists-distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip+distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zipdiff --git a/mobile/apps/auth/android/settings.gradle b/mobile/apps/auth/android/settings.gradleindex b44e9f8fad..8ae709e9a7 100644--- a/mobile/apps/auth/android/settings.gradle+++ b/mobile/apps/auth/android/settings.gradle@@ -19,8 +19,8 @@ pluginManagement {plugins {id "dev.flutter.flutter-plugin-loader" version "1.0.0"- id "com.android.application" version "8.10.1" apply false- id "org.jetbrains.kotlin.android" version "2.1.10" apply false+ id "com.android.application" version "8.12.1" apply false+ id "org.jetbrains.kotlin.android" version "2.2.0" apply false}include ":app"diff --git a/mobile/apps/auth/ios/Podfile.lock b/mobile/apps/auth/ios/Podfile.lockindex 72f28acbe3..3529790518 100644--- a/mobile/apps/auth/ios/Podfile.lock+++ b/mobile/apps/auth/ios/Podfile.lock@@ -77,11 +77,11 @@ PODS:- SDWebImage (5.21.5):- SDWebImage/Core (= 5.21.5)- SDWebImage/Core (5.21.5)- - Sentry/HybridSDK (8.46.0)- - sentry_flutter (8.14.2):+ - Sentry/HybridSDK (8.52.1)+ - sentry_flutter (9.6.0):- Flutter- FlutterMacOS- - Sentry/HybridSDK (= 8.46.0)+ - Sentry/HybridSDK (= 8.52.1)- share_plus (0.0.1):- Flutter- shared_preferences_foundation (0.0.1):@@ -249,8 +249,8 @@ SPEC CHECKSUMS:package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499scoped_dir_access: 3906ef4dd37b506647f3adbe7bb172d5d8d5d655SDWebImage: e9c98383c7572d713c1a0d7dd2783b10599b9838- Sentry: da60d980b197a46db0b35ea12cb8f39af48d8854- sentry_flutter: 27892878729f42701297c628eb90e7c6529f3684+ Sentry: 2cbbe3592f30050c60e916c63c7f5a2fa584005e+ sentry_flutter: 9b1e3e6934cb7040ffb71383c95a35f73523180cshare_plus: 50da8cb520a8f0f65671c6c6a99b3617ed10a58ashared_preferences_foundation: 7036424c3d8ec98dfe75ff1667cb0cd531ec82bbsodium_libs: 650f802d77b08c737ca4fed4ed68e822fa560c5adiff --git a/mobile/apps/auth/linux/CMakeLists.txt b/mobile/apps/auth/linux/CMakeLists.txtindex 67ba5aabf1..02428a19c7 100644--- a/mobile/apps/auth/linux/CMakeLists.txt+++ b/mobile/apps/auth/linux/CMakeLists.txt@@ -2,6 +2,9 @@cmake_minimum_required(VERSION 3.10)project(runner LANGUAGES CXX)+# Preserve the pre-Sentry 9 desktop crash-handling behavior.+set(ENV{SENTRY_NATIVE_BACKEND} "none")+# The name of the executable created for the application. Change this to change# the on-disk name of your application.set(BINARY_NAME "enteauth")diff --git a/mobile/apps/auth/macos/Podfile.lock b/mobile/apps/auth/macos/Podfile.lockindex 8b73c09efc..0dede27c3e 100644--- a/mobile/apps/auth/macos/Podfile.lock+++ b/mobile/apps/auth/macos/Podfile.lock@@ -28,11 +28,11 @@ PODS:- FlutterMacOS- screen_retriever_macos (0.0.1):- FlutterMacOS- - Sentry/HybridSDK (8.46.0)- - sentry_flutter (8.14.2):+ - Sentry/HybridSDK (8.52.1)+ - sentry_flutter (9.6.0):- Flutter- FlutterMacOS- - Sentry/HybridSDK (= 8.46.0)+ - Sentry/HybridSDK (= 8.52.1)- share_plus (0.0.1):- FlutterMacOS- shared_preferences_foundation (0.0.1):@@ -168,9 +168,9 @@ SPEC CHECKSUMS:local_auth_darwin: c3ee6cce0a8d56be34c8ccb66ba31f7f180aaebbpackage_info_plus: f0052d280d17aa382b932f399edf32507174e870scoped_dir_access: 6d48cfa2b5c90bf9ec7b8f43cf9fd55b3da431b3- screen_retriever_macos: 452e51764a9e1cdb74b3c541238795849f21557f- Sentry: da60d980b197a46db0b35ea12cb8f39af48d8854- sentry_flutter: 27892878729f42701297c628eb90e7c6529f3684+ screen_retriever_macos: c5508cc3c66ff0d4db650480cf0ab691e220d933+ Sentry: 2cbbe3592f30050c60e916c63c7f5a2fa584005e+ sentry_flutter: 9b1e3e6934cb7040ffb71383c95a35f73523180cshare_plus: 510bf0af1a42cd602274b4629920c9649c52f4ccshared_preferences_foundation: 7036424c3d8ec98dfe75ff1667cb0cd531ec82bbsodium_libs: 650f802d77b08c737ca4fed4ed68e822fa560c5adiff --git a/mobile/apps/auth/pubspec.yaml b/mobile/apps/auth/pubspec.yamlindex a130ed047d..586c7471f0 100644--- a/mobile/apps/auth/pubspec.yaml+++ b/mobile/apps/auth/pubspec.yaml@@ -119,9 +119,9 @@ dependencies:saf_util: 2.0.0scoped_dir_access:path: ../../packages/scoped_dir_access- sentry: 8.14.2- sentry_flutter: 8.14.2- share_plus: 11.1.0+ sentry: 9.6.0+ sentry_flutter: 9.6.0+ share_plus: 12.0.0shared_preferences: 2.5.3sqflite: 2.4.2sqflite_common_ffi: 2.3.7+1diff --git a/mobile/apps/auth/windows/CMakeLists.txt b/mobile/apps/auth/windows/CMakeLists.txtindex 2c4bff4dfd..3900b6fdc4 100644--- a/mobile/apps/auth/windows/CMakeLists.txt+++ b/mobile/apps/auth/windows/CMakeLists.txt@@ -2,6 +2,9 @@cmake_minimum_required(VERSION 3.14)project(auth LANGUAGES CXX)+# Preserve the pre-Sentry 9 desktop crash-handling behavior.+set(ENV{SENTRY_NATIVE_BACKEND} "none")+# The name of the executable created for the application. Change this to change# the on-disk name of your application.set(BINARY_NAME "auth")diff --git a/mobile/apps/locker/android/gradle/wrapper/gradle-wrapper.properties b/mobile/apps/locker/android/gradle/wrapper/gradle-wrapper.propertiesindex efdcc4ace9..02767eb1ca 100644--- a/mobile/apps/locker/android/gradle/wrapper/gradle-wrapper.properties+++ b/mobile/apps/locker/android/gradle/wrapper/gradle-wrapper.properties@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOMEdistributionPath=wrapper/distszipStoreBase=GRADLE_USER_HOMEzipStorePath=wrapper/dists-distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip+distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zipdiff --git a/mobile/apps/locker/android/settings.gradle b/mobile/apps/locker/android/settings.gradleindex ca8531211d..f1c2904d82 100644--- a/mobile/apps/locker/android/settings.gradle+++ b/mobile/apps/locker/android/settings.gradle@@ -18,8 +18,8 @@ pluginManagement {plugins {id "dev.flutter.flutter-plugin-loader" version "1.0.0"- id "com.android.application" version "8.10.1" apply false- id "org.jetbrains.kotlin.android" version "2.1.10" apply false+ id "com.android.application" version "8.12.1" apply false+ id "org.jetbrains.kotlin.android" version "2.2.0" apply false}include ":app"diff --git a/mobile/apps/locker/assets/2.0x/legacy_banner.png b/mobile/apps/locker/assets/2.0x/legacy_banner.pngdeleted file mode 100644index 86906b945c..0000000000Binary files a/mobile/apps/locker/assets/2.0x/legacy_banner.png and /dev/null differdiff --git a/mobile/apps/locker/assets/2.0x/save_to_locker_ducky.png b/mobile/apps/locker/assets/2.0x/save_to_locker_ducky.pngdeleted file mode 100644index 3ec40ca69b..0000000000Binary files a/mobile/apps/locker/assets/2.0x/save_to_locker_ducky.png and /dev/null differdiff --git a/mobile/apps/locker/assets/3.0x/legacy_banner.png b/mobile/apps/locker/assets/3.0x/legacy_banner.pngdeleted file mode 100644index d9b3c57b7f..0000000000Binary files a/mobile/apps/locker/assets/3.0x/legacy_banner.png and /dev/null differdiff --git a/mobile/apps/locker/assets/3.0x/save_to_locker_ducky.png b/mobile/apps/locker/assets/3.0x/save_to_locker_ducky.pngdeleted file mode 100644index 151570f3c0..0000000000Binary files a/mobile/apps/locker/assets/3.0x/save_to_locker_ducky.png and /dev/null differdiff --git a/mobile/apps/locker/assets/legacy_banner.png b/mobile/apps/locker/assets/legacy_banner.pngdeleted file mode 100644index cb850679ea..0000000000Binary files a/mobile/apps/locker/assets/legacy_banner.png and /dev/null differdiff --git a/mobile/apps/locker/assets/save_to_locker.riv b/mobile/apps/locker/assets/save_to_locker.rivnew file mode 100644index 0000000000..1926ac4577Binary files /dev/null and b/mobile/apps/locker/assets/save_to_locker.riv differdiff --git a/mobile/apps/locker/assets/save_to_locker_ducky.png b/mobile/apps/locker/assets/save_to_locker_ducky.pngdeleted file mode 100644index 77f7ba6471..0000000000Binary files a/mobile/apps/locker/assets/save_to_locker_ducky.png and /dev/null differdiff --git a/mobile/apps/locker/assets/share_your_legacy.riv b/mobile/apps/locker/assets/share_your_legacy.rivnew file mode 100644index 0000000000..5c15d4510aBinary files /dev/null and b/mobile/apps/locker/assets/share_your_legacy.riv differdiff --git a/mobile/apps/locker/assets/svg/save_to_locker_stars.svg b/mobile/apps/locker/assets/svg/save_to_locker_stars.svgdeleted file mode 100644index c9e3012835..0000000000--- a/mobile/apps/locker/assets/svg/save_to_locker_stars.svg+++ /dev/null@@ -1,8 +0,0 @@-<svg width="198" height="115" viewBox="138 32 198 115" fill="none" xmlns="http://www.w3.org/2000/svg">-<g transform="translate(138.102, 132.769)">-<path fill-rule="evenodd" clip-rule="evenodd" d="M7.02192 4.81651L7.02277 4.81366C7.02347 4.81153 7.02408 4.80938 7.02461 4.80721C7.02922 4.78805 7.02719 4.76789 7.01886 4.75004C7.01052 4.73218 6.99637 4.71768 6.97872 4.70892C5.25608 3.65717 4.46695 2.18986 4.87068 0.110311C4.87559 0.0925098 4.8747 0.0736106 4.86815 0.0563476C4.8616 0.0390846 4.84973 0.0243527 4.83426 0.0142811L4.83348 0.0138335C4.83135 0.0124701 4.82915 0.011201 4.82691 0.0100287L4.8251 0.00915217C4.8233 0.00825667 4.82148 0.00742321 4.81962 0.00665415L4.81588 0.00525781L4.81183 0.00388159C4.8099 0.00331301 4.80795 0.0028113 4.80599 0.00237799L4.80401 0.00193539C4.80135 0.00138937 4.79865 0.000969308 4.79594 0.000675972C4.77786 -0.00128849 4.75961 0.00246414 4.74377 0.0114058C4.72793 0.0203475 4.71529 0.0340285 4.70763 0.0505262C3.65562 1.88826 2.10031 2.48416 0.10963 2.15624C0.0900908 2.15098 0.0693291 2.1527 0.0509197 2.16109C0.0325103 2.16949 0.0176059 2.18404 0.00876371 2.20224L0.0081855 2.20307L0.00646983 2.20789L0.00500132 2.2118L0.00435027 2.21351C-0.00221733 2.2334 -0.00138656 2.25498 0.00667707 2.27431C0.0147407 2.29363 0.0295023 2.3094 0.0482549 2.31872C1.77056 3.37125 2.55999 4.83768 2.1564 6.91709C2.15144 6.93492 2.15228 6.95386 2.15882 6.97118C2.16536 6.98849 2.17724 7.00327 2.19275 7.01336L2.19385 7.01366C2.19597 7.01503 2.19815 7.01631 2.20038 7.01749L2.20221 7.01835C2.204 7.01925 2.20583 7.02008 2.20767 7.02086L2.21146 7.02224L2.21546 7.02364C2.21739 7.02421 2.21934 7.02471 2.22131 7.02514L2.22332 7.02556C2.22598 7.02611 2.22867 7.02654 2.23137 7.02683C2.24942 7.0288 2.26764 7.02507 2.28347 7.01616C2.29929 7.00725 2.31193 6.99361 2.31962 6.97716C3.37164 5.1393 4.92665 4.54414 6.91773 4.87128C6.93726 4.87653 6.95802 4.8748 6.97642 4.86641C6.99482 4.85801 7.00972 4.84347 7.01856 4.82527L7.01902 4.82439L7.02093 4.81976L7.02192 4.81651Z" fill="#F4D93B"/>-</g>-<g transform="translate(234.822, 33.1562)">-<path fill-rule="evenodd" clip-rule="evenodd" d="M14.4378 9.90279C14.4379 9.90238 14.4381 9.90197 14.4382 9.90155C14.4387 9.90002 14.4391 9.89848 14.4395 9.89693C14.441 9.89255 14.4422 9.88813 14.4433 9.88366C14.4528 9.84427 14.4486 9.80282 14.4315 9.76611C14.4144 9.7294 14.3853 9.69959 14.349 9.68157C10.8071 7.51909 9.18457 4.50218 10.0147 0.226443C10.0247 0.189843 10.0229 0.150985 10.0095 0.115491C9.996 0.0799965 9.97159 0.0497064 9.93977 0.0289984C9.93924 0.0286893 9.93871 0.0283816 9.93817 0.028078C9.93379 0.0252748 9.92928 0.0226655 9.92467 0.020255C9.92344 0.0196398 9.9222 0.0190395 9.92095 0.0184529C9.91725 0.0166116 9.9135 0.014898 9.90968 0.0133167C9.90714 0.0123015 9.90457 0.0113428 9.90198 0.0104457C9.89923 0.00943365 9.89646 0.00849242 9.89367 0.00761609C9.8897 0.00644704 9.88569 0.00541548 9.88165 0.00452456C9.8803 0.0042056 9.87895 0.00390207 9.87759 0.00361454C9.8721 0.00249187 9.86656 0.00162819 9.861 0.00102507C9.82381 -0.00301403 9.7863 0.0047017 9.75373 0.0230866C9.72116 0.0414714 9.69517 0.0696007 9.67941 0.103521C7.5164 3.88207 4.31854 5.10727 0.225538 4.43304C0.185363 4.42223 0.142676 4.42577 0.104824 4.44303C0.066973 4.46029 0.0363276 4.4902 0.0181479 4.52762C0.0177485 4.52819 0.0173514 4.52876 0.0169592 4.52933L0.0170562 4.52954C0.0157556 4.53274 0.0145449 4.53598 0.0134316 4.53925C0.0123644 4.5419 0.0113516 4.54458 0.0104124 4.54728C0.0099544 4.54845 0.00950646 4.54963 0.00907364 4.55081C-0.00442969 4.59169 -0.00272134 4.63607 0.0138576 4.67581C0.0304373 4.71554 0.0607875 4.74797 0.0993451 4.76713C3.64055 6.93122 5.26369 9.94632 4.43388 14.2218C4.42367 14.2584 4.42541 14.2974 4.43885 14.333C4.45229 14.3686 4.47673 14.3989 4.50862 14.4197C4.50937 14.4199 4.51012 14.4201 4.51087 14.4203C4.51524 14.4231 4.51971 14.4258 4.5243 14.4282C4.52555 14.4288 4.5268 14.4294 4.52807 14.43C4.53175 14.4318 4.5355 14.4335 4.53929 14.4351C4.54187 14.4361 4.54446 14.4371 4.54708 14.438C4.54979 14.439 4.55253 14.4399 4.55529 14.4408C4.55927 14.442 4.56328 14.443 4.56732 14.4439C4.5687 14.4442 4.57009 14.4445 4.57147 14.4448C4.57694 14.4459 4.58246 14.4468 4.58801 14.4474C4.62513 14.4514 4.66259 14.4438 4.69513 14.4255C4.72767 14.4071 4.75366 14.3791 4.76946 14.3453C6.9325 10.5665 10.1297 9.34278 14.2236 10.0154C14.2637 10.0262 14.3064 10.0226 14.3442 10.0054C14.3821 9.98811 14.4127 9.95821 14.4309 9.9208C14.4311 9.92034 14.4314 9.91987 14.4316 9.9194L14.4318 9.91899C14.4332 9.91586 14.4345 9.91268 14.4357 9.90947C14.4367 9.90728 14.4377 9.90507 14.4386 9.90283L14.4378 9.90279Z" fill="#F4D93B"/>-</g>-</svg>diff --git a/mobile/apps/locker/ios/Podfile.lock b/mobile/apps/locker/ios/Podfile.lockindex cc269d4459..10c52b2d6d 100644--- a/mobile/apps/locker/ios/Podfile.lock+++ b/mobile/apps/locker/ios/Podfile.lock@@ -69,11 +69,11 @@ PODS:- SDWebImage (5.21.5):- SDWebImage/Core (= 5.21.5)- SDWebImage/Core (5.21.5)- - Sentry/HybridSDK (8.46.0)- - sentry_flutter (8.14.2):+ - Sentry/HybridSDK (8.52.1)+ - sentry_flutter (9.6.0):- Flutter- FlutterMacOS- - Sentry/HybridSDK (= 8.46.0)+ - Sentry/HybridSDK (= 8.52.1)- share_plus (0.0.1):- Flutter- shared_preferences_foundation (0.0.1):@@ -196,8 +196,8 @@ SPEC CHECKSUMS:package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499rive_native: a57df296c558867395bfe82fafe857ec67640f58SDWebImage: e9c98383c7572d713c1a0d7dd2783b10599b9838- Sentry: da60d980b197a46db0b35ea12cb8f39af48d8854- sentry_flutter: 27892878729f42701297c628eb90e7c6529f3684+ Sentry: 2cbbe3592f30050c60e916c63c7f5a2fa584005e+ sentry_flutter: 9b1e3e6934cb7040ffb71383c95a35f73523180cshare_plus: 50da8cb520a8f0f65671c6c6a99b3617ed10a58ashared_preferences_foundation: 7036424c3d8ec98dfe75ff1667cb0cd531ec82bbsodium_libs: 650f802d77b08c737ca4fed4ed68e822fa560c5adiff --git a/mobile/apps/locker/lib/ui/components/legacy_setup_banner.dart b/mobile/apps/locker/lib/ui/components/legacy_setup_banner.dartindex 54810c4e83..88355deb46 100644--- a/mobile/apps/locker/lib/ui/components/legacy_setup_banner.dart+++ b/mobile/apps/locker/lib/ui/components/legacy_setup_banner.dart@@ -8,6 +8,7 @@ import "package:hugeicons/hugeicons.dart";import "package:locker/l10n/l10n.dart";import "package:locker/services/local_settings.dart";import "package:locker/ui/utils/legacy_utils.dart";+import "package:rive/rive.dart" as rive;const _titleStyle = TextStyle(fontFamily: TextStyles.outfitFontFamily,@@ -41,9 +42,11 @@ class LegacySetupBanner extends StatefulWidget {}class _LegacySetupBannerState extends State<LegacySetupBanner> {- static const _illustrationWidth = 155.0;+ static const _illustrationWidth = 202.0;+ static const _illustrationHeight = 173.0;static const _contentRightReserve = 150.0;+ late final rive.FileLoader _illustrationLoader;late final StreamSubscription<LegacyKitCreatedEvent>_legacyKitCreatedSubscription;bool _shouldShow = false;@@ -51,6 +54,10 @@ class _LegacySetupBannerState extends State<LegacySetupBanner> {@overridevoid initState() {super.initState();+ _illustrationLoader = rive.FileLoader.fromAsset(+ "assets/share_your_legacy.riv",+ riveFactory: rive.Factory.flutter,+ );_legacyKitCreatedSubscription = Bus.instance.on<LegacyKitCreatedEvent>().listen((_) => unawaited(_evaluateVisibility()));@@ -60,6 +67,7 @@ class _LegacySetupBannerState extends State<LegacySetupBanner> {@overridevoid dispose() {_legacyKitCreatedSubscription.cancel();+ _illustrationLoader.dispose();super.dispose();}@@ -114,13 +122,24 @@ class _LegacySetupBannerState extends State<LegacySetupBanner> {child: Stack(children: [Positioned(- right: 24,- bottom: -12,+ right: -14,+ bottom: -38,child: IgnorePointer(- child: Image.asset(- "assets/legacy_banner.png",+ child: SizedBox(width: _illustrationWidth,- fit: BoxFit.contain,+ height: _illustrationHeight,+ child: rive.RiveWidgetBuilder(+ fileLoader: _illustrationLoader,+ builder: (context, state) {+ if (state is rive.RiveLoaded) {+ return rive.RiveWidget(+ controller: state.controller,+ fit: rive.Fit.contain,+ );+ }+ return const SizedBox.expand();+ },+ ),),),),diff --git a/mobile/apps/locker/lib/ui/components/save_to_locker_banner.dart b/mobile/apps/locker/lib/ui/components/save_to_locker_banner.dartindex 619772ba4f..1fda1280d4 100644--- a/mobile/apps/locker/lib/ui/components/save_to_locker_banner.dart+++ b/mobile/apps/locker/lib/ui/components/save_to_locker_banner.dart@@ -1,12 +1,15 @@+import "dart:math" as math;+import "package:ente_components/ente_components.dart";import "package:flutter/material.dart";import "package:flutter_svg/flutter_svg.dart";import "package:locker/l10n/l10n.dart";+import "package:rive/rive.dart" as rive;const _bannerHeight = 147.0;-const _illustrationWidth = 198.0;-const _illustrationHeight = 115.0;-const _duckyWidth = 193.0;+const _illustrationWidth = 220.0;+const _illustrationHeight = 128.0;+const _illustrationTilt = -3 * math.pi / 180;const _contentLeftInset = 25.0;const _contentRightReserve = 200.0;const _brandName = "Locker";@@ -20,9 +23,31 @@ const _titleStyle = TextStyle(letterSpacing: -0.72,);-class SaveToLockerBanner extends StatelessWidget {+class SaveToLockerBanner extends StatefulWidget {const SaveToLockerBanner({super.key});+ @override+ State<SaveToLockerBanner> createState() => _SaveToLockerBannerState();+}++class _SaveToLockerBannerState extends State<SaveToLockerBanner> {+ late final rive.FileLoader _illustrationLoader;++ @override+ void initState() {+ super.initState();+ _illustrationLoader = rive.FileLoader.fromAsset(+ "assets/save_to_locker.riv",+ riveFactory: rive.Factory.flutter,+ );+ }++ @override+ void dispose() {+ _illustrationLoader.dispose();+ super.dispose();+ }+@overrideWidget build(BuildContext context) {final colors = context.componentColors;@@ -45,28 +70,26 @@ class SaveToLockerBanner extends StatelessWidget {),),Positioned(- right: 0,- bottom: 0,- child: SizedBox(- width: _illustrationWidth,- height: _illustrationHeight,- child: Stack(- children: [- Positioned(- right: 0,- bottom: 0,- child: Image.asset(- "assets/save_to_locker_ducky.png",- width: _duckyWidth,- height: _illustrationHeight,- ),- ),- Positioned.fill(- child: SvgPicture.asset(- "assets/svg/save_to_locker_stars.svg",- ),- ),- ],+ right: -18,+ bottom: -12,+ child: Transform.rotate(+ angle: _illustrationTilt,+ alignment: Alignment.bottomRight,+ child: SizedBox(+ width: _illustrationWidth,+ height: _illustrationHeight,+ child: rive.RiveWidgetBuilder(+ fileLoader: _illustrationLoader,+ builder: (context, state) {+ if (state is rive.RiveLoaded) {+ return rive.RiveWidget(+ controller: state.controller,+ fit: rive.Fit.contain,+ );+ }+ return const SizedBox.expand();+ },+ ),),),),diff --git a/mobile/apps/locker/lib/ui/pages/base_info_page.dart b/mobile/apps/locker/lib/ui/pages/base_info_page.dartindex 0424ce2294..ded4e11017 100644--- a/mobile/apps/locker/lib/ui/pages/base_info_page.dart+++ b/mobile/apps/locker/lib/ui/pages/base_info_page.dart@@ -609,6 +609,7 @@ abstract class BaseInfoPageState<T extends InfoData, W extends BaseInfoPage<T>>child: ButtonComponent(label: submitButtonText,onTap: isSaveEnabled ? _saveRecord : null,+ shouldShowSuccessState: false,),),),diff --git a/mobile/apps/locker/pubspec.yaml b/mobile/apps/locker/pubspec.yamlindex 5c03f55743..5413b1ce11 100644--- a/mobile/apps/locker/pubspec.yaml+++ b/mobile/apps/locker/pubspec.yaml@@ -80,7 +80,7 @@ dependencies:path: 1.9.1path_provider: 2.1.5rive: 0.14.0-dev.13- share_plus: 11.1.0+ share_plus: 12.0.0shared_preferences: 2.5.3sqflite: 2.4.2tray_manager: 0.5.2diff --git a/mobile/apps/photos/android/app/build.gradle b/mobile/apps/photos/android/app/build.gradleindex c126886654..79779a54bd 100644--- a/mobile/apps/photos/android/app/build.gradle+++ b/mobile/apps/photos/android/app/build.gradle@@ -2,7 +2,7 @@ plugins {id "com.android.application"id "kotlin-android"id "dev.flutter.flutter-gradle-plugin"- id 'org.jetbrains.kotlin.plugin.serialization' version '2.1.10'+ id 'org.jetbrains.kotlin.plugin.serialization' version '2.2.0'}def localProperties = new Properties()@@ -194,7 +194,6 @@ flutter {}dependencies {- implementation 'io.sentry:sentry-android:2.0.0'implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.8.0'implementation 'com.android.support:multidex:1.0.3'implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'diff --git a/mobile/apps/photos/android/gradle/wrapper/gradle-wrapper.properties b/mobile/apps/photos/android/gradle/wrapper/gradle-wrapper.propertiesindex efdcc4ace9..02767eb1ca 100644--- a/mobile/apps/photos/android/gradle/wrapper/gradle-wrapper.properties+++ b/mobile/apps/photos/android/gradle/wrapper/gradle-wrapper.properties@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOMEdistributionPath=wrapper/distszipStoreBase=GRADLE_USER_HOMEzipStorePath=wrapper/dists-distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip+distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zipdiff --git a/mobile/apps/photos/android/settings.gradle b/mobile/apps/photos/android/settings.gradleindex ca8531211d..f1c2904d82 100644--- a/mobile/apps/photos/android/settings.gradle+++ b/mobile/apps/photos/android/settings.gradle@@ -18,8 +18,8 @@ pluginManagement {plugins {id "dev.flutter.flutter-plugin-loader" version "1.0.0"- id "com.android.application" version "8.10.1" apply false- id "org.jetbrains.kotlin.android" version "2.1.10" apply false+ id "com.android.application" version "8.12.1" apply false+ id "org.jetbrains.kotlin.android" version "2.2.0" apply false}include ":app"diff --git a/mobile/apps/photos/ios/Podfile.lock b/mobile/apps/photos/ios/Podfile.lockindex 8619761181..f12e292463 100644--- a/mobile/apps/photos/ios/Podfile.lock+++ b/mobile/apps/photos/ios/Podfile.lock@@ -195,11 +195,11 @@ PODS:- SDWebImageWebPCoder (0.15.0):- libwebp (~> 1.0)- SDWebImage/Core (~> 5.17)- - Sentry/HybridSDK (8.46.0)- - sentry_flutter (8.14.2):+ - Sentry/HybridSDK (8.52.1)+ - sentry_flutter (9.6.0):- Flutter- FlutterMacOS- - Sentry/HybridSDK (= 8.46.0)+ - Sentry/HybridSDK (= 8.52.1)- share_plus (0.0.1):- Flutter- shared_preferences_foundation (0.0.1):@@ -532,8 +532,8 @@ SPEC CHECKSUMS:rive_native: a57df296c558867395bfe82fafe857ec67640f58SDWebImage: e9c98383c7572d713c1a0d7dd2783b10599b9838SDWebImageWebPCoder: 0e06e365080397465cc73a7a9b472d8a3bd0f377- Sentry: da60d980b197a46db0b35ea12cb8f39af48d8854- sentry_flutter: 27892878729f42701297c628eb90e7c6529f3684+ Sentry: 2cbbe3592f30050c60e916c63c7f5a2fa584005e+ sentry_flutter: 9b1e3e6934cb7040ffb71383c95a35f73523180cshare_plus: 50da8cb520a8f0f65671c6c6a99b3617ed10a58ashared_preferences_foundation: 7036424c3d8ec98dfe75ff1667cb0cd531ec82bbsqflite_darwin: 20b2a3a3b70e43edae938624ce550a3cbf66a3d0diff --git a/mobile/apps/photos/lib/core/error-reporting/tunneled_transport.dart b/mobile/apps/photos/lib/core/error-reporting/tunneled_transport.dartindex a2049487a1..32732a69d0 100644--- a/mobile/apps/photos/lib/core/error-reporting/tunneled_transport.dart+++ b/mobile/apps/photos/lib/core/error-reporting/tunneled_transport.dart@@ -21,7 +21,7 @@ class TunneledTransport implements Transport {TunneledTransport._(this._tunnel, this._options): _dsn = _options.dsn != null ? Dsn.parse(_options.dsn!) : null,_headers = _buildHeaders(- _options.platformChecker.isWeb,+ _options.platform.isWeb,_options.sentryClientName,) {_credentialBuilder = _CredentialBuilder(@@ -43,7 +43,7 @@ class TunneledTransport implements Transport {// body guard to not log the error as it has performance impact to allocate// the body String.if (_options.debug) {- _options.logger(+ _options.log(SentryLevel.error,'API returned an error, statusCode = ${response.statusCode}, ''body = ${response.body}',@@ -51,7 +51,7 @@ class TunneledTransport implements Transport {}return const SentryId.empty();} else {- _options.logger(+ _options.log(SentryLevel.debug,'Envelope ${envelope.header.eventId ?? "--"} was sent successfully.',);diff --git a/mobile/apps/photos/pubspec.yaml b/mobile/apps/photos/pubspec.yamlindex 85923f5bdf..adbd23037f 100644--- a/mobile/apps/photos/pubspec.yaml+++ b/mobile/apps/photos/pubspec.yaml@@ -215,9 +215,9 @@ dependencies:ref: 2cea396843cd3ab1b5ec4334be4233864637874erive: 0.14.0-dev.13scrollable_positioned_list: 0.3.8- sentry: 8.14.2- sentry_flutter: 8.14.2- share_plus: 11.1.0+ sentry: 9.6.0+ sentry_flutter: 9.6.0+ share_plus: 12.0.0shared_preferences: 2.5.3sqflite: 2.4.2sqflite_migration: 0.3.0diff --git a/mobile/packages/accounts/pubspec.yaml b/mobile/packages/accounts/pubspec.yamlindex bf5820bf37..2e8ab347d3 100644--- a/mobile/packages/accounts/pubspec.yaml+++ b/mobile/packages/accounts/pubspec.yaml@@ -42,7 +42,7 @@ dependencies:password_strength: 0.2.0pinput: 5.0.2pointycastle: 3.9.1- share_plus: 11.1.0+ share_plus: 12.0.0shared_preferences: 2.5.3styled_text: 8.1.0url_launcher: 6.3.2diff --git a/mobile/packages/legacy/assets/fonts/Nunito-Black.ttf b/mobile/packages/legacy/assets/fonts/Nunito-Black.ttfdeleted file mode 100644index 99491f840f..0000000000Binary files a/mobile/packages/legacy/assets/fonts/Nunito-Black.ttf and /dev/null differdiff --git a/mobile/packages/legacy/assets/fonts/Nunito-ExtraBold.ttf b/mobile/packages/legacy/assets/fonts/Nunito-ExtraBold.ttfdeleted file mode 100644index ffeaa53bfa..0000000000Binary files a/mobile/packages/legacy/assets/fonts/Nunito-ExtraBold.ttf and /dev/null differdiff --git a/mobile/packages/legacy/assets/legacy_kit_sheet_key_round.svg b/mobile/packages/legacy/assets/legacy_kit_sheet_key_round.svgnew file mode 100644index 0000000000..07a5c2de47--- /dev/null+++ b/mobile/packages/legacy/assets/legacy_kit_sheet_key_round.svg@@ -0,0 +1,6 @@+<svg preserveAspectRatio="none" overflow="visible" style="display: block;" width="21.5254" height="21.5254" viewBox="0 0 21.5254 21.5254" fill="none" xmlns="http://www.w3.org/2000/svg">+<g id="key-round">+<path id="Vector" d="M13.4534 13.9018C16.6731 13.9018 19.2832 11.2918 19.2832 8.07202C19.2832 4.85232 16.6731 2.24223 13.4534 2.24223C10.2336 2.24223 7.62358 4.85232 7.62358 8.07202C7.62358 8.44668 7.65891 8.81308 7.72645 9.16811C7.85441 9.84069 7.91839 10.177 7.8528 10.3899C7.78721 10.6028 7.59848 10.7914 7.22103 11.1686L3.29386 15.0932C2.77498 15.6116 2.51555 15.8709 2.37889 16.2006C2.24223 16.5304 2.24223 16.8973 2.24223 17.6307V19.2832H5.38135V17.4894H7.17513V15.6956H8.96891L10.3614 14.3041C10.7384 13.9275 10.9268 13.7391 11.1395 13.6736C11.3521 13.6082 11.6879 13.6719 12.3597 13.7994C12.714 13.8667 13.0795 13.9018 13.4534 13.9018Z" fill="white" stroke="black" style="fill:white;fill-opacity:1;stroke:black;stroke-opacity:1;" stroke-width="1.34534" stroke-linecap="round" stroke-linejoin="round"/>+<path id="Vector_2" d="M16.144 6.72668C16.144 7.4697 15.5417 8.07202 14.7987 8.07202C14.0557 8.07202 13.4534 7.4697 13.4534 6.72668C13.4534 5.98367 14.0557 5.38135 14.7987 5.38135C15.5417 5.38135 16.144 5.98367 16.144 6.72668Z" fill="black" stroke="black" style="fill:black;fill-opacity:1;stroke:black;stroke-opacity:1;" stroke-width="1.34534"/>+</g>+</svg>diff --git a/mobile/packages/legacy/lib/components/legacy_kit_card_preview.dart b/mobile/packages/legacy/lib/components/legacy_kit_card_preview.dartindex 9f26ae4c54..aa41a6995c 100644--- a/mobile/packages/legacy/lib/components/legacy_kit_card_preview.dart+++ b/mobile/packages/legacy/lib/components/legacy_kit_card_preview.dart@@ -58,9 +58,9 @@ class LegacyKitCardPreview extends StatelessWidget {const Text("Legacy Kit",style: TextStyle(- fontFamily: "Nunito",- package: "ente_legacy",- fontWeight: FontWeight.w800,+ fontFamily: TextStyles.outfitFontFamily,+ package: TextStyles.fontPackage,+ fontWeight: FontWeight.w700,fontSize: 11,color: Color(0xFF1C1C1C),),diff --git a/mobile/packages/legacy/lib/pages/create_legacy_kit_sheet.dart b/mobile/packages/legacy/lib/pages/create_legacy_kit_sheet.dartindex 102df46fb3..179f76300a 100644--- a/mobile/packages/legacy/lib/pages/create_legacy_kit_sheet.dart+++ b/mobile/packages/legacy/lib/pages/create_legacy_kit_sheet.dart@@ -1,4 +1,5 @@import "dart:async";+import "dart:convert";import "package:ente_components/ente_components.dart";import "package:ente_legacy/components/legacy_kit_recovery_wait_time_sheet.dart";@@ -9,8 +10,11 @@ import "package:ente_strings/ente_strings.dart";import "package:ente_ui/components/buttons/dynamic_fab.dart";import "package:ente_ui/utils/toast_util.dart";import "package:flutter/material.dart";+import "package:flutter/services.dart";import "package:hugeicons/hugeicons.dart";+const _legacyKitPartNameMaxBytes = 50;+Future<void> showCreateLegacyKitPage(BuildContext context, {required String accountEmail,@@ -101,6 +105,11 @@ class _CreateLegacyKitPageState extends State<CreateLegacyKitPage> {controller: _controllers[index],focusNode: _focusNodes[index],hintText: context.strings.addTrustedPerson,+ inputFormatters: [+ _Utf8LengthLimitingTextInputFormatter(+ _legacyKitPartNameMaxBytes,+ ),+ ],textCapitalization: TextCapitalization.words,textInputAction: index < _controllers.length - 1? TextInputAction.next@@ -224,3 +233,17 @@ class _CreateLegacyKitPageState extends State<CreateLegacyKitPage> {}}}++class _Utf8LengthLimitingTextInputFormatter extends TextInputFormatter {+ final int maxBytes;++ _Utf8LengthLimitingTextInputFormatter(this.maxBytes) : assert(maxBytes > 0);++ @override+ TextEditingValue formatEditUpdate(+ TextEditingValue oldValue,+ TextEditingValue newValue,+ ) {+ return utf8.encode(newValue.text).length <= maxBytes ? newValue : oldValue;+ }+}diff --git a/mobile/packages/legacy/lib/pages/emergency_page.dart b/mobile/packages/legacy/lib/pages/emergency_page.dartindex d0ad661c93..5929e73c77 100644--- a/mobile/packages/legacy/lib/pages/emergency_page.dart+++ b/mobile/packages/legacy/lib/pages/emergency_page.dart@@ -123,7 +123,7 @@ class _EmergencyPageState extends State<EmergencyPage> {slivers: [if (info != null && hasActiveLegacyKitRecovery)SliverPadding(- padding: const EdgeInsets.only(top: 20, left: 16, right: 16),+ padding: const EdgeInsets.only(left: 16, right: 16),sliver: SliverToBoxAdapter(child: _WarningBanner(text: context.strings.legacyKitRecoveryWarning,@@ -147,7 +147,7 @@ class _EmergencyPageState extends State<EmergencyPage> {),if (info != null && info!.recoverSessions.isNotEmpty)SliverPadding(- padding: const EdgeInsets.only(top: 20, left: 16, right: 16),+ padding: const EdgeInsets.only(left: 16, right: 16),sliver: SliverList(delegate: SliverChildBuilderDelegate((context, index) {if (index == 0) {@@ -426,7 +426,7 @@ class _EmergencyPageState extends State<EmergencyPage> {Widget _buildLegacyKitsSliver(EnteColorScheme colorScheme) {return SliverToBoxAdapter(child: Padding(- padding: const EdgeInsets.only(left: 16, right: 16, bottom: 8),+ padding: const EdgeInsets.only(top: 20, left: 16, right: 16, bottom: 8),child: Column(crossAxisAlignment: CrossAxisAlignment.start,children: [diff --git a/mobile/packages/legacy/lib/pages/share_legacy_kit_page.dart b/mobile/packages/legacy/lib/pages/share_legacy_kit_page.dartindex c9a552badd..f18c26a16c 100644--- a/mobile/packages/legacy/lib/pages/share_legacy_kit_page.dart+++ b/mobile/packages/legacy/lib/pages/share_legacy_kit_page.dart@@ -350,7 +350,8 @@ class _ShareLegacyKitPageState extends State<ShareLegacyKitPage> {showShortToast(context, context.strings.somethingWentWrong);return;}- final dialog = createProgressDialog(context, context.strings.pleaseWait);+ final strings = context.strings;+ final dialog = createProgressDialog(context, strings.pleaseWait);await dialog.show();final Uint8List bytes;try {@@ -359,6 +360,7 @@ class _ShareLegacyKitPageState extends State<ShareLegacyKitPage> {recoveryUrl: _kit.legacyUrl,share: share,allShares: shares,+ strings: strings,);await dialog.hide();} catch (_) {diff --git a/mobile/packages/legacy/lib/services/legacy_kit_pdf_service.dart b/mobile/packages/legacy/lib/services/legacy_kit_pdf_service.dartindex 344f92cc4a..163f149cbe 100644--- a/mobile/packages/legacy/lib/services/legacy_kit_pdf_service.dart+++ b/mobile/packages/legacy/lib/services/legacy_kit_pdf_service.dart@@ -1,7 +1,5 @@-import "dart:convert";-import "package:ente_legacy/models/legacy_kit_models.dart";-import "package:flutter/foundation.dart";+import "package:ente_strings/ente_strings.dart";import "package:flutter/services.dart";import "package:pdf/pdf.dart";import "package:pdf/widgets.dart" as pw;@@ -9,19 +7,23 @@ import "package:pdf/widgets.dart" as pw;class LegacyKitPdfService {const LegacyKitPdfService();- static const String _shareMetadataPrefix = "ente-legacy-kit-share-v1:";static const String _assetRoot = "packages/ente_legacy/assets";- static const String _logoAsset = "$_assetRoot/legacy_kit_sheet_logo.svg";+ static const String _fontRoot = "packages/ente_components/fonts";static const String _enteLogoBlackAsset ="$_assetRoot/legacy_kit_sheet_ente_logo_black.svg";static const String _enteComBadgeAsset ="$_assetRoot/legacy_kit_sheet_ente_com_badge.svg";- static const String _nunitoExtraBoldAsset =- "$_assetRoot/fonts/Nunito-ExtraBold.ttf";- static const String _nunitoBlackAsset = "$_assetRoot/fonts/Nunito-Black.ttf";- static const String _interRegularAsset = "assets/fonts/Inter-Regular.ttf";- static const String _interMediumAsset = "assets/fonts/Inter-Medium.ttf";- static const String _interBoldAsset = "assets/fonts/Inter-Bold.ttf";+ static const String _keyRoundAsset =+ "$_assetRoot/legacy_kit_sheet_key_round.svg";+ static const String _interRegularAsset = "$_fontRoot/Inter-Regular.ttf";+ static const String _interMediumAsset = "$_fontRoot/Inter-Medium.ttf";+ static const String _interBoldAsset = "$_fontRoot/Inter-Bold.ttf";+ static const String _outfitMediumAsset = "$_fontRoot/Outfit-Medium.ttf";+ static const String _outfitSemiBoldAsset = "$_fontRoot/Outfit-SemiBold.ttf";++ static const String _supportEmail = "[email protected]";+ static const int _sheetsNeededToRecover = 2;+ static const String _emphasisSlot = "\uFFFC";static const PdfPageFormat _sheetPageFormat = PdfPageFormat(676, 900);static const PdfColor _green = PdfColor.fromInt(0xFF08C225);@@ -31,26 +33,26 @@ class LegacyKitPdfService {static const PdfColor _card = PdfColor.fromInt(0xFFEAEAEA);static const PdfColor _divider = PdfColor.fromInt(0xFFD9D9D9);static const PdfColor _stepNumber = PdfColor.fromInt(0xFF5B5B5B);- static const PdfColor _bodyText = PdfColor(0, 0, 0, 0.86);- static const PdfColor _chipBackground = PdfColor.fromInt(0xFF484848);- static const PdfColor _chipLabel = PdfColor.fromInt(0xFFF4F4F4);- static const PdfColor _copyCodeBackground = PdfColor.fromInt(0xFF666666);- static const List<PdfColor> _holderChipColors = [- PdfColor.fromInt(0xFFFF6060),- PdfColor.fromInt(0xFF1EA8FE),- ];Future<Uint8List> buildRecoverySheet({required String accountEmail,required String recoveryUrl,required LegacyKitShare share,required List<LegacyKitShare> allShares,+ required StringsLocalizations strings,}) async {final assets = await _loadAssets();final sortedShares = _sortedShares(allShares);- final pdf = _document(keywords: _shareMetadata(share));+ final pdf = _document();pdf.addPage(- _buildPage(accountEmail, recoveryUrl, share, sortedShares, assets),+ _buildPage(+ accountEmail,+ recoveryUrl,+ share,+ sortedShares,+ assets,+ strings,+ ),);return pdf.save();}@@ -67,15 +69,17 @@ class LegacyKitPdfService {final interRegular = await _loadFont(_interRegularAsset);final interMedium = await _loadFont(_interMediumAsset);final interBold = await _loadFont(_interBoldAsset);- final nunitoExtraBold = await _loadFont(_nunitoExtraBoldAsset);- final nunitoBlack = await _loadFont(_nunitoBlackAsset);+ final outfitMedium = await _loadFont(_outfitMediumAsset);+ final outfitSemiBold = await _loadFont(_outfitSemiBoldAsset);final baseFont = interMedium ?? interRegular;return _SheetAssets(- logoSvg: await _loadSvg(_logoAsset),enteLogoBlackSvg: await _loadSvg(_enteLogoBlackAsset),enteComBadgeSvg: await _loadSvg(_enteComBadgeAsset),- nunitoExtraBold: nunitoExtraBold ?? nunitoBlack,+ keyRoundSvg: await _loadSvg(_keyRoundAsset),+ interBold: interBold,+ outfitMedium: outfitMedium,+ outfitSemiBold: outfitSemiBold,theme: baseFont == null && interBold == null? null: pw.ThemeData.withFont(base: baseFont, bold: interBold ?? baseFont),@@ -98,31 +102,23 @@ class LegacyKitPdfService {}}- pw.Document _document({required String keywords}) {+ pw.Document _document() {return pw.Document(title: "Ente Legacy Kit",author: "ente",creator: "ente locker",subject: "Ente Legacy Kit recovery sheet",- keywords: keywords,producer: "ente locker",);}- String _shareMetadata(LegacyKitShare share) {- return "$_shareMetadataPrefix${_encodeMetadataPayload(share.toQrPayload())}";- }-- String _encodeMetadataPayload(String payload) {- return base64Url.encode(utf8.encode(payload)).replaceAll("=", "");- }-pw.Page _buildPage(String accountEmail,String recoveryUrl,LegacyKitShare share,List<LegacyKitShare> sortedShares,_SheetAssets assets,+ StringsLocalizations strings,) {return pw.Page(pageFormat: _sheetPageFormat,@@ -137,7 +133,9 @@ class LegacyKitPdfService {recoveryUrl: recoveryUrl,share: share,otherShares: otherShares,+ totalSheets: sortedShares.length,assets: assets,+ strings: strings,);},);@@ -148,10 +146,11 @@ class LegacyKitPdfService {required String recoveryUrl,required LegacyKitShare share,required List<LegacyKitShare> otherShares,+ required int totalSheets,required _SheetAssets assets,+ required StringsLocalizations strings,}) {final qrPayload = share.toQrPayload();- final copyCode = share.toCopyCode();return pw.SizedBox(width: _sheetPageFormat.width,height: _sheetPageFormat.height,@@ -162,122 +161,108 @@ class LegacyKitPdfService {children: [pw.Positioned(left: 11,- top: 135,+ top: 95,child: pw.Container(width: 654,- height: 752,+ height: 742,decoration: const pw.BoxDecoration(color: _card,borderRadius: pw.BorderRadius.all(pw.Radius.circular(24)),),),),- pw.Positioned(left: 269, top: 52, child: _header(assets)),pw.Positioned(- left: 84,- top: 178,+ left: 57,+ top: 29,child: _accountEmailPill(accountEmail, assets),),+ pw.Positioned(left: 593.5, top: 29, child: _enteLockup(assets)),pw.Positioned(- left: 84,- top: 223,+ left: 538,+ top: 56,+ child: pw.Text(+ "Protect your digital life",+ style: pw.TextStyle(+ color: _black,+ fontSize: 10.8,+ font: assets.outfitSemiBold,+ fontWeight: pw.FontWeight.bold,+ ),+ ),+ ),+ pw.Positioned(+ left: 80,+ top: 136,+ child: _greeting(+ strings.legacyKitSheetGreeting(share.partName),+ assets,+ ),+ ),+ pw.Positioned(+ left: 81,+ top: 195,child: pw.SizedBox(width: 506,- // Holder names are unbounded, so the greeting can wrap. The- // description follows it in flow instead of at a fixed offset.- child: pw.Column(- crossAxisAlignment: pw.CrossAxisAlignment.start,- children: [- pw.SizedBox(- width: 451,- child: pw.Text(- "Hi ${share.partName}, store this somewhere safe",- maxLines: 2,- style: pw.TextStyle(- color: _black,- fontSize: 21,- font: assets.nunitoExtraBold,- fontWeight: pw.FontWeight.bold,- lineSpacing: 5,- ),- ),- ),- pw.SizedBox(height: 22),- pw.Text(- "You can use this with any other part to get access to my "- "Ente account that contains important information.",- style: const pw.TextStyle(- color: _bodyText,- fontSize: 14.4,- lineSpacing: 6.5,- ),- ),- pw.SizedBox(height: 24),- pw.Container(- width: 504,- height: 2,- // A pill radius is clamped by Flutter but not by the PDF- // renderer, which would balloon this 2pt rule into a blob.- decoration: const pw.BoxDecoration(- color: _divider,- borderRadius: pw.BorderRadius.all(- pw.Radius.circular(1),- ),- ),- ),- ],+ child: pw.Text(+ strings.legacyKitSheetIntro,+ style: const pw.TextStyle(+ color: _black,+ fontSize: 14.4,+ lineSpacing: -1.4,+ ),),),),pw.Positioned(- left: 90,- top: 386,+ left: 67,+ top: 253,+ child: pw.Container(+ width: 541,+ height: 2,+ // A pill radius is clamped by Flutter but not by the PDF+ // renderer, which would balloon this 2pt rule into a blob.+ decoration: const pw.BoxDecoration(+ color: _divider,+ borderRadius: pw.BorderRadius.all(pw.Radius.circular(1)),+ ),+ ),+ ),+ pw.Positioned(+ left: 81,+ top: 275,child: pw.Text(- "How to recover the account?",+ strings.legacyKitSheetHowToRecover,style: pw.TextStyle(color: _black,fontSize: 27,- font: assets.nunitoExtraBold,+ font: assets.outfitSemiBold,fontWeight: pw.FontWeight.bold,),),),pw.Positioned(- left: 87,- top: 451,- child: _step(- "1",- pw.Text(- "Get another part from",- style: const pw.TextStyle(color: _black, fontSize: 14),- ),- trailing: _holderChips(otherShares),+ left: 88,+ top: 344,+ child: _steps(+ share,+ otherShares,+ totalSheets,+ recoveryUrl,+ strings,),),+ pw.Positioned(left: 92.6, top: 533, child: _qrCard(qrPayload)),pw.Positioned(- left: 87,- top: 512,- child: _step("2", _visitLabel(recoveryUrl)),+ left: 360,+ top: 533,+ child: _recoveryKeyCard(share.toCopyCode(), assets),),- pw.Positioned(left: 217, top: 573, child: _qrCard(qrPayload)),- if (kDebugMode)- pw.Positioned(- left: 217,- top: 831,- child: _copyCodeBlock(copyCode),- ),- pw.Positioned(left: 573, top: 812, child: _enteLockup(assets)),pw.Positioned(- left: 504,- top: 845,- child: pw.Text(- "Protect your digital life",- style: pw.TextStyle(- color: _black,- fontSize: 12.6,- font: assets.nunitoExtraBold,- fontWeight: pw.FontWeight.bold,- ),+ left: 0,+ top: 860,+ child: pw.SizedBox(+ width: _sheetPageFormat.width,+ child: _supportLabel(strings),),),],@@ -288,23 +273,49 @@ class LegacyKitPdfService {pw.Widget _accountEmailPill(String accountEmail, _SheetAssets assets) {return pw.Container(- width: 200,- height: 29,+ height: 45,alignment: pw.Alignment.center,- padding: const pw.EdgeInsets.symmetric(horizontal: 12),+ padding: const pw.EdgeInsets.symmetric(horizontal: 25),decoration: const pw.BoxDecoration(- color: _white,- borderRadius: pw.BorderRadius.all(pw.Radius.circular(11)),+ color: _card,+ borderRadius: pw.BorderRadius.all(pw.Radius.circular(15)),),+ child: pw.ConstrainedBox(+ constraints: const pw.BoxConstraints(maxWidth: 430),+ child: pw.FittedBox(+ fit: pw.BoxFit.scaleDown,+ child: pw.Text(+ accountEmail,+ maxLines: 1,+ style: pw.TextStyle(+ color: _black,+ fontSize: 20,+ font: assets.outfitSemiBold,+ fontWeight: pw.FontWeight.bold,+ ),+ ),+ ),+ ),+ );+ }++ pw.Widget _greeting(String greeting, _SheetAssets assets) {+ return pw.SizedBox(+ width: 565,+ height: 46,child: pw.FittedBox(fit: pw.BoxFit.scaleDown,+ alignment: pw.Alignment.centerLeft,child: pw.Text(- accountEmail,+ greeting,maxLines: 1,style: pw.TextStyle(color: _black,- fontSize: 16.4,- font: assets.nunitoExtraBold,+ fontSize: 32.2,+ font: assets.outfitSemiBold,+ fontFallback: assets.interBold == null+ ? const []+ : [assets.interBold!],fontWeight: pw.FontWeight.bold,),),@@ -314,21 +325,119 @@ class LegacyKitPdfService {pw.Widget _qrCard(String qrPayload) {return pw.Container(- width: 242,- height: 242,+ width: 242.5,+ height: 242.5,padding: const pw.EdgeInsets.all(28),decoration: const pw.BoxDecoration(color: _white,borderRadius: pw.BorderRadius.all(pw.Radius.circular(24)),),- child: pw.BarcodeWidget(barcode: pw.Barcode.qrCode(), data: qrPayload),+ child: pw.BarcodeWidget(+ barcode: pw.Barcode.qrCode(),+ data: qrPayload,+ drawText: false,+ ),);}- pw.Widget _step(String number, pw.Widget label, {pw.Widget? trailing}) {+ pw.Widget _recoveryKeyCard(String copyCode, _SheetAssets assets) {+ final keyRoundSvg = assets.keyRoundSvg;+ return pw.Container(+ width: 247,+ height: 242.5,+ decoration: const pw.BoxDecoration(+ color: _white,+ borderRadius: pw.BorderRadius.all(pw.Radius.circular(24)),+ ),+ child: pw.Stack(+ children: [+ pw.Positioned(+ top: 20,+ left: 107.7,+ child: pw.Container(+ width: 31.6,+ height: 31.6,+ padding: const pw.EdgeInsets.all(5),+ decoration: const pw.BoxDecoration(+ color: _black,+ shape: pw.BoxShape.circle,+ ),+ child: keyRoundSvg == null+ ? pw.SizedBox()+ : pw.SvgImage(svg: keyRoundSvg),+ ),+ ),+ pw.Positioned(+ left: 20,+ top: 68,+ child: pw.SizedBox(+ width: 207,+ height: 155,+ child: pw.FittedBox(+ fit: pw.BoxFit.scaleDown,+ child: pw.SizedBox(+ width: 207,+ child: pw.Column(+ mainAxisSize: pw.MainAxisSize.min,+ children: _displayCopyCodeLines(copyCode)+ .map(+ (line) => pw.SizedBox(+ height: 22,+ child: pw.Center(+ child: pw.Text(+ line,+ textAlign: pw.TextAlign.center,+ softWrap: false,+ maxLines: 1,+ style: pw.TextStyle(+ color: _black,+ fontSize: 12,+ font: assets.outfitMedium,+ ),+ ),+ ),+ ),+ )+ .toList(growable: false),+ ),+ ),+ ),+ ),+ ),+ ],+ ),+ );+ }++ pw.Widget _steps(+ LegacyKitShare share,+ List<LegacyKitShare> otherShares,+ int totalSheets,+ String recoveryUrl,+ StringsLocalizations strings,+ ) {+ return pw.Column(+ crossAxisAlignment: pw.CrossAxisAlignment.start,+ children: [+ _step("1", _otherSheetsLabel(share, otherShares, totalSheets, strings)),+ pw.SizedBox(height: 29),+ _step("2", _visitLabel(recoveryUrl, strings)),+ pw.SizedBox(height: 36),+ _step(+ "3",+ pw.Text(+ strings.legacyKitSheetStepScan(_sheetsNeededToRecover),+ style: const pw.TextStyle(color: _black, fontSize: 14),+ ),+ ),+ ],+ );+ }++ pw.Widget _step(String number, pw.Widget label) {return pw.Row(mainAxisSize: pw.MainAxisSize.min,- crossAxisAlignment: pw.CrossAxisAlignment.center,+ crossAxisAlignment: pw.CrossAxisAlignment.start,children: [pw.Container(width: 24,@@ -345,45 +454,103 @@ class LegacyKitPdfService {),),pw.SizedBox(width: 16),- label,- if (trailing != null) ...[pw.SizedBox(width: 24), trailing],+ pw.SizedBox(width: 446, child: label),],);}- pw.Widget _visitLabel(String recoveryUrl) {+ pw.Widget _otherSheetsLabel(+ LegacyKitShare share,+ List<LegacyKitShare> otherShares,+ int totalSheets,+ StringsLocalizations strings,+ ) {return pw.RichText(text: pw.TextSpan(- style: const pw.TextStyle(color: _black, fontSize: 14),- children: [- const pw.TextSpan(text: "Visit "),+ style: const pw.TextStyle(color: _black, fontSize: 14, lineSpacing: 5),+ children: _spansAroundSlot(+ strings.legacyKitSheetStepGetAnother(+ share.shareIndex,+ totalSheets,+ _emphasisSlot,+ ),+ _holderNameSpans(otherShares, strings),+ ),+ ),+ );+ }++ List<pw.TextSpan> _spansAroundSlot(+ String sentence,+ List<pw.TextSpan> emphasis,+ ) {+ final parts = sentence.split(_emphasisSlot);+ return [+ pw.TextSpan(text: parts.first),+ ...emphasis,+ if (parts.length > 1)+ pw.TextSpan(text: parts.sublist(1).join(_emphasisSlot)),+ ];+ }++ List<pw.TextSpan> _holderNameSpans(+ List<LegacyKitShare> otherShares,+ StringsLocalizations strings,+ ) {+ final spans = <pw.TextSpan>[];+ for (var index = 0; index < otherShares.length; index++) {+ if (index > 0) {+ spans.add(pw.TextSpan(- text: displayRecoveryUrl(recoveryUrl),- style: const pw.TextStyle(- color: _black,- decoration: pw.TextDecoration.underline,- ),+ text: index == otherShares.length - 1+ ? strings.legacyKitSheetNameJoinerOr+ : strings.legacyKitSheetNameJoinerList,),- ],+ );+ }+ spans.add(+ pw.TextSpan(+ text: otherShares[index].partName,+ style: pw.TextStyle(fontWeight: pw.FontWeight.bold),+ ),+ );+ }+ return spans;+ }++ pw.Widget _visitLabel(String recoveryUrl, StringsLocalizations strings) {+ return pw.RichText(+ text: pw.TextSpan(+ style: const pw.TextStyle(color: _black, fontSize: 14),+ children:+ _spansAroundSlot(strings.legacyKitSheetStepVisit(_emphasisSlot), [+ pw.TextSpan(+ text: displayRecoveryUrl(recoveryUrl),+ style: pw.TextStyle(+ fontWeight: pw.FontWeight.bold,+ decoration: pw.TextDecoration.underline,+ ),+ ),+ ]),),);}- pw.Widget _copyCodeBlock(String copyCode) {- return pw.Container(- width: 242,- height: 56,- padding: const pw.EdgeInsets.all(6),- decoration: pw.BoxDecoration(- color: _copyCodeBackground,- border: pw.Border.all(- color: _white,- width: 1,- style: pw.BorderStyle.dashed,+ pw.Widget _supportLabel(StringsLocalizations strings) {+ return pw.RichText(+ textAlign: pw.TextAlign.center,+ text: pw.TextSpan(+ style: const pw.TextStyle(color: _black, fontSize: 11.9),+ children: _spansAroundSlot(+ strings.legacyKitSheetNeedHelp(_emphasisSlot),+ const [+ pw.TextSpan(+ text: _supportEmail,+ style: pw.TextStyle(decoration: pw.TextDecoration.underline),+ ),+ ],),- borderRadius: const pw.BorderRadius.all(pw.Radius.circular(12)),),- child: pw.Center(child: _copyCodeText(copyCode)),);}@@ -391,8 +558,8 @@ class LegacyKitPdfService {final enteLogoSvg = assets.enteLogoBlackSvg;final enteComBadgeSvg = assets.enteComBadgeSvg;return pw.SizedBox(- width: 82,- height: 38,+ width: 56,+ height: 26,child: pw.Stack(children: [pw.Positioned(@@ -403,23 +570,23 @@ class LegacyKitPdfService {"ente",style: pw.TextStyle(color: _dark,- fontSize: 26,+ fontSize: 18,fontWeight: pw.FontWeight.bold,),): pw.SizedBox(- width: 75.7,- height: 22.5,+ width: 51.9,+ height: 15.4,child: pw.SvgImage(svg: enteLogoSvg),),),pw.Positioned(- left: 44,- top: 20,+ left: 30.3,+ top: 14,child: enteComBadgeSvg == null? pw.Container(- width: 37,- height: 16,+ width: 25.2,+ height: 11.1,decoration: const pw.BoxDecoration(color: _green,borderRadius: pw.BorderRadius.all(@@ -431,15 +598,15 @@ class LegacyKitPdfService {".com",style: pw.TextStyle(color: _dark,- fontSize: 7.5,+ fontSize: 5.1,fontWeight: pw.FontWeight.bold,),),),): pw.SizedBox(- width: 36.7,- height: 16.1,+ width: 25.2,+ height: 11.1,child: pw.SvgImage(svg: enteComBadgeSvg),),),@@ -448,172 +615,17 @@ class LegacyKitPdfService {);}- pw.Widget _header(_SheetAssets assets) {- final logoSvg = assets.logoSvg;- final enteLogoSvg = assets.enteLogoBlackSvg;- return pw.Row(- mainAxisSize: pw.MainAxisSize.min,- crossAxisAlignment: pw.CrossAxisAlignment.start,- children: [- pw.Padding(- padding: const pw.EdgeInsets.only(top: 2),- child: logoSvg == null- ? _fallbackHeaderLogo()- : pw.SizedBox(- width: 29.4,- height: 30.4,- child: pw.SvgImage(svg: logoSvg),- ),- ),- pw.SizedBox(width: 10.6),- pw.Column(- mainAxisSize: pw.MainAxisSize.min,- crossAxisAlignment: pw.CrossAxisAlignment.start,- children: [- enteLogoSvg == null- ? pw.Text(- "ente",- style: pw.TextStyle(- color: _dark,- fontSize: 14,- fontWeight: pw.FontWeight.bold,- ),- )- : pw.SizedBox(- width: 44,- height: 13.1,- child: pw.SvgImage(svg: enteLogoSvg),- ),- pw.SizedBox(height: 4),- pw.Text(- "Legacy Kit",- style: pw.TextStyle(- color: const PdfColor.fromInt(0xFF1C1C1C),- fontSize: 20,- font: assets.nunitoExtraBold,- fontWeight: pw.FontWeight.bold,- ),- ),- ],- ),- ],- );- }-- pw.Widget _fallbackHeaderLogo() {- return pw.Container(- width: 29,- height: 29,- decoration: pw.BoxDecoration(- border: pw.Border.all(color: _black, width: 1.6),- shape: pw.BoxShape.circle,- ),- child: pw.Center(- child: pw.Text(- "e",- style: pw.TextStyle(- color: _black,- fontSize: 22,- fontWeight: pw.FontWeight.bold,- ),- ),- ),- );- }-- pw.Widget _copyCodeText(String copyCode) {- return pw.SizedBox(- width: 226,- child: pw.Column(- mainAxisSize: pw.MainAxisSize.min,- children: _displayCopyCodeLines(copyCode)- .map(- (line) => pw.SizedBox(- height: 11,- child: pw.FittedBox(- fit: pw.BoxFit.scaleDown,- child: pw.Text(- line,- textAlign: pw.TextAlign.center,- softWrap: false,- maxLines: 1,- style: pw.TextStyle(- color: _white,- fontSize: 7,- fontWeight: pw.FontWeight.bold,- ),- ),- ),- ),- )- .toList(growable: false),- ),- );- }-List<String> _displayCopyCodeLines(String copyCode) {- const chunkSize = 33;- final compactCode = copyCode.replaceAll(RegExp(r"\s+"), "");- final chunks = <String>[];- for (var index = 0; index < compactCode.length; index += chunkSize) {- final nextIndex = index + chunkSize;- final end = nextIndex > compactCode.length- ? compactCode.length- : nextIndex;- chunks.add(compactCode.substring(index, end));- }- return chunks;- }-- pw.Widget _holderChips(List<LegacyKitShare> shares) {- return pw.Wrap(- spacing: 6,- runSpacing: 6,- children: shares- .asMap()- .entries- .map((entry) => _holderChip(entry.value, entry.key))- .toList(growable: false),- );- }-- pw.Widget _holderChip(LegacyKitShare share, int chipIndex) {- final initial = share.partName.trim().isEmpty- ? "?"- : share.partName.trim()[0].toUpperCase();- final chipColor = _holderChipColors[chipIndex % _holderChipColors.length];- return pw.Container(- padding: const pw.EdgeInsets.fromLTRB(4, 4, 10, 4),- decoration: const pw.BoxDecoration(- color: _chipBackground,- // The PDF renderer does not clamp pill radii like Flutter does.- borderRadius: pw.BorderRadius.all(pw.Radius.circular(16)),- ),- child: pw.Row(- mainAxisSize: pw.MainAxisSize.min,- children: [- pw.Container(- width: 24,- height: 24,- decoration: pw.BoxDecoration(- color: chipColor,- shape: pw.BoxShape.circle,- ),- child: pw.Center(- child: pw.Text(- initial,- style: const pw.TextStyle(color: _white, fontSize: 12),- ),- ),- ),- pw.SizedBox(width: 6),- pw.Text(- share.partName,- style: const pw.TextStyle(color: _chipLabel, fontSize: 12),- ),- ],- ),- );+ const chunkSize = 28;+ return [+ for (var index = 0; index < copyCode.length; index += chunkSize)+ copyCode.substring(+ index,+ index + chunkSize > copyCode.length+ ? copyCode.length+ : index + chunkSize,+ ),+ ];}List<LegacyKitShare> _sortedShares(List<LegacyKitShare> shares) {@@ -623,17 +635,21 @@ class LegacyKitPdfService {}class _SheetAssets {- final String? logoSvg;final String? enteLogoBlackSvg;final String? enteComBadgeSvg;- final pw.Font? nunitoExtraBold;+ final String? keyRoundSvg;+ final pw.Font? interBold;+ final pw.Font? outfitMedium;+ final pw.Font? outfitSemiBold;final pw.ThemeData? theme;const _SheetAssets({- required this.logoSvg,required this.enteLogoBlackSvg,required this.enteComBadgeSvg,- required this.nunitoExtraBold,+ required this.keyRoundSvg,+ required this.interBold,+ required this.outfitMedium,+ required this.outfitSemiBold,required this.theme,});}diff --git a/mobile/packages/legacy/pubspec.yaml b/mobile/packages/legacy/pubspec.yamlindex 87f1b9bdbb..8a69a5ccdb 100644--- a/mobile/packages/legacy/pubspec.yaml+++ b/mobile/packages/legacy/pubspec.yaml@@ -46,7 +46,7 @@ dependencies:pdf: 3.12.0pointycastle: 3.9.1rive: 0.14.0-dev.13- share_plus: 11.1.0+ share_plus: 12.0.0shared_preferences: 2.5.3uuid: 4.5.3@@ -58,6 +58,5 @@ dev_dependencies:flutter:assets:- assets/- - assets/fonts/# This package is not meant to be publisheddiff --git a/mobile/packages/legacy/test/legacy_kit_pdf_service_test.dart b/mobile/packages/legacy/test/legacy_kit_pdf_service_test.dartindex 2a8a1a2676..4c9cb8b8a7 100644--- a/mobile/packages/legacy/test/legacy_kit_pdf_service_test.dart+++ b/mobile/packages/legacy/test/legacy_kit_pdf_service_test.dart@@ -1,10 +1,18 @@+import "dart:async";import "dart:convert";+import "dart:io";import "package:ente_legacy/models/legacy_kit_models.dart";import "package:ente_legacy/services/legacy_kit_pdf_service.dart";+import "package:ente_strings/ente_strings.dart";+import "package:flutter/widgets.dart";import "package:flutter_test/flutter_test.dart";+final _strings = lookupStringsLocalizations(const Locale("en"));+void main() {+ TestWidgetsFlutterBinding.ensureInitialized();+test("normalizes compact legacy kit payload fields", () {final payload =jsonDecode(@@ -34,6 +42,16 @@ void main() {);});+ test("keeps the complete display name in the QR payload", () {+ const partName = "Mother π©βπ©βπ§βπ¦ Very Long Name";++ expect(+ (jsonDecode(_share(1, partName).toQrPayload())+ as Map<String, dynamic>)["n"],+ partName,+ );+ });+test("formats recovery URL for recovery sheet instructions", () {expect(LegacyKitPdfService.displayRecoveryUrl("https://legacy.ente.com/"),@@ -60,24 +78,114 @@ void main() {recoveryUrl: "http://localhost:3013",share: share,allShares: shares,+ strings: _strings,),),);for (var index = 0; index < sheets.length; index++) {expect(String.fromCharCodes(sheets[index].take(4)), "%PDF");+ expect(String.fromCharCodes(sheets[index]), isNot(contains("/Keywords")));+ }+ });++ test(+ "embeds the sheet fonts instead of falling back to a base font",+ () async {+ final shares = [_share(1, "Mom"), _share(2, "Alex")];+ const service = LegacyKitPdfService();+ final sheet = await service.buildRecoverySheet(+ accountEmail: "[email protected]",+ recoveryUrl: "https://legacy.ente.com",+ share: shares.first,+ allShares: shares,+ strings: _strings,+ );++ final fonts = _embeddedFonts(sheet);expect(- _metadataPayload(sheets[index], "ente-legacy-kit-share-v1:"),- shares[index].toQrPayload(),+ fonts,+ containsAll([+ "Outfit-SemiBold",+ "Outfit-Medium",+ "Inter-Medium",+ "Inter-Bold",+ ]),);- }+ expect(+ fonts.where(+ (font) =>+ font.startsWith("Courier") ||+ font.startsWith("Helvetica") ||+ font.startsWith("Times"),+ ),+ isEmpty,+ );+ },+ );++ test("renders Cyrillic holder names without missing glyphs", () async {+ final printedMessages = <String>[];+ final shares = [_share(1, "ΠΠ°ΠΌΠ°"), _share(2, "Alex")];++ final sheet = await runZoned(+ () => const LegacyKitPdfService().buildRecoverySheet(+ accountEmail: "[email protected]",+ recoveryUrl: "https://legacy.ente.com",+ share: shares.first,+ allShares: shares,+ strings: _strings,+ ),+ zoneSpecification: ZoneSpecification(+ print: (_, _, _, message) => printedMessages.add(message),+ ),+ );++ expect(String.fromCharCodes(sheet.take(4)), "%PDF");+ expect(+ printedMessages.where(+ (message) => message.contains("Unable to find a font to draw"),+ ),+ isEmpty,+ );});++ test(+ "writes recovery sheets to LEGACY_PDF_OUT for manual review",+ () async {+ final outputDir = Directory(Platform.environment["LEGACY_PDF_OUT"]!)+ ..createSync(recursive: true);+ final shares = [+ _share(1, "ΠΠ°ΠΌΠ°"),+ _share(2, "Alex"),+ _share(3, "Lawyer"),+ ];+ const service = LegacyKitPdfService();+ for (final share in shares) {+ final sheet = await service.buildRecoverySheet(+ accountEmail: "[email protected]",+ recoveryUrl: "https://legacy.ente.com",+ share: share,+ allShares: shares,+ strings: _strings,+ );+ final name = share.partName.toLowerCase();+ File(+ "${outputDir.path}/legacy-kit-${share.shareIndex}-$name.pdf",+ ).writeAsBytesSync(sheet);+ }+ },+ skip: Platform.environment["LEGACY_PDF_OUT"] == null+ ? "set LEGACY_PDF_OUT to a directory to write the sheets there"+ : null,+ );}-String _metadataPayload(List<int> pdf, String prefix) {- final text = String.fromCharCodes(pdf);- final encoded = RegExp("$prefix([A-Za-z0-9_-]+)").firstMatch(text)!.group(1)!;- return utf8.decode(base64Url.decode(base64Url.normalize(encoded)));+Set<String> _embeddedFonts(List<int> pdf) {+ return RegExp(r"/BaseFont/([A-Za-z0-9-]+)")+ .allMatches(String.fromCharCodes(pdf))+ .map((match) => match.group(1)!)+ .toSet();}LegacyKitShare _share(int index, String partName) {diff --git a/mobile/packages/log_viewer/pubspec.yaml b/mobile/packages/log_viewer/pubspec.yamlindex bed6322870..8ecdf0882c 100644--- a/mobile/packages/log_viewer/pubspec.yaml+++ b/mobile/packages/log_viewer/pubspec.yaml@@ -13,7 +13,7 @@ dependencies:logging: 1.3.0 # For LogRecord type compatibilitypath: 1.9.1path_provider: 2.1.5- share_plus: 11.1.0 # For log export functionality+ share_plus: 12.0.0 # For log export functionalitysqflite: 2.4.2dev_dependencies:@@ -21,4 +21,4 @@ dev_dependencies:flutter_test:sdk: flutter-flutter:\ No newline at end of file+flutter:diff --git a/mobile/packages/logging/lib/tunneled_transport.dart b/mobile/packages/logging/lib/tunneled_transport.dartindex a2049487a1..32732a69d0 100644--- a/mobile/packages/logging/lib/tunneled_transport.dart+++ b/mobile/packages/logging/lib/tunneled_transport.dart@@ -21,7 +21,7 @@ class TunneledTransport implements Transport {TunneledTransport._(this._tunnel, this._options): _dsn = _options.dsn != null ? Dsn.parse(_options.dsn!) : null,_headers = _buildHeaders(- _options.platformChecker.isWeb,+ _options.platform.isWeb,_options.sentryClientName,) {_credentialBuilder = _CredentialBuilder(@@ -43,7 +43,7 @@ class TunneledTransport implements Transport {// body guard to not log the error as it has performance impact to allocate// the body String.if (_options.debug) {- _options.logger(+ _options.log(SentryLevel.error,'API returned an error, statusCode = ${response.statusCode}, ''body = ${response.body}',@@ -51,7 +51,7 @@ class TunneledTransport implements Transport {}return const SentryId.empty();} else {- _options.logger(+ _options.log(SentryLevel.debug,'Envelope ${envelope.header.eventId ?? "--"} was sent successfully.',);diff --git a/mobile/packages/logging/pubspec.yaml b/mobile/packages/logging/pubspec.yamlindex 0b5ac368fe..93434651a3 100644--- a/mobile/packages/logging/pubspec.yaml+++ b/mobile/packages/logging/pubspec.yaml@@ -16,8 +16,8 @@ dependencies:package_info_plus: 8.3.1path: 1.9.1path_provider: 2.1.5- sentry: 8.14.2- sentry_flutter: 8.14.2+ sentry: 9.6.0+ sentry_flutter: 9.6.0shared_preferences: 2.5.3uuid: 4.5.3diff --git a/mobile/packages/qr/pubspec.yaml b/mobile/packages/qr/pubspec.yamlindex bd6f06bcf6..27b6db5c22 100644--- a/mobile/packages/qr/pubspec.yaml+++ b/mobile/packages/qr/pubspec.yaml@@ -15,7 +15,7 @@ dependencies:git:url: https://github.com/ente/flutter_pretty_qr_forkref: 80ebafb9c99ac22520092b008579013d2fcffbe1- share_plus: 11.1.0+ share_plus: 12.0.0dev_dependencies:flutter_lints: 6.0.0diff --git a/mobile/packages/strings/lib/l10n/arb/strings_en.arb b/mobile/packages/strings/lib/l10n/arb/strings_en.arbindex 9357f630af..9c83984bc3 100644--- a/mobile/packages/strings/lib/l10n/arb/strings_en.arb+++ b/mobile/packages/strings/lib/l10n/arb/strings_en.arb@@ -1002,6 +1002,87 @@}},"linkCopiedToClipboard": "Link copied to clipboard",+ "legacyKitSheetGreeting": "Hi {name}, please keep this safe.",+ "@legacyKitSheetGreeting": {+ "description": "Greeting printed at the top of a Legacy kit recovery sheet, addressed to the person holding it",+ "placeholders": {+ "name": {+ "type": "String",+ "example": "Mom"+ }+ }+ },+ "legacyKitSheetIntro": "If I'm ever not around, or lose access to my account, this sheet will help you recover my photos, documents and more.",+ "@legacyKitSheetIntro": {+ "description": "Written in the voice of the account owner, addressed to the sheet holder"+ },+ "legacyKitSheetHowToRecover": "How to recover my account",+ "legacyKitSheetStepGetAnother": "This is {index} of {total} sheets. Ask {names} for theirs β you need just one more.",+ "@legacyKitSheetStepGetAnother": {+ "description": "First recovery step. {names} is a list of the other sheet holders, already joined and emphasised",+ "placeholders": {+ "index": {+ "type": "int",+ "example": "1"+ },+ "total": {+ "type": "int",+ "example": "3"+ },+ "names": {+ "type": "String",+ "example": "Alex or Lawyer"+ }+ }+ },+ "legacyKitSheetNameJoinerOr": " or ",+ "@legacyKitSheetNameJoinerOr": {+ "description": "Joins the last two sheet holder names in legacyKitSheetStepGetAnother. Keep the surrounding spaces"+ },+ "legacyKitSheetNameJoinerList": ", ",+ "@legacyKitSheetNameJoinerList": {+ "description": "Joins all but the last two sheet holder names in legacyKitSheetStepGetAnother. Keep the trailing space"+ },+ "legacyKitSheetStepVisit": "Visit {url}",+ "@legacyKitSheetStepVisit": {+ "description": "Second recovery step",+ "placeholders": {+ "url": {+ "type": "String",+ "example": "legacy.ente.com"+ }+ }+ },+ "legacyKitSheetStepScan": "Scan the {count} sheets.",+ "@legacyKitSheetStepScan": {+ "description": "Third recovery step. {count} is how many sheets must be scanned together",+ "placeholders": {+ "count": {+ "type": "int",+ "example": "2"+ }+ }+ },+ "legacyKitSheetScanAt": "Scan this at {url}",+ "@legacyKitSheetScanAt": {+ "description": "Caption printed under the QR code on a Legacy kit recovery sheet",+ "placeholders": {+ "url": {+ "type": "String",+ "example": "legacy.ente.com"+ }+ }+ },+ "legacyKitSheetNeedHelp": "Need help? Write to {email}",+ "@legacyKitSheetNeedHelp": {+ "description": "Footer printed at the bottom of a Legacy kit recovery sheet",+ "placeholders": {+ "email": {+ "type": "String",+ "example": "[email protected]"+ }+ }+ },"congratulations": "Congratulations!","legacyCongratulationsMessage": "You've successfully setup your Legacy.\nStart saving your important information.","saveToLocker": "Save to Locker",diff --git a/mobile/packages/utils/pubspec.yaml b/mobile/packages/utils/pubspec.yamlindex 7317320083..267d9d2ca8 100644--- a/mobile/packages/utils/pubspec.yaml+++ b/mobile/packages/utils/pubspec.yaml@@ -26,7 +26,7 @@ dependencies:logging: 1.3.0package_info_plus: 8.3.1path_provider: 2.1.5- share_plus: 11.1.0+ share_plus: 12.0.0url_launcher: 6.3.2window_manager: 0.5.1diff --git a/mobile/pubspec.lock b/mobile/pubspec.lockindex a7d2a8eca0..545462e9ed 100644--- a/mobile/pubspec.lock+++ b/mobile/pubspec.lock@@ -2495,26 +2495,26 @@ packages:dependency: transitivedescription:name: sentry- sha256: "599701ca0693a74da361bc780b0752e1abc98226cf5095f6b069648116c896bb"+ sha256: d9f3dcf1ecdd600cf9ce134f622383adde5423ecfdaf0ca9b20fbc1c44849337url: "https://pub.dev"source: hosted- version: "8.14.2"+ version: "9.6.0"sentry_flutter:dependency: transitivedescription:name: sentry_flutter- sha256: "5ba2cf40646a77d113b37a07bd69f61bb3ec8a73cbabe5537b05a7c89d2656f8"+ sha256: "37deb4ef8837d10b5c1f527ec18591f8d2d2da9c34f19b3d97ccbbe7f84077c0"url: "https://pub.dev"source: hosted- version: "8.14.2"+ version: "9.6.0"share_plus:dependency: transitivedescription:name: share_plus- sha256: d7dc0630a923883c6328ca31b89aa682bacbf2f8304162d29f7c6aaff03a27a1+ sha256: "3424e9d5c22fd7f7590254ba09465febd6f8827c8b19a44350de4ac31d92d3a6"url: "https://pub.dev"source: hosted- version: "11.1.0"+ version: "12.0.0"share_plus_platform_interface:dependency: transitivedescription: