mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-17 05:41:29 +02:00
Image cleanup (#3160)
* Remove webp currency icons and switch all to SVG * Remove more unused images * Fix base icon * Fix Polygon, Tron, Bitcoin Cash, and BNB flat icons * Fix base icon * Remove more unused icons * Update icon urls * Switch support icons to SVGs * Replace more hero images * Add back Haven logo temporarily and fix refund icon * Fix Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com> --------- Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
This commit is contained in:
@@ -8,6 +8,7 @@ import 'package:cake_wallet/src/screens/base_page.dart';
|
||||
import 'package:cake_wallet/src/screens/dashboard/widgets/filter_list_widget.dart';
|
||||
import 'package:cake_wallet/src/screens/wallet_list/filtered_list.dart';
|
||||
import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart';
|
||||
import 'package:cake_wallet/src/widgets/cake_image_widget.dart';
|
||||
import 'package:cake_wallet/src/widgets/gradient_background.dart';
|
||||
import 'package:cake_wallet/src/widgets/standard_list.dart';
|
||||
import 'package:cake_wallet/utils/address_formatter.dart';
|
||||
@@ -282,7 +283,7 @@ class _ContactPageBodyState extends State<ContactPageBody> with SingleTickerProv
|
||||
Widget _buildCurrencyIcon(ContactBase contact) {
|
||||
final image = contact.type.iconPath;
|
||||
return image != null
|
||||
? Image.asset(image, height: 24, width: 24)
|
||||
? CakeImageWidget(imageUrl: image, height: 24, width: 24)
|
||||
: const SizedBox(height: 24, width: 24);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -343,7 +343,7 @@ class CryptoBalanceWidget extends StatelessWidget {
|
||||
description: S.of(context).zcash_card_description,
|
||||
leftButtonTitle: S.of(context).zcash_card_dismiss,
|
||||
rightButtonTitle: S.of(context).zcash_card_scan,
|
||||
image: 'assets/images/zec_icon.png',
|
||||
image: 'assets/new-ui/crypto_full_icons/zcash.svg',
|
||||
leftButtonAction: () => _dismissZcash(context),
|
||||
rightButtonAction: () => _rescanInternalChangeZcash(context),
|
||||
hintWidget: GestureDetector(
|
||||
|
||||
@@ -36,8 +36,8 @@ class NewWalletPage extends BasePage {
|
||||
final SeedSettingsViewModel _seedSettingsViewModel;
|
||||
final bool isChildWallet;
|
||||
|
||||
final welcomeImageLight = 'assets/images/wallet_type_wallet_light.png';
|
||||
final welcomeImageDark = 'assets/images/wallet_type_wallet_dark.png';
|
||||
final welcomeImageLight = 'assets/new-ui/hero/wallet_type_light.svg';
|
||||
final welcomeImageDark = 'assets/new-ui/hero/wallet_type_dark.svg';
|
||||
|
||||
@override
|
||||
bool get gradientBackground => true;
|
||||
|
||||
@@ -8,6 +8,7 @@ import 'package:cake_wallet/routes.dart';
|
||||
import 'package:cake_wallet/src/screens/base_page.dart';
|
||||
import 'package:cake_wallet/src/screens/new_wallet/widgets/select_button.dart';
|
||||
import 'package:cake_wallet/src/screens/setup_2fa/widgets/popup_cancellable_alert.dart';
|
||||
import 'package:cake_wallet/src/widgets/cake_image_widget.dart';
|
||||
import 'package:cake_wallet/src/widgets/primary_button.dart';
|
||||
import 'package:cake_wallet/src/widgets/scrollable_with_bottom_section.dart';
|
||||
import 'package:cake_wallet/src/widgets/search_bar_widget.dart';
|
||||
@@ -136,8 +137,8 @@ class WalletTypeFormState extends State<WalletTypeForm> {
|
||||
padding: EdgeInsets.only(top: 12),
|
||||
child: SelectButton(
|
||||
key: ValueKey('new_wallet_type_${type.name}_button_key'),
|
||||
image: Image.asset(
|
||||
getCryptoCurrencyIconForWalletListItem(type),
|
||||
image: CakeImageWidget(
|
||||
imageUrl: getCryptoCurrencyIconForWalletListItem(type),
|
||||
height: 24,
|
||||
width: 24,
|
||||
),
|
||||
|
||||
@@ -33,8 +33,8 @@ class WalletGroupDescriptionPage extends BasePage {
|
||||
SizedBox(height: 48),
|
||||
CakeImageWidget(
|
||||
imageUrl: currentTheme.isDark
|
||||
? 'assets/images/wallet_group_options_dark.png'
|
||||
: 'assets/images/wallet_group_options_light.png',
|
||||
? 'assets/new-ui/hero/wallet_group_options_dark.svg'
|
||||
: 'assets/new-ui/hero/wallet_group_options_light.svg',
|
||||
height: 200,
|
||||
),
|
||||
SizedBox(height: 40),
|
||||
|
||||
@@ -94,8 +94,8 @@ class WalletGroupsDisplayBody extends StatelessWidget {
|
||||
title: wallet.name,
|
||||
isSelected:
|
||||
walletGroupsDisplayViewModel.selectedSingleWallet == wallet,
|
||||
leadingWidget: Image.asset(
|
||||
getCryptoCurrencyIconForWalletListItem(wallet.type),
|
||||
leadingWidget: CakeImageWidget(
|
||||
imageUrl: getCryptoCurrencyIconForWalletListItem(wallet.type),
|
||||
width: 32,
|
||||
height: 32,
|
||||
),
|
||||
@@ -170,8 +170,8 @@ class WalletGroupEmptyStateWidget extends StatelessWidget {
|
||||
children: [
|
||||
CakeImageWidget(
|
||||
imageUrl: currentTheme.isDark
|
||||
? 'assets/images/wallet_group_empty_dark.png'
|
||||
: 'assets/images/wallet_group_empty_light.png',
|
||||
? 'assets/new-ui/hero/wallet_group_empty_dark.svg'
|
||||
: 'assets/new-ui/hero/wallet_group_empty_light.svg',
|
||||
height: 200,
|
||||
),
|
||||
SizedBox(height: 60),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:cake_wallet/generated/i18n.dart';
|
||||
import 'package:cake_wallet/routes.dart';
|
||||
import 'package:cake_wallet/src/screens/base_page.dart';
|
||||
import 'package:cake_wallet/src/widgets/cake_image_widget.dart';
|
||||
import 'package:cake_wallet/src/widgets/gradient_background.dart';
|
||||
import 'package:cake_wallet/src/widgets/primary_button.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -18,8 +19,8 @@ class WalletGroupExistingSeedDescriptionPage extends BasePage {
|
||||
@override
|
||||
String get title => S.current.wallet_group;
|
||||
|
||||
final walletGroupConfirmedImageLight = 'assets/images/wallet_group_confirmed_light.png';
|
||||
final walletGroupConfirmedImageDark = 'assets/images/wallet_group_confirmed_dark.png';
|
||||
final walletGroupConfirmedImageLight = 'assets/new-ui/hero/wallet_group_confirmed_light.svg';
|
||||
final walletGroupConfirmedImageDark = 'assets/new-ui/hero/wallet_group_confirmed_dark.svg';
|
||||
|
||||
@override
|
||||
Widget body(BuildContext context) {
|
||||
@@ -32,8 +33,8 @@ class WalletGroupExistingSeedDescriptionPage extends BasePage {
|
||||
padding: EdgeInsets.all(24),
|
||||
child: Column(
|
||||
children: [
|
||||
Image.asset(
|
||||
currentTheme.isDark ? walletGroupConfirmedImageDark : walletGroupConfirmedImageLight,
|
||||
CakeImageWidget(
|
||||
imageUrl: currentTheme.isDark ? walletGroupConfirmedImageDark : walletGroupConfirmedImageLight,
|
||||
height: 200
|
||||
),
|
||||
SizedBox(height: 32),
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:cake_wallet/src/widgets/cake_image_widget.dart';
|
||||
import 'package:cw_core/currency_for_wallet_type.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:cake_wallet/view_model/wallet_list/wallet_list_item.dart';
|
||||
@@ -128,8 +129,8 @@ class GroupedWalletExpansionTile extends StatelessWidget {
|
||||
)
|
||||
: SizedBox(width: 7),
|
||||
SizedBox(width: 24),
|
||||
Image.asset(
|
||||
getCryptoCurrencyIconForWalletListItem(item.type),
|
||||
CakeImageWidget(
|
||||
imageUrl: getCryptoCurrencyIconForWalletListItem(item.type),
|
||||
width: 32,
|
||||
height: 32,
|
||||
),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:cake_wallet/generated/i18n.dart';
|
||||
import 'package:cake_wallet/routes.dart';
|
||||
import 'package:cake_wallet/src/screens/base_page.dart';
|
||||
import 'package:cake_wallet/src/widgets/cake_image_widget.dart';
|
||||
import 'package:cake_wallet/src/widgets/option_tile.dart';
|
||||
import 'package:cake_wallet/utils/device_info.dart';
|
||||
import 'package:cake_wallet/view_model/support_view_model.dart';
|
||||
@@ -20,16 +21,16 @@ class SupportPage extends BasePage {
|
||||
AppBarStyle get appBarStyle => AppBarStyle.regular;
|
||||
|
||||
String get _imageSupportChat => currentTheme.isDark
|
||||
? 'assets/images/support_chat_dark.webp'
|
||||
: 'assets/images/support_chat.webp';
|
||||
? 'assets/new-ui/icons/support_chat_dark.svg'
|
||||
: 'assets/new-ui/icons/support_chat.svg';
|
||||
|
||||
String get _imageSupportDocs => currentTheme.isDark
|
||||
? 'assets/images/support_docs_dark.webp'
|
||||
: 'assets/images/support_docs.webp';
|
||||
? 'assets/new-ui/icons/support_docs_dark.svg'
|
||||
: 'assets/new-ui/icons/support_docs.svg';
|
||||
|
||||
String get _imageSupportLinks => currentTheme.isDark
|
||||
? 'assets/images/support_links_dark.webp'
|
||||
: 'assets/images/support_links.webp';
|
||||
? 'assets/new-ui/icons/support_links_dark.svg'
|
||||
: 'assets/new-ui/icons/support_links.svg';
|
||||
|
||||
@override
|
||||
Widget body(BuildContext context) => Center(
|
||||
@@ -39,19 +40,19 @@ class SupportPage extends BasePage {
|
||||
spacing: 16,
|
||||
children: [
|
||||
OptionTile(
|
||||
image: Image.asset(_imageSupportChat, width: 55, height: 55),
|
||||
image: CakeImageWidget(imageUrl: _imageSupportChat, width: 55, height: 55),
|
||||
title: S.of(context).support_title_live_chat,
|
||||
description: S.of(context).support_description_live_chat,
|
||||
onPressed: () => _onPressedSupportChat(context),
|
||||
),
|
||||
OptionTile(
|
||||
image: Image.asset(_imageSupportDocs, width: 55, height: 55),
|
||||
image: CakeImageWidget(imageUrl: _imageSupportDocs, width: 55, height: 55),
|
||||
title: S.of(context).support_title_guides,
|
||||
description: S.of(context).support_description_guides,
|
||||
onPressed: () => _launchUrl(supportViewModel.docsUrl),
|
||||
),
|
||||
OptionTile(
|
||||
image: Image.asset(_imageSupportLinks, width: 55, height: 55),
|
||||
image: CakeImageWidget(imageUrl: _imageSupportLinks, width: 55, height: 55),
|
||||
title: S.of(context).support_title_other_links,
|
||||
description: S.of(context).support_description_other_links,
|
||||
onPressed: () => Navigator.pushNamed(context, Routes.supportOtherLinks),
|
||||
|
||||
@@ -296,8 +296,8 @@ class WalletListBodyState extends State<WalletListBody> {
|
||||
),
|
||||
)
|
||||
: SizedBox(width: 6),
|
||||
Image.asset(
|
||||
getCryptoCurrencyIconForWalletListItem(
|
||||
CakeImageWidget(
|
||||
imageUrl: getCryptoCurrencyIconForWalletListItem(
|
||||
wallet.type,
|
||||
),
|
||||
width: 32,
|
||||
|
||||
@@ -11,8 +11,8 @@ import 'package:cake_wallet/src/widgets/gradient_background.dart';
|
||||
|
||||
class WelcomePage extends BasePage {
|
||||
static const aspectRatioImage = 1.5;
|
||||
final welcomeImageLight = 'assets/images/welcome_wallet_light.png';
|
||||
final welcomeImageDark = 'assets/images/welcome_wallet_dark.png';
|
||||
final welcomeImageLight = 'assets/new-ui/hero/welcome_wallet_light.svg';
|
||||
final welcomeImageDark = 'assets/new-ui/hero/welcome_wallet_dark.svg';
|
||||
|
||||
@override
|
||||
String? get title => S.current.wallet;
|
||||
|
||||
@@ -21,18 +21,18 @@ String _getSvgPathForChain(String chainName) {
|
||||
|
||||
switch (name) {
|
||||
case 'ethereum':
|
||||
return 'assets/images/crypto/ethereum.webp';
|
||||
return 'assets/new-ui/crypto_full_icons/ethereum.svg';
|
||||
case 'polygon':
|
||||
return 'assets/images/crypto/polygon.webp';
|
||||
return 'assets/new-ui/crypto_full_icons/polygon.svg';
|
||||
case 'arbitrum':
|
||||
return 'assets/images/crypto/arbitrum.webp';
|
||||
return 'assets/new-ui/crypto_full_icons/arbitrum.svg';
|
||||
case 'base':
|
||||
return 'assets/images/crypto/base_icon.webp';
|
||||
return 'assets/new-ui/crypto_full_icons/base.svg';
|
||||
case 'bnb':
|
||||
case 'bsc':
|
||||
return 'assets/images/crypto/BNB.webp';
|
||||
return 'assets/new-ui/crypto_full_icons/bnb.svg';
|
||||
default:
|
||||
return 'assets/images/crypto/ethereum.webp';
|
||||
return 'assets/new-ui/crypto_full_icons/ethereum.svg';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user