Skip to content

Commit

Permalink
Add link to GitHub repository
Browse files Browse the repository at this point in the history
  • Loading branch information
friebetill committed Oct 16, 2022
1 parent c5ad650 commit eb31700
Show file tree
Hide file tree
Showing 14 changed files with 38 additions and 9 deletions.
1 change: 1 addition & 0 deletions lib/modules/account/component/account/account_bloc.dart
Expand Up @@ -79,6 +79,7 @@ class AccountBloc with ComponentBuildContext {
onSupportUsTap: () =>
CustomNavigator.getInstance().pushNamed(SupportSpacePage.routeName),
onOtherPlatformsTap: _showOtherPlatformsDialog,
onSourceCodeTap: () => _launchURL(githubRepository),
);
});
}
Expand Down
22 changes: 22 additions & 0 deletions lib/modules/account/component/account/account_component.dart
Expand Up @@ -54,6 +54,7 @@ class _AccountView extends StatelessWidget {
_buildSupportUsTile(context),
_buildNextFeaturesTile(context),
_buildFeedbackTile(context),
_buildSourceCodeTile(context),
if (Platform.isAndroid ||
Platform.isIOS ||
Platform.isMacOS ||
Expand Down Expand Up @@ -164,6 +165,27 @@ class _AccountView extends StatelessWidget {
);
}

Widget _buildSourceCodeTile(BuildContext context) {
return VisualElement(
id: VEs.sourceCodeTile,
childBuilder: (controller) {
return ListTileAdapter(
child: ListTile(
leading: Icon(
Icons.code_outlined,
color: Theme.of(context).iconTheme.color,
),
title: Text(S.of(context).sourceCode),
onTap: () {
controller.logTap();
viewModel.onSourceCodeTap();
},
),
);
},
);
}

Widget _buildNextFeaturesTile(BuildContext context) {
return VisualElement(
id: VEs.nextFeaturesTile,
Expand Down
2 changes: 2 additions & 0 deletions lib/modules/account/component/account/account_view_model.dart
Expand Up @@ -14,6 +14,7 @@ class AccountViewModel {
required this.onPrivacyPolicyTap,
required this.onRateUsTap,
required this.onSupportUsTap,
required this.onSourceCodeTap,
});

final bool isLoggedIn;
Expand All @@ -29,4 +30,5 @@ class AccountViewModel {
final VoidCallback onPrivacyPolicyTap;
final VoidCallback onRateUsTap;
final VoidCallback onSupportUsTap;
final VoidCallback onSourceCodeTap;
}
3 changes: 3 additions & 0 deletions lib/utils/config.dart
Expand Up @@ -49,6 +49,9 @@ const appStoreId = '1546202212';

final voteNextFeaturesURL = Uri.https('forms.gle', '/DsFYWYUKZVDwdc2E9');

/// The URL to the TubeCards repository on GitHub.
final githubRepository = Uri.https('github.com', '/friebetill/tubecards');

/// ID of the PayPal donation button.
const String payPalButtonId = '4JN8FL9G57NKU';

Expand Down
1 change: 1 addition & 0 deletions lib/utils/logging/visual_element_ids.dart
Expand Up @@ -61,6 +61,7 @@ enum VEs {
searchCardsButton,
sendResetPasswordInstructionsButton,
signUpButton,
sourceCodeTile,
storeButton,
storeTile,
subscribeButton,
Expand Down
2 changes: 1 addition & 1 deletion res/string/string_de.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion res/string/string_en.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion res/string/string_es.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion res/string/string_fr.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion res/string/string_it.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion res/string/string_pt.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion res/string/string_ru.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion res/string/string_sv.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion res/string/string_zh.json

Large diffs are not rendered by default.

0 comments on commit eb31700

Please sign in to comment.