Correct upgrade icon button
This commit is contained in:
parent
1d4f3ed1b4
commit
5520f3da09
|
|
@ -6,6 +6,7 @@ import 'package:flutter/material.dart';
|
||||||
|
|
||||||
// Package imports:
|
// Package imports:
|
||||||
import 'package:flutter_redux/flutter_redux.dart';
|
import 'package:flutter_redux/flutter_redux.dart';
|
||||||
|
import 'package:invoiceninja_flutter/constants.dart';
|
||||||
|
|
||||||
// Project imports:
|
// Project imports:
|
||||||
import 'package:invoiceninja_flutter/data/models/account_model.dart';
|
import 'package:invoiceninja_flutter/data/models/account_model.dart';
|
||||||
|
|
@ -239,6 +240,20 @@ class _DashboardScreenState extends State<DashboardScreen>
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
actions: [
|
actions: [
|
||||||
|
if (state.userCompany.isOwner &&
|
||||||
|
state.isSelfHosted &&
|
||||||
|
!state.isDemo &&
|
||||||
|
!isPaidAccount(context) &&
|
||||||
|
!isApple())
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(right: 10),
|
||||||
|
child: IconButton(
|
||||||
|
tooltip: state.prefState.enableTooltips
|
||||||
|
? localization.upgrade
|
||||||
|
: null,
|
||||||
|
onPressed: () => launchUrl(Uri.parse(kWhiteLabelUrl)),
|
||||||
|
icon: Icon(Icons.arrow_circle_up)),
|
||||||
|
),
|
||||||
if (!kReleaseMode ||
|
if (!kReleaseMode ||
|
||||||
(kIsWeb &&
|
(kIsWeb &&
|
||||||
state.isSelfHosted &&
|
state.isSelfHosted &&
|
||||||
|
|
@ -275,21 +290,6 @@ class _DashboardScreenState extends State<DashboardScreen>
|
||||||
icon: Icon(MdiIcons.react),
|
icon: Icon(MdiIcons.react),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (state.userCompany.isOwner &&
|
|
||||||
state.isSelfHosted &&
|
|
||||||
!state.isDemo &&
|
|
||||||
!isPaidAccount(context) &&
|
|
||||||
!isApple())
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.only(right: 10),
|
|
||||||
child: IconButton(
|
|
||||||
tooltip: state.prefState.enableTooltips
|
|
||||||
? localization.upgrade
|
|
||||||
: null,
|
|
||||||
onPressed: () =>
|
|
||||||
launchUrl(Uri.parse(state.userCompany.ninjaPortalUrl)),
|
|
||||||
icon: Icon(Icons.arrow_circle_up)),
|
|
||||||
),
|
|
||||||
if (isMobile(context) || !state.prefState.isHistoryVisible)
|
if (isMobile(context) || !state.prefState.isHistoryVisible)
|
||||||
Builder(
|
Builder(
|
||||||
builder: (context) => IconButton(
|
builder: (context) => IconButton(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue