mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-15 19:55:27 +00:00
Change from fontawesome to tabler icons (#516)
* Change from fontawesome to tabler icons - Consistent with the frontend * Cleanup conflicts * Use double quotes * remove unused import * Update release notes * Migrate some google icons to tabler icons * Icon update * Properly support display of custom icons * Fix lookup
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
|
||||
import "package:flutter/material.dart";
|
||||
import "package:font_awesome_flutter/font_awesome_flutter.dart";
|
||||
import "package:flutter_tabler_icons/flutter_tabler_icons.dart";
|
||||
|
||||
import "package:inventree/api.dart";
|
||||
import "package:inventree/helpers.dart";
|
||||
@ -48,7 +48,7 @@ class _BillOfMaterialsState extends RefreshableState<BillOfMaterialsWidget> {
|
||||
@override
|
||||
List<Widget> appBarActions(BuildContext context) => [
|
||||
IconButton(
|
||||
icon: FaIcon(FontAwesomeIcons.filter),
|
||||
icon: Icon(TablerIcons.filter),
|
||||
onPressed: () async {
|
||||
setState(() {
|
||||
showFilterOptions = !showFilterOptions;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import "package:flutter/material.dart";
|
||||
import "package:flutter_speed_dial/flutter_speed_dial.dart";
|
||||
import "package:font_awesome_flutter/font_awesome_flutter.dart";
|
||||
import "package:flutter_tabler_icons/flutter_tabler_icons.dart";
|
||||
|
||||
import "package:inventree/app_colors.dart";
|
||||
import "package:inventree/l10.dart";
|
||||
@ -41,7 +41,7 @@ class _CategoryDisplayState extends RefreshableState<CategoryDisplayWidget> {
|
||||
if (InvenTreePartCategory().canEdit) {
|
||||
actions.add(
|
||||
IconButton(
|
||||
icon: Icon(Icons.edit_square),
|
||||
icon: Icon(TablerIcons.edit),
|
||||
tooltip: L10().editCategory,
|
||||
onPressed: () {
|
||||
_editCategoryDialog(context);
|
||||
@ -61,7 +61,7 @@ class _CategoryDisplayState extends RefreshableState<CategoryDisplayWidget> {
|
||||
if (InvenTreePart().canCreate) {
|
||||
actions.add(
|
||||
SpeedDialChild(
|
||||
child: FaIcon(FontAwesomeIcons.shapes),
|
||||
child: Icon(TablerIcons.box),
|
||||
label: L10().partCreateDetail,
|
||||
onTap: _newPart,
|
||||
)
|
||||
@ -71,7 +71,7 @@ class _CategoryDisplayState extends RefreshableState<CategoryDisplayWidget> {
|
||||
if (InvenTreePartCategory().canCreate) {
|
||||
actions.add(
|
||||
SpeedDialChild(
|
||||
child: FaIcon(FontAwesomeIcons.sitemap),
|
||||
child: Icon(TablerIcons.sitemap),
|
||||
label: L10().categoryCreateDetail,
|
||||
onTap: () {
|
||||
_newCategory(context);
|
||||
@ -123,7 +123,7 @@ class _CategoryDisplayState extends RefreshableState<CategoryDisplayWidget> {
|
||||
if (widget.category == null) {
|
||||
return Card(
|
||||
child: ListTile(
|
||||
leading: FaIcon(FontAwesomeIcons.shapes),
|
||||
leading: Icon(TablerIcons.packages),
|
||||
title: Text(
|
||||
L10().partCategoryTopLevel,
|
||||
style: TextStyle(fontStyle: FontStyle.italic),
|
||||
@ -138,7 +138,7 @@ class _CategoryDisplayState extends RefreshableState<CategoryDisplayWidget> {
|
||||
style: TextStyle(fontWeight: FontWeight.bold)
|
||||
),
|
||||
subtitle: Text("${widget.category?.description}"),
|
||||
leading: widget.category!.customIcon ?? FaIcon(FontAwesomeIcons.sitemap),
|
||||
leading: widget.category!.customIcon != null ? Icon(widget.category!.customIcon) : Icon(TablerIcons.sitemap)
|
||||
),
|
||||
];
|
||||
|
||||
@ -147,8 +147,8 @@ class _CategoryDisplayState extends RefreshableState<CategoryDisplayWidget> {
|
||||
ListTile(
|
||||
title: Text(L10().parentCategory),
|
||||
subtitle: Text("${widget.category?.parentPathString}"),
|
||||
leading: FaIcon(
|
||||
FontAwesomeIcons.turnUp,
|
||||
leading: Icon(
|
||||
TablerIcons.arrow_move_up,
|
||||
color: COLOR_ACTION,
|
||||
),
|
||||
onTap: () async {
|
||||
|
@ -98,7 +98,7 @@ class _PaginatedPartCategoryListState extends PaginatedSearchState<PaginatedPart
|
||||
title: Text(category.name),
|
||||
subtitle: Text(category.pathstring),
|
||||
trailing: Text("${category.partcount}"),
|
||||
leading: category.customIcon,
|
||||
leading: category.customIcon == null ? null : Icon(category.customIcon),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
|
@ -1,7 +1,6 @@
|
||||
import "package:flutter/material.dart";
|
||||
import "package:flutter_speed_dial/flutter_speed_dial.dart";
|
||||
|
||||
import "package:font_awesome_flutter/font_awesome_flutter.dart";
|
||||
import "package:flutter_tabler_icons/flutter_tabler_icons.dart";
|
||||
|
||||
import "package:inventree/app_colors.dart";
|
||||
import "package:inventree/barcode/barcode.dart";
|
||||
@ -74,7 +73,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||
if (InvenTreePart().canEdit) {
|
||||
actions.add(
|
||||
IconButton(
|
||||
icon: Icon(Icons.edit_square),
|
||||
icon: Icon(TablerIcons.edit),
|
||||
tooltip: L10().editPart,
|
||||
onPressed: () {
|
||||
_editPartDialog(context);
|
||||
@ -109,7 +108,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||
if (InvenTreeStockItem().canCreate) {
|
||||
actions.add(
|
||||
SpeedDialChild(
|
||||
child: FaIcon(FontAwesomeIcons.box),
|
||||
child: Icon(TablerIcons.packages),
|
||||
label: L10().stockItemCreate,
|
||||
onTap: () {
|
||||
_newStockItem(context);
|
||||
@ -121,7 +120,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||
if (labels.isNotEmpty) {
|
||||
actions.add(
|
||||
SpeedDialChild(
|
||||
child: FaIcon(FontAwesomeIcons.print),
|
||||
child: Icon(TablerIcons.printer),
|
||||
label: L10().printLabel,
|
||||
onTap: () async {
|
||||
selectAndPrintLabel(
|
||||
@ -329,8 +328,8 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||
color: COLOR_DANGER
|
||||
)
|
||||
),
|
||||
leading: FaIcon(
|
||||
FontAwesomeIcons.circleExclamation,
|
||||
leading: Icon(
|
||||
TablerIcons.exclamation_circle,
|
||||
color: COLOR_DANGER
|
||||
),
|
||||
)
|
||||
@ -363,7 +362,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||
ListTile(
|
||||
title: Text(L10().partCategory),
|
||||
subtitle: Text("${part.categoryName}"),
|
||||
leading: FaIcon(FontAwesomeIcons.sitemap, color: COLOR_ACTION),
|
||||
leading: Icon(TablerIcons.sitemap, color: COLOR_ACTION),
|
||||
onTap: () async {
|
||||
if (part.categoryId > 0) {
|
||||
|
||||
@ -384,7 +383,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||
ListTile(
|
||||
title: Text(L10().partCategory),
|
||||
subtitle: Text(L10().partCategoryTopLevel),
|
||||
leading: FaIcon(FontAwesomeIcons.sitemap, color: COLOR_ACTION),
|
||||
leading: Icon(TablerIcons.sitemap, color: COLOR_ACTION),
|
||||
onTap: () {
|
||||
Navigator.push(context, MaterialPageRoute(
|
||||
builder: (context) => CategoryDisplayWidget(null)));
|
||||
@ -398,7 +397,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text(L10().variants),
|
||||
leading: FaIcon(FontAwesomeIcons.shapes, color: COLOR_ACTION),
|
||||
leading: Icon(TablerIcons.versions, color: COLOR_ACTION),
|
||||
trailing: Text(variantCount.toString()),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
@ -421,7 +420,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||
ListTile(
|
||||
title: Text(L10().availableStock),
|
||||
subtitle: Text(L10().stockDetails),
|
||||
leading: FaIcon(FontAwesomeIcons.boxesStacked),
|
||||
leading: Icon(TablerIcons.packages),
|
||||
trailing: Text(
|
||||
part.stockString(),
|
||||
style: TextStyle(
|
||||
@ -439,7 +438,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||
ListTile(
|
||||
title: Text(L10().onOrder),
|
||||
subtitle: Text(L10().onOrderDetails),
|
||||
leading: FaIcon(FontAwesomeIcons.cartShopping),
|
||||
leading: Icon(TablerIcons.shopping_cart),
|
||||
trailing: Text("${part.onOrderString}"),
|
||||
onTap: () {
|
||||
// TODO - Order views
|
||||
@ -456,7 +455,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text(L10().billOfMaterials),
|
||||
leading: FaIcon(FontAwesomeIcons.tableList, color: COLOR_ACTION),
|
||||
leading: Icon(TablerIcons.list_tree, color: COLOR_ACTION),
|
||||
trailing: Text(bomCount.toString()),
|
||||
onTap: () {
|
||||
Navigator.push(context, MaterialPageRoute(
|
||||
@ -471,7 +470,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text(L10().building),
|
||||
leading: FaIcon(FontAwesomeIcons.screwdriverWrench),
|
||||
leading: Icon(TablerIcons.tools),
|
||||
trailing: Text("${simpleNumberString(part.building)}"),
|
||||
onTap: () {
|
||||
// TODO
|
||||
@ -487,7 +486,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||
ListTile(
|
||||
title: Text(L10().usedIn),
|
||||
subtitle: Text(L10().usedInDetails),
|
||||
leading: FaIcon(FontAwesomeIcons.layerGroup, color: COLOR_ACTION),
|
||||
leading: Icon(TablerIcons.stack_2, color: COLOR_ACTION),
|
||||
trailing: Text(usedInCount.toString()),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
@ -507,7 +506,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text("${part.keywords}"),
|
||||
leading: FaIcon(FontAwesomeIcons.tags),
|
||||
leading: Icon(TablerIcons.tags),
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -517,7 +516,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text("${part.link}"),
|
||||
leading: FaIcon(FontAwesomeIcons.link, color: COLOR_ACTION),
|
||||
leading: Icon(TablerIcons.link, color: COLOR_ACTION),
|
||||
onTap: () {
|
||||
part.openLink();
|
||||
},
|
||||
@ -532,7 +531,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||
ListTile(
|
||||
title: Text(L10().usedIn),
|
||||
subtitle: Text(L10().usedInDetails),
|
||||
leading: FaIcon(FontAwesomeIcons.sitemap),
|
||||
leading: Icon(TablerIcons.sitemap),
|
||||
trailing: Text("${part.usedInCount}"),
|
||||
onTap: () {
|
||||
// TODO
|
||||
@ -547,7 +546,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text(L10().suppliers),
|
||||
leading: FaIcon(FontAwesomeIcons.industry, color: COLOR_ACTION),
|
||||
leading: Icon(TablerIcons.building_factory, color: COLOR_ACTION),
|
||||
trailing: Text("${part.supplierCount}"),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
@ -566,7 +565,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text(L10().notes),
|
||||
leading: FaIcon(FontAwesomeIcons.noteSticky, color: COLOR_ACTION),
|
||||
leading: Icon(TablerIcons.note, color: COLOR_ACTION),
|
||||
trailing: Text(""),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
@ -580,7 +579,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text(L10().attachments),
|
||||
leading: FaIcon(FontAwesomeIcons.fileLines, color: COLOR_ACTION),
|
||||
leading: Icon(TablerIcons.file, color: COLOR_ACTION),
|
||||
trailing: attachmentCount > 0 ? Text(attachmentCount.toString()) : null,
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
|
@ -1,8 +1,7 @@
|
||||
import "dart:io";
|
||||
|
||||
import "package:flutter/material.dart";
|
||||
|
||||
import "package:font_awesome_flutter/font_awesome_flutter.dart";
|
||||
import "package:flutter_tabler_icons/flutter_tabler_icons.dart";
|
||||
|
||||
import "package:inventree/api.dart";
|
||||
import "package:inventree/inventree/part.dart";
|
||||
@ -47,7 +46,7 @@ class _PartImageState extends RefreshableState<PartImageWidget> {
|
||||
// File upload
|
||||
actions.add(
|
||||
IconButton(
|
||||
icon: FaIcon(FontAwesomeIcons.fileArrowUp),
|
||||
icon: Icon(TablerIcons.file_upload),
|
||||
onPressed: () async {
|
||||
|
||||
FilePickerDialog.pickFile(
|
||||
|
Reference in New Issue
Block a user