Suggest native app
This commit is contained in:
parent
8504e02713
commit
12426aed84
|
|
@ -101,6 +101,7 @@ abstract class AppState implements Built<AppState, AppStateBuilder> {
|
|||
isLoading: false,
|
||||
isSaving: false,
|
||||
isTesting: false,
|
||||
dismissedNativeWarning: false,
|
||||
lastError: '',
|
||||
authState: AuthState(
|
||||
url: url,
|
||||
|
|
@ -129,6 +130,8 @@ abstract class AppState implements Built<AppState, AppStateBuilder> {
|
|||
|
||||
bool get isTesting;
|
||||
|
||||
bool get dismissedNativeWarning;
|
||||
|
||||
String get lastError;
|
||||
|
||||
AuthState get authState;
|
||||
|
|
|
|||
|
|
@ -27,6 +27,9 @@ class _$AppStateSerializer implements StructuredSerializer<AppState> {
|
|||
'isTesting',
|
||||
serializers.serialize(object.isTesting,
|
||||
specifiedType: const FullType(bool)),
|
||||
'dismissedNativeWarning',
|
||||
serializers.serialize(object.dismissedNativeWarning,
|
||||
specifiedType: const FullType(bool)),
|
||||
'lastError',
|
||||
serializers.serialize(object.lastError,
|
||||
specifiedType: const FullType(String)),
|
||||
|
|
@ -74,6 +77,10 @@ class _$AppStateSerializer implements StructuredSerializer<AppState> {
|
|||
result.isTesting = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
break;
|
||||
case 'dismissedNativeWarning':
|
||||
result.dismissedNativeWarning = serializers.deserialize(value,
|
||||
specifiedType: const FullType(bool)) as bool;
|
||||
break;
|
||||
case 'lastError':
|
||||
result.lastError = serializers.deserialize(value,
|
||||
specifiedType: const FullType(String)) as String;
|
||||
|
|
@ -115,6 +122,8 @@ class _$AppState extends AppState {
|
|||
@override
|
||||
final bool isTesting;
|
||||
@override
|
||||
final bool dismissedNativeWarning;
|
||||
@override
|
||||
final String lastError;
|
||||
@override
|
||||
final AuthState authState;
|
||||
|
|
@ -134,6 +143,7 @@ class _$AppState extends AppState {
|
|||
{this.isLoading,
|
||||
this.isSaving,
|
||||
this.isTesting,
|
||||
this.dismissedNativeWarning,
|
||||
this.lastError,
|
||||
this.authState,
|
||||
this.staticState,
|
||||
|
|
@ -144,6 +154,8 @@ class _$AppState extends AppState {
|
|||
BuiltValueNullFieldError.checkNotNull(isLoading, 'AppState', 'isLoading');
|
||||
BuiltValueNullFieldError.checkNotNull(isSaving, 'AppState', 'isSaving');
|
||||
BuiltValueNullFieldError.checkNotNull(isTesting, 'AppState', 'isTesting');
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
dismissedNativeWarning, 'AppState', 'dismissedNativeWarning');
|
||||
BuiltValueNullFieldError.checkNotNull(lastError, 'AppState', 'lastError');
|
||||
BuiltValueNullFieldError.checkNotNull(authState, 'AppState', 'authState');
|
||||
BuiltValueNullFieldError.checkNotNull(
|
||||
|
|
@ -168,6 +180,7 @@ class _$AppState extends AppState {
|
|||
isLoading == other.isLoading &&
|
||||
isSaving == other.isSaving &&
|
||||
isTesting == other.isTesting &&
|
||||
dismissedNativeWarning == other.dismissedNativeWarning &&
|
||||
lastError == other.lastError &&
|
||||
authState == other.authState &&
|
||||
staticState == other.staticState &&
|
||||
|
|
@ -186,9 +199,11 @@ class _$AppState extends AppState {
|
|||
$jc(
|
||||
$jc(
|
||||
$jc(
|
||||
$jc($jc(0, isLoading.hashCode),
|
||||
isSaving.hashCode),
|
||||
isTesting.hashCode),
|
||||
$jc(
|
||||
$jc($jc(0, isLoading.hashCode),
|
||||
isSaving.hashCode),
|
||||
isTesting.hashCode),
|
||||
dismissedNativeWarning.hashCode),
|
||||
lastError.hashCode),
|
||||
authState.hashCode),
|
||||
staticState.hashCode),
|
||||
|
|
@ -213,6 +228,11 @@ class AppStateBuilder implements Builder<AppState, AppStateBuilder> {
|
|||
bool get isTesting => _$this._isTesting;
|
||||
set isTesting(bool isTesting) => _$this._isTesting = isTesting;
|
||||
|
||||
bool _dismissedNativeWarning;
|
||||
bool get dismissedNativeWarning => _$this._dismissedNativeWarning;
|
||||
set dismissedNativeWarning(bool dismissedNativeWarning) =>
|
||||
_$this._dismissedNativeWarning = dismissedNativeWarning;
|
||||
|
||||
String _lastError;
|
||||
String get lastError => _$this._lastError;
|
||||
set lastError(String lastError) => _$this._lastError = lastError;
|
||||
|
|
@ -251,6 +271,7 @@ class AppStateBuilder implements Builder<AppState, AppStateBuilder> {
|
|||
_isLoading = $v.isLoading;
|
||||
_isSaving = $v.isSaving;
|
||||
_isTesting = $v.isTesting;
|
||||
_dismissedNativeWarning = $v.dismissedNativeWarning;
|
||||
_lastError = $v.lastError;
|
||||
_authState = $v.authState.toBuilder();
|
||||
_staticState = $v.staticState.toBuilder();
|
||||
|
|
@ -285,6 +306,8 @@ class AppStateBuilder implements Builder<AppState, AppStateBuilder> {
|
|||
isSaving, 'AppState', 'isSaving'),
|
||||
isTesting: BuiltValueNullFieldError.checkNotNull(
|
||||
isTesting, 'AppState', 'isTesting'),
|
||||
dismissedNativeWarning: BuiltValueNullFieldError.checkNotNull(
|
||||
dismissedNativeWarning, 'AppState', 'dismissedNativeWarning'),
|
||||
lastError: BuiltValueNullFieldError.checkNotNull(
|
||||
lastError, 'AppState', 'lastError'),
|
||||
authState: authState.build(),
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
|
@ -20,7 +19,6 @@ import 'package:invoiceninja_flutter/ui/app/forms/app_dropdown_button.dart';
|
|||
import 'package:invoiceninja_flutter/ui/app/icon_text.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/resources/cached_image.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/scrollable_listview.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/upgrade_dialog.dart';
|
||||
import 'package:invoiceninja_flutter/ui/system/update_dialog.dart';
|
||||
import 'package:invoiceninja_flutter/utils/dialogs.dart';
|
||||
import 'package:invoiceninja_flutter/utils/formatting.dart';
|
||||
|
|
@ -757,6 +755,14 @@ class SidebarFooter extends StatelessWidget {
|
|||
Icons.warning,
|
||||
color: Colors.orange,
|
||||
),
|
||||
)
|
||||
else if (!state.dismissedNativeWarning && false)
|
||||
IconButton(
|
||||
onPressed: () => null,
|
||||
icon: Icon(
|
||||
Icons.warning,
|
||||
color: Colors.orange,
|
||||
),
|
||||
),
|
||||
if (isHosted(context) && !isPaidAccount(context) && !isApple())
|
||||
IconButton(
|
||||
|
|
@ -766,6 +772,7 @@ class SidebarFooter extends StatelessWidget {
|
|||
icon: Icon(Icons.arrow_circle_up),
|
||||
color: Colors.green,
|
||||
onPressed: () async {
|
||||
/*
|
||||
if (isHosted(context) &&
|
||||
!kIsWeb &&
|
||||
(Platform.isIOS || Platform.isAndroid)) {
|
||||
|
|
@ -775,6 +782,7 @@ class SidebarFooter extends StatelessWidget {
|
|||
return UpgradeDialog();
|
||||
});
|
||||
}
|
||||
*/
|
||||
|
||||
if (isHosted(context)) {
|
||||
launch(state.userCompany.ninjaPortalUrl);
|
||||
|
|
|
|||
Loading…
Reference in New Issue