Notifications
This commit is contained in:
parent
c8aa9a018b
commit
09cd34b1a3
|
|
@ -28,7 +28,6 @@ abstract class AccountEntity
|
|||
@BuiltValueField(wireName: 'latest_version')
|
||||
String get latestVersion;
|
||||
|
||||
@nullable
|
||||
@BuiltValueField(wireName: 'current_version')
|
||||
String get currentVersion;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_redux/flutter_redux.dart';
|
||||
import 'package:invoiceninja_flutter/constants.dart';
|
||||
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/form_card.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/forms/app_dropdown_button.dart';
|
||||
|
|
|
|||
|
|
@ -456,6 +456,7 @@ class SidebarFooter extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
final state = StoreProvider.of<AppState>(context).state;
|
||||
final localization = AppLocalization.of(context);
|
||||
final account = state.userCompany.account;
|
||||
|
||||
return Container(
|
||||
color: Theme.of(context).bottomAppBarColor,
|
||||
|
|
@ -465,7 +466,7 @@ class SidebarFooter extends StatelessWidget {
|
|||
if (state.prefState.isMenuCollapsed) ...[
|
||||
Expanded(child: SizedBox())
|
||||
] else ...[
|
||||
if (true || isSelfHosted(context))
|
||||
if (account.currentVersion != account.latestVersion)
|
||||
IconButton(
|
||||
icon: Icon(
|
||||
Icons.warning,
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@ class _UpdateDialogState extends State<UpdateDialog> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final localization = AppLocalization.of(context);
|
||||
final state = StoreProvider.of<AppState>(context).state;
|
||||
final account = state.userCompany.account;
|
||||
|
||||
return AlertDialog(
|
||||
title: Text(localization.updateAvailable),
|
||||
|
|
@ -44,8 +46,11 @@ class _UpdateDialogState extends State<UpdateDialog> {
|
|||
children: <Widget>[
|
||||
Text(localization.aNewVersionIsAvailable),
|
||||
SizedBox(height: 20),
|
||||
Text('• ${localization.currentVersion}: v$kAppVersion'),
|
||||
//Text('• ${localization.latestVersion}: v???'),
|
||||
Text(
|
||||
'• ${localization.currentVersion}: v${account.currentVersion}'),
|
||||
SizedBox(height: 6),
|
||||
Text(
|
||||
'• ${localization.latestVersion}: v${account.latestVersion}'),
|
||||
],
|
||||
),
|
||||
actions: <Widget>[
|
||||
|
|
|
|||
Loading…
Reference in New Issue