Skip to content

Commit

Permalink
feat: EWM-240update profile some screens (#449)
Browse files Browse the repository at this point in the history
* update profile some screens

* update check seed view

* update modal seetings of the seed phraze

* create updated rename modal

* change style in export modal

* export change style of the modal

* change password create modal

* seed view, key view, remove key

* delete account flow

* account detail view without switcher

* update switcher

---------

Co-authored-by: Andrey Malochka <[email protected]>
  • Loading branch information
AndreyMolochko and Andrey Malochka authored Aug 23, 2024
1 parent fa6245d commit cb34262
Show file tree
Hide file tree
Showing 39 changed files with 514 additions and 424 deletions.
11 changes: 6 additions & 5 deletions lib/feature/profile/account_detail/view/account_detail_page.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import 'package:app/di/di.dart';
import 'package:app/feature/profile/profile.dart';
import 'package:app/generated/generated.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:go_router/go_router.dart';
import 'package:lucide_icons_flutter/lucide_icons.dart';
import 'package:nekoton_repository/nekoton_repository.dart';
import 'package:ui_components_lib/ui_components_lib.dart';
import 'package:ui_components_lib/v2/ui_components_lib_v2.dart';

/// Entry point for screen with information about account
class AccountDetailPage extends StatelessWidget {
Expand Down Expand Up @@ -39,10 +40,10 @@ class AccountDetailPage extends StatelessWidget {
return Scaffold(
appBar: DefaultAppBar(
actions: [
CommonIconButton.svg(
svg: Assets.images.settings.path,
buttonType: EverButtonType.secondary,
size: CommonIconButtonSize.small,
FloatButton(
buttonShape: ButtonShape.circle,
icon: LucideIcons.cog,
buttonSize: ButtonSize.medium,
onPressed: () => showAccountSettingsSheet(
context: context,
address: account.address,
Expand Down
41 changes: 22 additions & 19 deletions lib/feature/profile/account_detail/view/account_detail_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:nekoton_repository/nekoton_repository.dart' hide Message;
import 'package:ui_components_lib/ui_components_lib.dart';
import 'package:ui_components_lib/v2/ui_components_lib_v2.dart';

class AccountDetailView extends StatelessWidget {
const AccountDetailView({
Expand All @@ -23,86 +24,88 @@ class AccountDetailView extends StatelessWidget {
@override
Widget build(BuildContext context) {
final colors = context.themeStyle.colors;
final theme = context.themeStyleV2;

return SingleChildScrollView(
padding: const EdgeInsets.symmetric(horizontal: DimensSize.d16),
padding: const EdgeInsets.symmetric(horizontal: DimensSizeV2.d16),
child: SeparatedColumn(
mainAxisSize: MainAxisSize.min,
separatorSize: DimensSize.d16,
separatorSize: DimensSizeV2.d16,
children: [
SeparatedColumn(
mainAxisSize: MainAxisSize.min,
separatorSize: DimensSize.d4,
separatorSize: DimensSizeV2.d4,
children: [
Text(
LocaleKeys.accountWord.tr(),
style: StyleRes.addRegular.copyWith(
color: colors.textSecondary,
),
style: theme.textStyles.labelXSmall,
),
Text(
account.name,
style: StyleRes.h1.copyWith(color: colors.textPrimary),
style: theme.textStyles.headingLarge,
maxLines: 1,
overflow: TextOverflow.ellipsis,
softWrap: false,
),
],
),
CommonCard(
backgroundColor: theme.colors.background2,
topSubtitleText: LocaleKeys.totalBalance.tr(),
titleChild: MoneyWidget(
money: balance,
style: MoneyWidgetStyle.primary,
),
height: DimensSize.d76,
height: DimensSizeV2.d76,
width: double.infinity,
),
ShapedContainerColumn(
color: theme.colors.background2,
mainAxisSize: MainAxisSize.min,
margin: EdgeInsets.zero,
padding: EdgeInsets.zero,
crossAxisAlignment: CrossAxisAlignment.center,
separator: const CommonDivider(),
children: [
BarcodeWidget(
margin: const EdgeInsets.all(DimensSize.d32),
width: DimensSize.d148,
height: DimensSize.d148,
margin: const EdgeInsets.all(DimensSizeV2.d32),
width: DimensSizeV2.d148,
height: DimensSizeV2.d148,
data: account.address.address,
barcode: Barcode.qrCode(),
color: colors.textPrimary,
),
CommonListTile(
onPressed: _copyAddress,
height: null,
padding: const EdgeInsets.all(DimensSize.d16),
padding: const EdgeInsets.all(DimensSizeV2.d16),
titleChild: Text(
LocaleKeys.addressWord.tr(),
style:
StyleRes.addRegular.copyWith(color: colors.textSecondary),
style: theme.textStyles.labelXSmall,
),
subtitleChild: Text(
account.address.address,
style:
StyleRes.addRegular.copyWith(color: colors.textPrimary),
style: theme.textStyles.labelXSmall.copyWith(
color: theme.colors.content3,
),
),
trailing: CommonIconWidget.svg(svg: Assets.images.copy.path),
),
],
),
CommonListTile(
titleText: LocaleKeys.displayOnMainScreen.tr(),
padding: const EdgeInsets.all(DimensSize.d16),
padding: const EdgeInsets.all(DimensSizeV2.d16),
height: null,
backgroundColor: colors.backgroundSecondary,
backgroundColor: theme.colors.background2,
trailing: CommonSwitchInput(
value: !account.isHidden,
onChanged: (_) => _changeVisibility(),
),
),
if (custodians.isNotEmpty)
ShapedContainerColumn(
color: theme.colors.background2,
mainAxisSize: MainAxisSize.min,
margin: EdgeInsets.zero,
crossAxisAlignment: CrossAxisAlignment.center,
Expand Down Expand Up @@ -149,7 +152,7 @@ class AccountDetailView extends StatelessWidget {
buttonType: EverButtonType.ghost,
color: colors.textSecondary,
onPressed: () => Navigator.of(context).push(
showRenameSheet(custodian.publicKey, isCustodian: true),
showRenameSheet(context, custodian.publicKey, isCustodian: true),
),
),
);
Expand Down
11 changes: 6 additions & 5 deletions lib/feature/profile/key_detail/view/key_detail_page.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import 'package:app/di/di.dart';
import 'package:app/feature/profile/profile.dart';
import 'package:app/generated/generated.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:go_router/go_router.dart';
import 'package:lucide_icons_flutter/lucide_icons.dart';
import 'package:nekoton_repository/nekoton_repository.dart';
import 'package:ui_components_lib/ui_components_lib.dart';
import 'package:ui_components_lib/v2/ui_components_lib_v2.dart';

/// Entry point for screen with information about key
class KeyDetailPage extends StatelessWidget {
Expand Down Expand Up @@ -46,10 +47,10 @@ class KeyDetailPage extends StatelessWidget {
actions: !hasData
? null
: [
CommonIconButton.svg(
svg: Assets.images.settings.path,
buttonType: EverButtonType.secondary,
size: CommonIconButtonSize.small,
FloatButton(
buttonShape: ButtonShape.circle,
icon: LucideIcons.cog,
buttonSize: ButtonSize.medium,
onPressed: () => showKeySettingsSheet(
context: context,
publicKey: publicKey,
Expand Down
Loading

0 comments on commit cb34262

Please sign in to comment.