mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-07-01 20:43:20 +08:00
Emails: Add proMode and expiry date
This commit is contained in:
@ -139,17 +139,28 @@ class AppDrawer extends StatelessWidget {
|
|||||||
icon: Icons.rate_review,
|
icon: Icons.rate_review,
|
||||||
title: tr('drawer.feedback'),
|
title: tr('drawer.feedback'),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
var versionText = await getVersionString();
|
|
||||||
|
|
||||||
var platform = Platform.operatingSystem;
|
var platform = Platform.operatingSystem;
|
||||||
var emailAddress = 'feedback@gitjournal.io';
|
var versionText = await getVersionString();
|
||||||
var subject = 'GitJournal Feedback';
|
var isPro = AppSettings.instance.proMode;
|
||||||
var body =
|
|
||||||
"Hey!\n\nHere are some ways to improve GitJournal - \n \n\nVersion: $versionText\nPlatform: $platform";
|
var body =
|
||||||
|
"Hey!\n\nHere are some ways to improve GitJournal - \n \n\n";
|
||||||
|
body += "Version: $versionText\n";
|
||||||
|
body += "Platform: $platform\n";
|
||||||
|
body += "isPro: $isPro\n";
|
||||||
|
|
||||||
|
var exp = AppSettings.instance.proExpirationDate;
|
||||||
|
if (exp != null && exp.isNotEmpty) {
|
||||||
|
body += "expiryDate: $exp";
|
||||||
|
}
|
||||||
|
|
||||||
subject = Uri.encodeComponent(subject);
|
|
||||||
body = Uri.encodeComponent(body);
|
body = Uri.encodeComponent(body);
|
||||||
|
|
||||||
|
var subject = 'GitJournal Feedback';
|
||||||
|
subject = Uri.encodeComponent(subject);
|
||||||
|
|
||||||
|
var emailAddress = 'feedback@gitjournal.io';
|
||||||
|
|
||||||
var url = 'mailto:$emailAddress?subject=$subject&body=$body';
|
var url = 'mailto:$emailAddress?subject=$subject&body=$body';
|
||||||
launch(url);
|
launch(url);
|
||||||
|
|
||||||
@ -164,10 +175,20 @@ class AppDrawer extends StatelessWidget {
|
|||||||
onTap: () async {
|
onTap: () async {
|
||||||
var platform = Platform.operatingSystem;
|
var platform = Platform.operatingSystem;
|
||||||
var versionText = await getVersionString();
|
var versionText = await getVersionString();
|
||||||
|
var isPro = AppSettings.instance.proMode;
|
||||||
|
|
||||||
|
var body = "Hey!\n\nI found a bug in GitJournal - \n \n\n";
|
||||||
|
body += "Version: $versionText\n";
|
||||||
|
body += "Platform: $platform\n";
|
||||||
|
body += "isPro: $isPro\n";
|
||||||
|
|
||||||
|
var exp = AppSettings.instance.proExpirationDate;
|
||||||
|
if (exp != null && exp.isNotEmpty) {
|
||||||
|
body += "expiryDate: $exp";
|
||||||
|
}
|
||||||
|
|
||||||
final Email email = Email(
|
final Email email = Email(
|
||||||
body:
|
body: body,
|
||||||
"Hey!\n\nI found a bug in GitJournal - \n \n\nVersion: $versionText\nPlatform: $platform",
|
|
||||||
subject: 'GitJournal Bug',
|
subject: 'GitJournal Bug',
|
||||||
recipients: ['bugs@gitjournal.io'],
|
recipients: ['bugs@gitjournal.io'],
|
||||||
attachmentPaths: Log.filePathsForDates(2),
|
attachmentPaths: Log.filePathsForDates(2),
|
||||||
|
Reference in New Issue
Block a user