Add platform buttons

This commit is contained in:
Hillel Coren 2020-11-26 20:38:52 +02:00
parent 81b7f472d7
commit 0f44b86344
3 changed files with 26 additions and 0 deletions

View File

@ -36,6 +36,9 @@ const String kGoogleStoreUrl = 'https://play.google.com/apps/testing/com.invoice
const String kMacOSUrl = 'http://download.invoiceninja.com/macos';
const String kLinuxUrl = 'http://download.invoiceninja.com/linux';
const String kApiDocsURL = 'https://app.swaggerhub.com/apis/invoiceninja/invoiceninja';
const String kZapierURL = 'https://zapier.com/developer/public-invite/95884/5e4368b9efb9d377dc0a0b0465b7c1a7';
const String kCapterralUrl = 'https://www.capterra.com/p/145215/Invoice-Ninja/';
const String kCronsHelpUrl =
'https://invoiceninja.github.io/selfhost.html#cron-configuration';

View File

@ -18,6 +18,7 @@ import 'package:invoiceninja_flutter/utils/dialogs.dart';
import 'package:invoiceninja_flutter/utils/formatting.dart';
import 'package:invoiceninja_flutter/utils/icons.dart';
import 'package:invoiceninja_flutter/utils/localization.dart';
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
import 'package:url_launcher/url_launcher.dart';
class AccountManagement extends StatefulWidget {
@ -260,6 +261,25 @@ class _AccountOverview extends StatelessWidget {
),
),
])),
Padding(
padding: const EdgeInsets.all(16),
child: Row(children: [
Expanded(
child: AppButton(
label: localization.apiDocs.toUpperCase(),
iconData: MdiIcons.bookshelf,
onPressed: () => launch(kApiDocsURL),
),
),
SizedBox(width: kGutterWidth),
Expanded(
child: AppButton(
label: 'Zapier',
iconData: MdiIcons.cloud,
onPressed: () => launch(kZapierURL),
),
),
])),
Padding(
padding: const EdgeInsets.symmetric(vertical: 16, horizontal: 16),
child: ListDivider(),

View File

@ -283,6 +283,7 @@ mixin LocalizationsProvider on LocaleCodeAware {
'removed_webhooks': 'Successfully removed :value webhooks',
'restored_webhooks': 'Successfully restored :value webhooks',
'api_tokens': 'API Tokens',
'api_docs': 'API Docs',
'search_tokens': 'Search :count Tokens',
'search_token': 'Search 1 Token',
'token': 'Token',
@ -4690,6 +4691,8 @@ mixin LocalizationsProvider on LocaleCodeAware {
String get apiTokens => _localizedValues[localeCode]['api_tokens'] ?? '';
String get apiDocs => _localizedValues[localeCode]['api_docs'] ?? '';
String get apiWebhooks => _localizedValues[localeCode]['api_webhooks'] ?? '';
String get cronsNotEnabled =>