Update build
This commit is contained in:
parent
44e2797161
commit
72a0fb3c92
|
|
@ -10,6 +10,7 @@ jobs:
|
|||
commit_secret: ${{secrets.commit_secret}}
|
||||
commit_email: ${{secrets.commit_email}}
|
||||
commit_name: ${{secrets.commit_name}}
|
||||
app_sentry: ${{secrets.app_sentry}}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
|
@ -21,7 +22,7 @@ jobs:
|
|||
- run: |
|
||||
cp lib/.env.dart.example lib/.env.dart
|
||||
sed -i 's/secret/password/g' lib/.env.dart
|
||||
cat lib/.env.dart
|
||||
sed -i 's/dns/${{secrets.app_sentry}}/g' lib/.env.dart
|
||||
- run: flutter build web --release
|
||||
- run: |
|
||||
git config --global user.email ${{secrets.commit_email}}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
class Config {
|
||||
static const String PLATFORM = 'web';
|
||||
static const String API_SECRET = 'secret';
|
||||
static const String SENTRY_DNS = '';
|
||||
static const String SENTRY_DNS = 'dns';
|
||||
static const bool DEMO_MODE = false;
|
||||
|
||||
static const String TEST_EMAIL = 'user@example.com';
|
||||
|
|
|
|||
|
|
@ -1,12 +1,14 @@
|
|||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:invoiceninja_flutter/constants.dart';
|
||||
import 'package:invoiceninja_flutter/data/web_client.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/buttons/elevated_button.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/form_card.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/forms/app_form.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/edit_scaffold.dart';
|
||||
import 'package:invoiceninja_flutter/ui/settings/account_management_vm.dart';
|
||||
import 'package:invoiceninja_flutter/utils/dialogs.dart';
|
||||
import 'package:invoiceninja_flutter/utils/formatting.dart';
|
||||
import 'package:invoiceninja_flutter/utils/localization.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
|
|
@ -102,7 +104,17 @@ class _AccountManagementState extends State<AccountManagement>
|
|||
title: localization.applyLicense,
|
||||
field: localization.license,
|
||||
callback: (value) {
|
||||
print('## LICENSE: $value');
|
||||
final state = viewModel.state;
|
||||
final credentials = state.credentials;
|
||||
final url = formatApiUrl(credentials.url) +
|
||||
'/claim_license';
|
||||
WebClient()
|
||||
.post(url, credentials.token)
|
||||
.then((dynamic response) {
|
||||
print('## response: response');
|
||||
}).catchError((dynamic error) {
|
||||
print('## error: $error');
|
||||
});
|
||||
});
|
||||
},
|
||||
),
|
||||
|
|
|
|||
Loading…
Reference in New Issue