Skip to content

Commit

Permalink
Add report issue setting
Browse files Browse the repository at this point in the history
  • Loading branch information
maelchiotti committed Feb 4, 2024
1 parent 680f28e commit bea3e74
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 4 deletions.
2 changes: 2 additions & 0 deletions lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
"settings_github_description": "Take a look at the source code",
"settings_licence": "License",
"settings_licence_description": "AGPL-3.0",
"settings_issue": "Report a bug",
"settings_issue_description": "Report a bug by creating an issue on GitHub",
"shortcut_bold": "Bold",
"shortcut_italic": "Italic",
"shortcut_underline": "Underline",
Expand Down
2 changes: 2 additions & 0 deletions lib/l10n/app_fr.arb
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
"settings_github": "GitHub",
"settings_github_description": "Jeter un coup d''œil au code source",
"settings_licence": "License",
"settings_issue": "Signaler un bug",
"settings_issue_description": "Signaler un bug en créant une issue sur GitHub",
"shortcut_bold": "Gras",
"shortcut_italic": "Italique",
"shortcut_underline": "Souligné",
Expand Down
12 changes: 12 additions & 0 deletions lib/l10n/app_localizations.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,18 @@ abstract class AppLocalizations {
/// **'AGPL-3.0'**
String get settings_licence_description;

/// No description provided for @settings_issue.
///
/// In en, this message translates to:
/// **'Report a bug'**
String get settings_issue;

/// No description provided for @settings_issue_description.
///
/// In en, this message translates to:
/// **'Report a bug by creating an issue on GitHub'**
String get settings_issue_description;

/// No description provided for @shortcut_bold.
///
/// In en, this message translates to:
Expand Down
6 changes: 6 additions & 0 deletions lib/l10n/app_localizations_en.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get settings_licence_description => 'AGPL-3.0';

@override
String get settings_issue => 'Report a bug';

@override
String get settings_issue_description => 'Report a bug by creating an issue on GitHub';

@override
String get shortcut_bold => 'Bold';

Expand Down
6 changes: 6 additions & 0 deletions lib/l10n/app_localizations_fr.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@ class AppLocalizationsFr extends AppLocalizations {
@override
String get settings_licence_description => 'AGPL-3.0';

@override
String get settings_issue => 'Signaler un bug';

@override
String get settings_issue_description => 'Signaler un bug en créant une issue sur GitHub';

@override
String get shortcut_bold => 'Gras';

Expand Down
8 changes: 6 additions & 2 deletions lib/pages/settings/interactions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,14 @@ class Interactions {
}

void openGitHub(_) {
launchUrlString('https://github.com/maelchiotti/MaterialNotes');
launchUrlString('https://github.com/maelchiotti/LocalMaterialNotes');
}

void openLicense(_) {
launchUrlString('https://github.com/maelchiotti/MaterialNotes/blob/main/LICENSE');
launchUrlString('https://github.com/maelchiotti/LocalMaterialNotes/blob/main/LICENSE');
}

void openIssues(_) {
launchUrlString('https://github.com/maelchiotti/LocalMaterialNotes/issues');
}
}
6 changes: 6 additions & 0 deletions lib/pages/settings/settings_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ class _SettingsPageState extends ConsumerState<SettingsPage> {
value: Text(localizations.settings_licence_description),
onPressed: interactions.openLicense,
),
SettingsTile(
leading: const Icon(Icons.bug_report),
title: Text(localizations.settings_issue),
value: Text(localizations.settings_issue_description),
onPressed: interactions.openIssues,
),
],
),
],
Expand Down
3 changes: 1 addition & 2 deletions lib/providers/bin/bin_provider.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bea3e74

Please sign in to comment.