mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-07-18 01:14:07 +00:00
fix missing openToVerify
This commit is contained in:
parent
48be46cf47
commit
21ca0a9c37
6 changed files with 44 additions and 20 deletions
|
|
@ -2822,6 +2822,12 @@ abstract class AppLocalizations {
|
|||
/// **'Open QR code'**
|
||||
String get openQrCode;
|
||||
|
||||
/// No description provided for @letFriendScanQrToVerify.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Let a friend scan this QR code to verify you'**
|
||||
String get letFriendScanQrToVerify;
|
||||
|
||||
/// No description provided for @deleteVerificationTitle.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
|
|
|
|||
|
|
@ -1597,6 +1597,10 @@ class AppLocalizationsDe extends AppLocalizations {
|
|||
@override
|
||||
String get openQrCode => 'QR-Code öffnen';
|
||||
|
||||
@override
|
||||
String get letFriendScanQrToVerify =>
|
||||
'Lass einen Freund diesen QR-Code scannen, um euch zu verifizieren';
|
||||
|
||||
@override
|
||||
String get deleteVerificationTitle => 'Verifizierung löschen?';
|
||||
|
||||
|
|
|
|||
|
|
@ -1584,6 +1584,10 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||
@override
|
||||
String get openQrCode => 'Open QR code';
|
||||
|
||||
@override
|
||||
String get letFriendScanQrToVerify =>
|
||||
'Let a friend scan this QR code to verify you';
|
||||
|
||||
@override
|
||||
String get deleteVerificationTitle => 'Delete verification?';
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 27b598a151a0122f05670d5d8fb6dcfd5f440127
|
||||
Subproject commit 0679ccad6e217d00e924ec3963f366e3df9a44b1
|
||||
|
|
@ -18,7 +18,11 @@ class ProfileQrCodeComp extends StatefulWidget {
|
|||
final double size;
|
||||
final bool showAvatar;
|
||||
|
||||
static Future<void> showSheet(BuildContext context, {Contact? contact}) {
|
||||
static Future<void> showSheet(
|
||||
BuildContext context, {
|
||||
Contact? contact,
|
||||
bool openToVerify = false,
|
||||
}) {
|
||||
return showModalBottomSheet(
|
||||
context: context,
|
||||
isScrollControlled: true,
|
||||
|
|
@ -46,11 +50,17 @@ class ProfileQrCodeComp extends StatefulWidget {
|
|||
),
|
||||
const SizedBox(height: 24),
|
||||
Text(
|
||||
contact != null
|
||||
openToVerify
|
||||
? (contact != null
|
||||
? context.lang.letUserScanQrCode(
|
||||
getContactDisplayName(contact),
|
||||
)
|
||||
: context.lang.addContactQrSheetSubtext,
|
||||
: context.lang.letFriendScanQrToVerify)
|
||||
: (contact != null
|
||||
? context.lang.letUserScanQrCode(
|
||||
getContactDisplayName(contact),
|
||||
)
|
||||
: context.lang.addContactQrSheetSubtext),
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: context.color.onSurface.withValues(alpha: 0.6),
|
||||
|
|
|
|||
|
|
@ -30,12 +30,10 @@ class VerificationBadgeInfo extends StatelessWidget {
|
|||
variant: MyButtonVariant.primaryDense,
|
||||
onPressed: () => context.push(
|
||||
Routes.cameraQRScanner,
|
||||
extra: contact != null
|
||||
? {
|
||||
'contact': contact,
|
||||
extra: {
|
||||
if (contact != null) 'contact': contact,
|
||||
'openToVerify': true,
|
||||
}
|
||||
: null,
|
||||
},
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
|
|
@ -56,7 +54,11 @@ class VerificationBadgeInfo extends StatelessWidget {
|
|||
|
||||
final openButton = MyButton(
|
||||
variant: MyButtonVariant.primaryDense,
|
||||
onPressed: () => ProfileQrCodeComp.showSheet(context, contact: contact),
|
||||
onPressed: () => ProfileQrCodeComp.showSheet(
|
||||
context,
|
||||
contact: contact,
|
||||
openToVerify: true,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
|
|
@ -93,12 +95,10 @@ class VerificationBadgeInfo extends StatelessWidget {
|
|||
boldTextColor: primaryColor,
|
||||
onTap: () => context.push(
|
||||
Routes.cameraQRScanner,
|
||||
extra: contact != null
|
||||
? {
|
||||
'contact': contact,
|
||||
extra: {
|
||||
if (contact != null) 'contact': contact,
|
||||
'openToVerify': true,
|
||||
}
|
||||
: null,
|
||||
},
|
||||
),
|
||||
),
|
||||
if (displayButtons)
|
||||
|
|
|
|||
Loading…
Reference in a new issue