mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-17 05:41:29 +02:00
URL replacements throughout lib/: - support_view_model.dart: removed Cake's own support channels (email, website, forum, Telegram, Telegram bot). Only GitHub Issues + Releases remain. Third-party provider support links (ChangeNow, SideShift, SimpleSwap, Exolix, Trocador, Onramper, DFX, MoonPay, Robinhood, Kryptonim) kept — genuinely useful when a swap goes sideways. - transaction_details_view_model.dart + payjoin_details_view_model.dart: mempool.cakewallet.com -> mempool.space (canonical free public mempool, no affiliate). - services_updates_widget.dart: status.cakewallet.com -> our GH issues. - 8 widget/screen files: docs.cakewallet.com / blog / cakewallet.com help URLs repointed to github.com/Such-Software/hash-wallet (placeholder until we have our own docs; better than dead-linking to Cake's docs). User-facing text changes: - walletkit_service.dart: WalletKit metadata (name/description/url/icon/ redirect) all -> Hash Wallet / Such Software repo / hashwallet:// scheme. - di.dart: TrezorConnect callback URL + appName -> Hash Wallet. - vulnerable_seeds_popup.dart + haven_wallet_removal_popup.dart: copy rewritten to say 'Hash Wallet' instead of 'Cake Wallet', and point to GH issues instead of Cake's support email. - swap_provider_initial_preference_modal.dart: trailing 'Cake Wallet.' -> 'Hash Wallet.' Deep-link URL scheme cakewallet:// -> hashwallet:// in: - lib/main.dart, lib/src/screens/root/root.dart, lib/view_model/link_view_model.dart Means any cakewallet:// link from a payment QR / Trezor callback / shortcut now routes via hashwallet://. No existing user base so no migration needed. SVG asset swaps (content replaced, filenames kept so call-sites compile without rewriting): - assets/new-ui/cake_squircle_icon.svg -> hash_wallet/02_app_icon.svg - assets/new-ui/cakewallet-wordmark-light.svg -> hash_wallet/03_lockup_horizontal.svg (dark text for light backgrounds) - assets/new-ui/cakewallet-wordmark.svg -> hash_wallet/03_lockup_horizontal_dark.svg (light text for dark backgrounds) - apps_widget.dart: the conditional cakelabs-icon render became a SizedBox() no-op. The Apps tab is gutted anyway (placeholder content); this widget is also used elsewhere where the Cake Labs attribution badge is unwanted.
148 lines
4.7 KiB
Dart
148 lines
4.7 KiB
Dart
import 'package:hash_wallet/src/widgets/cake_image_widget.dart';
|
|
import 'package:hash_wallet/themes/core/theme_extension.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
|
|
class AppsWidget extends StatelessWidget {
|
|
AppsWidget({
|
|
this.onTap,
|
|
required this.title,
|
|
required this.subTitle,
|
|
this.hint,
|
|
this.svgPicture,
|
|
this.image,
|
|
this.icon,
|
|
this.onClose,
|
|
this.customBorder,
|
|
this.shadowSpread,
|
|
this.shadowBlur,
|
|
super.key,
|
|
this.marginV,
|
|
this.marginH,
|
|
this.isWide,
|
|
this.isLink,
|
|
this.isCake,
|
|
});
|
|
|
|
final VoidCallback? onTap;
|
|
final VoidCallback? onClose;
|
|
final String title;
|
|
final String subTitle;
|
|
final Widget? hint;
|
|
final SvgPicture? svgPicture;
|
|
final Widget? icon;
|
|
final String? image;
|
|
final double? customBorder;
|
|
final double? marginV;
|
|
final double? marginH;
|
|
final double? shadowSpread;
|
|
final double? shadowBlur;
|
|
final bool? isWide;
|
|
final bool? isLink;
|
|
final bool? isCake;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
if (isWide == true) {
|
|
return Stack(
|
|
children: [
|
|
Container(
|
|
margin: EdgeInsets.symmetric(horizontal: marginH ?? 20, vertical: marginV ?? 5),
|
|
width: double.infinity,
|
|
decoration: ShapeDecoration(
|
|
shape: RoundedSuperellipseBorder(borderRadius: BorderRadius.circular(18)),
|
|
gradient: LinearGradient(
|
|
colors: [
|
|
context.customColors.cardGradientColorPrimary,
|
|
context.customColors.cardGradientColorSecondary,
|
|
],
|
|
begin: Alignment.topCenter,
|
|
end: Alignment.bottomCenter,
|
|
),
|
|
),
|
|
child: TextButton(
|
|
onPressed: onTap,
|
|
style: TextButton.styleFrom(
|
|
shape: RoundedSuperellipseBorder(
|
|
borderRadius: BorderRadius.circular(18),
|
|
side: BorderSide(
|
|
width: 1.25, color: Theme.of(context).colorScheme.surfaceContainerHigh),
|
|
),
|
|
padding: EdgeInsets.all(24),
|
|
),
|
|
child: Column(
|
|
children: [
|
|
Row(
|
|
children: [
|
|
Padding(
|
|
padding: const EdgeInsets.only(right: 20),
|
|
child: CakeImageWidget(imageUrl: image, height: 54, width: 54),
|
|
),
|
|
Expanded(
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Row(
|
|
spacing: 6.0,
|
|
children: [
|
|
Text(
|
|
title,
|
|
style: Theme.of(context).textTheme.titleMedium?.copyWith(
|
|
color: Theme.of(context).colorScheme.onSurface,
|
|
fontWeight: FontWeight.w800,
|
|
fontSize: 20,
|
|
),
|
|
softWrap: true,
|
|
),
|
|
SizedBox(),
|
|
],
|
|
),
|
|
SizedBox(height: 5),
|
|
Text(
|
|
subTitle,
|
|
style: Theme.of(context).textTheme.bodySmall?.copyWith(
|
|
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
|
fontWeight: FontWeight.w500,
|
|
),
|
|
softWrap: true,
|
|
),
|
|
],
|
|
),
|
|
),
|
|
Icon(
|
|
isLink == true ? Icons.arrow_outward : Icons.arrow_forward_ios,
|
|
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
|
size: 20,
|
|
)
|
|
|
|
],
|
|
),
|
|
if (hint != null) ...[
|
|
SizedBox(height: 10),
|
|
hint!,
|
|
]
|
|
],
|
|
),
|
|
),
|
|
),
|
|
if (onClose != null)
|
|
Positioned(
|
|
top: 10,
|
|
right: 10,
|
|
child: IconButton(
|
|
icon: Icon(Icons.close),
|
|
onPressed: onClose,
|
|
//color: Theme.of(context).colorScheme.onSurface,
|
|
),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
else {
|
|
return Stack(
|
|
|
|
);
|
|
}
|
|
}
|
|
}
|