mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-31 06:35:53 +00:00
frost wallet bottom nav bar ui refactor on mobile
This commit is contained in:
parent
3c76cc115c
commit
acccce62a8
2 changed files with 59 additions and 4 deletions
|
@ -84,6 +84,7 @@ import 'package:stackwallet/widgets/stack_dialog.dart';
|
||||||
import 'package:stackwallet/widgets/wallet_navigation_bar/components/icons/buy_nav_icon.dart';
|
import 'package:stackwallet/widgets/wallet_navigation_bar/components/icons/buy_nav_icon.dart';
|
||||||
import 'package:stackwallet/widgets/wallet_navigation_bar/components/icons/coin_control_nav_icon.dart';
|
import 'package:stackwallet/widgets/wallet_navigation_bar/components/icons/coin_control_nav_icon.dart';
|
||||||
import 'package:stackwallet/widgets/wallet_navigation_bar/components/icons/exchange_nav_icon.dart';
|
import 'package:stackwallet/widgets/wallet_navigation_bar/components/icons/exchange_nav_icon.dart';
|
||||||
|
import 'package:stackwallet/widgets/wallet_navigation_bar/components/icons/frost_sign_nav_icon.dart';
|
||||||
import 'package:stackwallet/widgets/wallet_navigation_bar/components/icons/fusion_nav_icon.dart';
|
import 'package:stackwallet/widgets/wallet_navigation_bar/components/icons/fusion_nav_icon.dart';
|
||||||
import 'package:stackwallet/widgets/wallet_navigation_bar/components/icons/ordinals_nav_icon.dart';
|
import 'package:stackwallet/widgets/wallet_navigation_bar/components/icons/ordinals_nav_icon.dart';
|
||||||
import 'package:stackwallet/widgets/wallet_navigation_bar/components/icons/paynym_nav_icon.dart';
|
import 'package:stackwallet/widgets/wallet_navigation_bar/components/icons/paynym_nav_icon.dart';
|
||||||
|
@ -356,7 +357,17 @@ class _WalletViewState extends ConsumerState<WalletView> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _onExchangePressed(BuildContext context) async {
|
Future<void> _onFrostSignPressed(BuildContext context) async {
|
||||||
|
// TODO
|
||||||
|
await showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (_) => StackOkDialog(
|
||||||
|
title: "TODO FROST SIGN TX",
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _onExchangePressed(BuildContext context) async {
|
||||||
final Coin coin = ref.read(pWalletCoin(walletId));
|
final Coin coin = ref.read(pWalletCoin(walletId));
|
||||||
|
|
||||||
if (coin.isTestNet) {
|
if (coin.isTestNet) {
|
||||||
|
@ -401,7 +412,7 @@ class _WalletViewState extends ConsumerState<WalletView> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _onBuyPressed(BuildContext context) async {
|
Future<void> _onBuyPressed(BuildContext context) async {
|
||||||
final Coin coin = ref.read(pWalletCoin(walletId));
|
final Coin coin = ref.read(pWalletCoin(walletId));
|
||||||
|
|
||||||
if (coin.isTestNet) {
|
if (coin.isTestNet) {
|
||||||
|
@ -976,6 +987,12 @@ class _WalletViewState extends ConsumerState<WalletView> {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
if (ref.watch(pWalletCoin(walletId)).isFrost)
|
||||||
|
WalletNavigationBarItemData(
|
||||||
|
label: "Sign",
|
||||||
|
icon: const FrostSignNavIcon(),
|
||||||
|
onTap: () => _onFrostSignPressed(context),
|
||||||
|
),
|
||||||
WalletNavigationBarItemData(
|
WalletNavigationBarItemData(
|
||||||
label: "Send",
|
label: "Send",
|
||||||
icon: const SendNavIcon(),
|
icon: const SendNavIcon(),
|
||||||
|
@ -1007,13 +1024,15 @@ class _WalletViewState extends ConsumerState<WalletView> {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
if (Constants.enableExchange)
|
if (Constants.enableExchange &&
|
||||||
|
!ref.watch(pWalletCoin(walletId)).isFrost)
|
||||||
WalletNavigationBarItemData(
|
WalletNavigationBarItemData(
|
||||||
label: "Swap",
|
label: "Swap",
|
||||||
icon: const ExchangeNavIcon(),
|
icon: const ExchangeNavIcon(),
|
||||||
onTap: () => _onExchangePressed(context),
|
onTap: () => _onExchangePressed(context),
|
||||||
),
|
),
|
||||||
if (Constants.enableExchange)
|
if (Constants.enableExchange &&
|
||||||
|
!ref.watch(pWalletCoin(walletId)).isFrost)
|
||||||
WalletNavigationBarItemData(
|
WalletNavigationBarItemData(
|
||||||
label: "Buy",
|
label: "Buy",
|
||||||
icon: const BuyNavIcon(),
|
icon: const BuyNavIcon(),
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
/*
|
||||||
|
* This file is part of Stack Wallet.
|
||||||
|
*
|
||||||
|
* Copyright (c) 2023 Cypher Stack
|
||||||
|
* All Rights Reserved.
|
||||||
|
* The code is distributed under GPLv3 license, see LICENSE file for details.
|
||||||
|
* Generated by Cypher Stack on 2023-05-26
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
|
import 'package:stackwallet/themes/theme_providers.dart';
|
||||||
|
|
||||||
|
class FrostSignNavIcon extends ConsumerWidget {
|
||||||
|
const FrostSignNavIcon({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
|
return SvgPicture.file(
|
||||||
|
File(
|
||||||
|
ref.watch(
|
||||||
|
themeProvider.select(
|
||||||
|
// TODO: [prio=high] update themes with icon asset
|
||||||
|
(value) => value.assets.stackIcon,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
width: 24,
|
||||||
|
height: 24,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue