Skip to content

Commit

Permalink
fix: incorrect text on restore identity key input page (#582)
Browse files Browse the repository at this point in the history
## Description
<!-- Briefly explain the purpose of this PR and what it accomplishes.
-->

## Additional Notes
<!-- Add any extra context or relevant information here. -->

## Type of Change
- [x] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Refactoring
- [ ] Documentation
- [ ] Chore

## Screenshots (if applicable)
<!-- Include screenshots to demonstrate any UI changes. -->
<!-- <img width="180" alt="image" src="image_url_here"> -->
  • Loading branch information
ice-ajax authored Jan 21, 2025
1 parent 48f32ee commit dcca083
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,16 @@ class RecoveryKeysInputContainer extends HookConsumerWidget {
required this.validator,
required this.onContinuePressed,
this.isLoading = false,
this.title,
this.buttonName,
super.key,
});

final bool isLoading;
final String? Function(String?, RecoveryKeyProperty) validator;
final void Function(String name, String id, String code) onContinuePressed;
final String? title;
final String? buttonName;

@override
Widget build(BuildContext context, WidgetRef ref) {
Expand All @@ -37,7 +41,7 @@ class RecoveryKeysInputContainer extends HookConsumerWidget {
return SheetContent(
topPadding: 0,
body: AuthScrollContainer(
title: context.i18n.backup_option_with_recovery_keys_title,
title: title ?? context.i18n.backup_option_with_recovery_keys_title,
description: context.i18n.restore_identity_creds_description,
icon: Assets.svg.iconLoginRestorekey.icon(size: 36.0.s),
titleStyle: context.theme.appTextThemes.headline2,
Expand Down Expand Up @@ -82,7 +86,7 @@ class RecoveryKeysInputContainer extends HookConsumerWidget {
margin: 36.0.s,
child: ScreenSideOffset.large(
child: Button(
label: Text(context.i18n.button_continue),
label: Text(buttonName ?? context.i18n.button_continue),
mainAxisSize: MainAxisSize.max,
disabled: isLoading,
onPressed: () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:ion/app/extensions/build_context.dart';
import 'package:ion/app/features/auth/views/components/recovery_keys_input_container/recovery_keys_input_container.dart';
import 'package:ion/app/features/protect_account/backup/providers/recover_user_action_notifier.c.dart';

Expand All @@ -26,6 +27,8 @@ class RecoveryCredsStep extends ConsumerWidget {
isLoading: isInitLoading || isCompleteLoading,
validator: (value, property) => value == null || value.isEmpty ? '' : null,
onContinuePressed: onContinuePressed,
title: context.i18n.restore_identity_title,
buttonName: context.i18n.button_restore,
);
}
}

0 comments on commit dcca083

Please sign in to comment.