Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mobile-app/lib/features/components/get_started.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class GetStarted extends StatelessWidget {
const SizedBox(height: 25),
GestureDetector(
onTap: () {
final Uri url = Uri.parse(AppConstants.helpAndSupportUrl);
final Uri url = Uri.parse(AppConstants.techSupportUrl);
launchUrl(url);
},
child: Text('Tech Support →', style: context.themeText.smallParagraph),
Expand Down
2 changes: 1 addition & 1 deletion mobile-app/lib/features/main/screens/settings_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ class _SettingsScreenState extends ConsumerState<SettingsScreen> {
ListItem(
title: 'Help & Support',
onTap: () {
final Uri url = Uri.parse(AppConstants.helpAndSupportUrl);
final Uri url = Uri.parse(AppConstants.techSupportUrl);
launchUrl(url);
},
trailing: const Icon(Icons.arrow_outward_sharp),
Expand Down
36 changes: 30 additions & 6 deletions mobile-app/lib/v2/screens/home/activity_section.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import 'package:resonance_network_wallet/v2/screens/activity/transaction_detail_
import 'package:resonance_network_wallet/v2/screens/activity/tx_item.dart';
import 'package:resonance_network_wallet/v2/theme/app_colors.dart';
import 'package:resonance_network_wallet/v2/theme/app_text_styles.dart';
import 'package:url_launcher/url_launcher.dart';

class ActivitySection extends ConsumerWidget {
final AsyncValue<CombinedTransactionsList> txAsync;
Expand Down Expand Up @@ -44,12 +45,8 @@ class ActivitySection extends ConsumerWidget {
children: [
const SizedBox(height: 40),
_header(colors, text, context),
const SizedBox(height: 48),
Icon(Icons.receipt_long_outlined, size: 48, color: colors.textTertiary),
const SizedBox(height: 16),
Text('No transactions yet', style: text.paragraph?.copyWith(color: colors.textSecondary)),
const SizedBox(height: 8),
Text('Your activity will appear here', style: text.detail?.copyWith(color: colors.textTertiary)),
const SizedBox(height: 24),
_getStartedLinks(text, colors),
],
);
}
Expand Down Expand Up @@ -123,6 +120,33 @@ class ActivitySection extends ConsumerWidget {
);
}

Widget _getStartedLinks(AppTextTheme text, AppColorsV2 colors) {
final linkStyle = text.smallParagraph?.copyWith(color: colors.textPrimary);
final links = [
('Get Testnet Tokens →', AppConstants.faucetBotUrl),
('Community →', AppConstants.communityUrl),
('Tech Support →', AppConstants.techSupportUrl),
];

return Container(
width: double.infinity,
padding: const EdgeInsets.all(20),
decoration: BoxDecoration(color: const Color(0x3F000000), borderRadius: BorderRadius.circular(5)),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dont we have a card background color? I think we can reuse it instead of introducing new one

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a black opacity

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this has always been in there, needs another PR

child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
for (var i = 0; i < links.length; i++) ...[
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm… seems really verbose using for loop here. We can use map instead and the extra spacing can be omitted by just use the column spacing instead

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i kind of like old school for loop.. 😂 although AI made this ...

GestureDetector(
onTap: () => launchUrl(Uri.parse(links[i].$2)),
child: Text(links[i].$1, style: linkStyle),
),
if (i < links.length - 1) const SizedBox(height: 25),
],
],
),
);
}

Widget _header(AppColorsV2 colors, AppTextTheme text, BuildContext context) {
return Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
Expand Down
2 changes: 1 addition & 1 deletion mobile-app/lib/v2/screens/settings/settings_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ class _SettingsScreenV2State extends ConsumerState<SettingsScreenV2> {
null,
colors,
text,
onTap: () => launchUrl(Uri.parse(AppConstants.helpAndSupportUrl)),
onTap: () => launchUrl(Uri.parse(AppConstants.techSupportUrl)),
),
_divider(colors),
_externalItem(
Expand Down
6 changes: 5 additions & 1 deletion quantus_sdk/lib/src/constants/app_constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ class AppConstants {
static const String senotiEndpoint = 'http://localhost:3100/api';

static const String explorerEndpoint = 'https://explorer.quantus.com';
static const String helpAndSupportUrl = 'https://t.me/c/quantusnetwork/2457';

// internal group URL is this (note the /c)
// https://t.me/c/quantusnetwork/2457
// removing the c, we get a better preview page though so we use it without c...
static const String techSupportUrl = 'https://t.me/quantusnetwork/2457';
static const String termsOfServiceUrl = 'https://www.quantus.com/terms-and-privacy';
static const String tutorialsAndGuidesUrl = 'https://github.com/Quantus-Network/chain';
static const String shillQuestsPageUrl = 'https://www.quantus.com/quests/shill';
Expand Down