Files
hash-wallet/lib/new-ui/new_dashboard.dart
T
jwinterm e8f766dfe6 Rebrand: 'Hash Wallet' → 'Hash Bags' (visible name only)
Avoids any confusion / potential trademark friction with HashWallet
(Spanish hardware-wallet company). Hash Bags is a more distinctive
name, harder to collide with, and we can still rank for 'hash wallet'
search via App Store / Play Store subtitle ('Hash Bags - A Wallet
for your Coins').

What changed (all user-visible strings):
- Launcher labels: android/app.properties, scripts/android/app_env.sh,
  scripts/ios/app_env.sh, linux window title (CMakeLists +
  my_application.cc)
- In-app text: lib/generated/i18n.dart + ARB sources under res/values/
- Brand docs: README.md, CONTRIBUTING.md, PRIVACY.md,
  assets/text/Terms_of_Use.txt, assets/text/Release_Notes.txt
- hash.boats website: index.html, og-image.svg + regen og-image.png,
  site.webmanifest, styles.css comment, splash/confirm/pulse/mark/
  lockup svg titles, report/index.html, server/server.js
- CI workflow display names ("Hash Bags Linux build", etc.)

What did NOT change (deliberate):
- Bundle ID / Package: com.suchsoftware.hashwallet (immutable app
  identity on App Store + Play Store — changing == orphaning the app)
- Binary name: hash_wallet (Linux executable)
- Dart import paths: package:hash_wallet/...
- Git repo: hash-wallet (Such-Software/hash-wallet)
- URL scheme: hashwallet:// (internal deep links)
- support@such.software (no domain change yet)
- App Store / Play Store listing names (whatever was registered there
  stays; we updated launcher label only)
- hash.boats domain (still the wallet site)

Also kept the '#ash Wallet' wordplay in the nav but updated to
'#ash Bags' so the # mark still serves as the H. Nav reads:
[# mark] #ash Bags

Website hero tagline now matches the App Store sub-title concept:
'A wallet for your coins. Open-source, non-custodial, multi-chain.
Privacy-leaning by default.'

108 files modified, ~674 string replacements.
2026-05-19 07:26:45 -04:00

175 lines
6.2 KiB
Dart

import 'dart:io';
import 'package:hash_wallet/di.dart';
import 'package:hash_wallet/entities/preferences_key.dart';
import 'package:hash_wallet/new-ui/pages/home_page.dart';
import 'package:hash_wallet/new-ui/widgets/changelog_modal.dart';
import 'package:hash_wallet/src/screens/contact/contact_list_page.dart';
import 'package:hash_wallet/src/screens/dashboard/pages/cake_features_page.dart';
import 'package:hash_wallet/src/screens/dashboard/widgets/new_main_navbar_widget.dart';
import 'package:hash_wallet/src/screens/wallet_connect/services/bottom_sheet_service.dart';
import 'package:hash_wallet/src/screens/wallet_connect/widgets/bottom_sheet/bottom_sheet_listener_widget.dart';
import 'package:hash_wallet/src/screens/wallet_list/wallet_list_page.dart';
import 'package:hash_wallet/src/widgets/vulnerable_seeds_popup.dart';
import 'package:hash_wallet/utils/show_pop_up.dart';
import 'package:hash_wallet/utils/version_comparator.dart';
import 'package:flutter/material.dart';
import 'package:mobx/mobx.dart';
import 'package:modal_bottom_sheet/modal_bottom_sheet.dart';
import 'package:shared_preferences/shared_preferences.dart';
import '../view_model/dashboard/dashboard_view_model.dart';
class NewDashboard extends StatefulWidget {
NewDashboard({
super.key,
required this.dashboardViewModel,
required this.bottomSheetService,
});
final DashboardViewModel dashboardViewModel;
final BottomSheetService bottomSheetService;
final List<Widget> dashboardPageWidgets = [
getIt.get<NewHomePage>(),
getIt.get<WalletListPage>(),
getIt.get<ContactListPage>(),
getIt.get<CakeFeaturesPage>(),
Placeholder(),
];
@override
State<NewDashboard> createState() => _NewDashboardState();
}
class _NewDashboardState extends State<NewDashboard> {
int _selectedPage = 0;
@override
void initState() {
super.initState();
reaction((_) => widget.dashboardViewModel.appStore.wallet, (_) {
setState(() {
_selectedPage = 0;
});
});
// Hash Bags: changelog modal disabled. The Cake-supplied changelog
// text (assets/new-ui/changelog/text) describes Cake's release history
// including v6.1.0 entries that aren't ours, and the 'View more info'
// button linked to blog.cakewallet.com. Re-enable once we have our
// own changelog content + versioning under our control.
// Future.delayed(Duration(milliseconds: 300)).then((_) => _showChangelog(context));
_showVulnerableSeedsPopup(context);
}
@override
Widget build(BuildContext context) {
return BottomSheetListener(
bottomSheetService: widget.bottomSheetService,
child: CupertinoScaffold(
body: Material(
child: Stack(
alignment: Alignment.bottomCenter,
children: [
// widget.dashboardPageWidgets[_selectedPage],
IndexedStack(
index: _selectedPage,
children: widget.dashboardPageWidgets,
),
IgnorePointer(
child: Container(
height: 150,
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: <Color>[
Theme.of(context).colorScheme.surfaceDim.withAlpha(5),
Theme.of(context).colorScheme.surfaceDim.withAlpha(50),
Theme.of(context).colorScheme.surfaceDim.withAlpha(100),
Theme.of(context).colorScheme.surfaceDim.withAlpha(150),
Theme.of(context).colorScheme.surfaceDim.withAlpha(200),
Theme.of(context).colorScheme.surfaceDim.withAlpha(200),
],
),
),
),
),
SafeArea(
bottom: !(Platform.isIOS),
child: SizedBox(
width: double.infinity,
height: NewMainNavBar.barHeight + NewMainNavBar.barBottomPadding,
child: AbsorbPointer(
absorbing: true,
child: Container(color: Colors.transparent),
),
),
),
NewMainNavBar(
dashboardViewModel: widget.dashboardViewModel,
selectedIndex: _selectedPage,
onItemTap: (index) {
setState(() {
_selectedPage = index;
});
},
)
],
),
),
),
);
}
void _showChangelog(BuildContext context) async {
final sharedPrefs = await SharedPreferences.getInstance();
final currentAppVersion = VersionComparator.getExtendedVersionNumber(
widget.dashboardViewModel.settingsStore.appVersion);
final lastSeenAppVersion = sharedPrefs.getInt(PreferencesKey.lastSeenAppVersion);
final isNewInstall = sharedPrefs.getBool(PreferencesKey.isNewInstall) ?? true;
if (currentAppVersion != lastSeenAppVersion && !isNewInstall) {
Future<void>.delayed(
Duration(seconds: 1),
() {
if (context.mounted) {
showModalBottomSheet(
isScrollControlled: true,
context: context,
builder: (context) {
return ChangelogModal(
version: widget.dashboardViewModel.settingsStore.appVersion,
);
});
}
},
);
sharedPrefs.setInt(PreferencesKey.lastSeenAppVersion, currentAppVersion);
} else if (isNewInstall) {
sharedPrefs.setInt(PreferencesKey.lastSeenAppVersion, currentAppVersion);
}
}
void _showVulnerableSeedsPopup(BuildContext context) async {
final List<String> affectedWalletNames = await widget.dashboardViewModel.checkAffectedWallets();
if (affectedWalletNames.isNotEmpty) {
Future<void>.delayed(
Duration(seconds: 1),
() {
if (context.mounted) {
showPopUp<void>(
context: context,
builder: (BuildContext context) {
return VulnerableSeedsPopup(affectedWalletNames);
},
);
}
},
);
}
}
}