2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-12 02:05:29 +00:00

Refactor colors used in the app

This commit is contained in:
Oliver
2021-07-23 12:57:56 +10:00
parent 7a6457f870
commit 1e4e75dfb7
7 changed files with 63 additions and 17 deletions

View File

@ -1,3 +1,4 @@
import 'package:inventree/app_colors.dart';
import 'package:inventree/widget/dialogs.dart';
import 'package:inventree/widget/fields.dart';
import 'package:inventree/widget/spinner.dart';
@ -219,7 +220,7 @@ class _InvenTreeLoginSettingsState extends State<InvenTreeLoginSettingsWidget> {
if ((InvenTreeAPI().profile?.key ?? '') != profile.key) {
return FaIcon(
FontAwesomeIcons.questionCircle,
color: Color.fromRGBO(250, 150, 50, 1)
color: COLOR_WARNING
);
}
@ -227,17 +228,17 @@ class _InvenTreeLoginSettingsState extends State<InvenTreeLoginSettingsWidget> {
if (InvenTreeAPI().isConnected()) {
return FaIcon(
FontAwesomeIcons.checkCircle,
color: Color.fromRGBO(50, 250, 50, 1)
color: COLOR_SUCCESS
);
} else if (InvenTreeAPI().isConnecting()) {
return Spinner(
icon: FontAwesomeIcons.spinner,
color: Color.fromRGBO(50, 50, 250, 1),
color: COLOR_PROGRESS,
);
} else {
return FaIcon(
FontAwesomeIcons.timesCircle,
color: Color.fromRGBO(250, 50, 50, 1),
color: COLOR_DANGER,
);
}
}
@ -255,7 +256,7 @@ class _InvenTreeLoginSettingsState extends State<InvenTreeLoginSettingsWidget> {
title: Text(
profile.name,
),
tileColor: profile.selected ? Color.fromRGBO(0, 0, 0, 0.05) : null,
tileColor: profile.selected ? COLOR_SELECTED : null,
subtitle: Text("${profile.server}"),
trailing: _getProfileIcon(profile),
onTap: () {