-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add screens for deleting authenticator (#161)
Figma [link](https://www.figma.com/design/3TnZngoFeklOVC8TexlR1D/%F0%9F%A7%8A-ICE-Cloud?node-id=36878-69423&t=sSfpxvt0gq6L3TiU-0) https://github.com/user-attachments/assets/e931af12-5476-4a2d-913b-8734b1f02c08
- Loading branch information
1 parent
e2b8faf
commit 5425726
Showing
37 changed files
with
887 additions
and
277 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:ice/app/components/card/rounded_card.dart'; | ||
import 'package:ice/app/components/list_item/list_item.dart'; | ||
import 'package:ice/app/extensions/extensions.dart'; | ||
import 'package:ice/generated/assets.gen.dart'; | ||
|
||
class WarningCard extends StatelessWidget { | ||
const WarningCard({ | ||
super.key, | ||
required this.text, | ||
}); | ||
|
||
final String text; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return RoundedCard.outlined( | ||
padding: EdgeInsets.symmetric(horizontal: 10.0.s), | ||
child: ListItem( | ||
contentPadding: EdgeInsets.zero, | ||
borderRadius: BorderRadius.all(Radius.circular(16.0.s)), | ||
leading: Assets.images.icons.iconReport.icon( | ||
size: 20.0.s, | ||
color: context.theme.appColors.attentionRed, | ||
), | ||
title: Text( | ||
text, | ||
style: context.theme.appTextThemes.caption.copyWith( | ||
color: context.theme.appColors.attentionRed, | ||
), | ||
maxLines: 3, | ||
), | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:ice/app/extensions/extensions.dart'; | ||
|
||
class AppProgressIndicator extends StatelessWidget { | ||
final double progressValue; | ||
|
||
const AppProgressIndicator({ | ||
super.key, | ||
required this.progressValue, | ||
}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return SizedBox( | ||
height: 3.0.s, | ||
child: LinearProgressIndicator( | ||
value: progressValue, | ||
backgroundColor: context.theme.appColors.secondaryBackground, | ||
valueColor: AlwaysStoppedAnimation<Color>(context.theme.appColors.primaryAccent), | ||
), | ||
); | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
lib/app/components/progress_bar/sliver_app_bar_with_progress.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:ice/app/components/progress_bar/app_progress_bar.dart'; | ||
import 'package:ice/app/extensions/extensions.dart'; | ||
import 'package:ice/app/router/components/navigation_app_bar/navigation_app_bar.dart'; | ||
import 'package:ice/app/router/components/navigation_app_bar/navigation_close_button.dart'; | ||
|
||
class SliverAppBarWithProgress extends StatelessWidget { | ||
const SliverAppBarWithProgress({ | ||
super.key, | ||
this.progressValue, | ||
required this.title, | ||
required this.onClose, | ||
this.showBackButton = true, | ||
this.showProgress = true, | ||
}); | ||
|
||
final double? progressValue; | ||
final String? title; | ||
final VoidCallback onClose; | ||
final bool showBackButton; | ||
final bool showProgress; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
final showProgressIndicator = showProgress && progressValue != null; | ||
|
||
return SliverAppBar( | ||
primary: false, | ||
flexibleSpace: Column( | ||
children: [ | ||
NavigationAppBar.modal( | ||
title: title != null ? Text(title!) : null, | ||
showBackButton: showBackButton, | ||
actions: [ | ||
NavigationCloseButton(onPressed: onClose), | ||
], | ||
), | ||
if (showProgressIndicator) AppProgressIndicator(progressValue: progressValue!), | ||
], | ||
), | ||
automaticallyImplyLeading: false, | ||
toolbarHeight: NavigationAppBar.modalHeaderHeight + (showProgressIndicator ? 3.0.s : 0), | ||
pinned: true, | ||
); | ||
} | ||
} |
98 changes: 0 additions & 98 deletions
98
...app/features/auth/views/pages/protect_account/authenticator/authenticator_setup_page.dart
This file was deleted.
Oops, something went wrong.
35 changes: 0 additions & 35 deletions
35
...auth/views/pages/protect_account/authenticator/components/authenticator_progress_bar.dart
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
...ages/protect_account/authenticator/delete_authenticator/components/two_fa_input_list.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_hooks/flutter_hooks.dart'; | ||
import 'package:ice/app/extensions/extensions.dart'; | ||
import 'package:ice/app/features/auth/data/models/twofa_type.dart'; | ||
import 'package:ice/app/features/auth/views/pages/twofa_codes/twofa_code_input.dart'; | ||
|
||
class TwoFaCodeInputList extends HookWidget { | ||
final List<TwoFaType> twoFaTypes; | ||
|
||
const TwoFaCodeInputList({ | ||
super.key, | ||
required this.twoFaTypes, | ||
}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
final controllers = { | ||
for (final type in twoFaTypes) | ||
type: useTextEditingController.fromValue(TextEditingValue.empty), | ||
}; | ||
|
||
return Column( | ||
children: twoFaTypes.map((twoFaType) { | ||
return Padding( | ||
padding: EdgeInsets.only(bottom: 22.0.s), | ||
child: TwoFaCodeInput( | ||
controller: controllers[twoFaType]!, | ||
twoFaType: twoFaType, | ||
), | ||
); | ||
}).toList(), | ||
); | ||
} | ||
} |
Oops, something went wrong.