mirror of
https://github.com/inventree/inventree-app.git
synced 2025-08-21 03:15:56 +00:00
Add icons for settings views (#679)
This commit is contained in:
@@ -5,6 +5,7 @@ import "package:inventree/settings/release.dart";
|
|||||||
import "package:flutter/material.dart";
|
import "package:flutter/material.dart";
|
||||||
import "package:flutter/services.dart";
|
import "package:flutter/services.dart";
|
||||||
import "package:flutter_tabler_icons/flutter_tabler_icons.dart";
|
import "package:flutter_tabler_icons/flutter_tabler_icons.dart";
|
||||||
|
import "package:inventree/widget/link_icon.dart";
|
||||||
import "package:package_info_plus/package_info_plus.dart";
|
import "package:package_info_plus/package_info_plus.dart";
|
||||||
|
|
||||||
import "package:inventree/l10.dart";
|
import "package:inventree/l10.dart";
|
||||||
@@ -182,6 +183,7 @@ class InvenTreeAboutWidget extends StatelessWidget {
|
|||||||
title: Text(L10().releaseNotes),
|
title: Text(L10().releaseNotes),
|
||||||
subtitle: Text(L10().appReleaseNotes),
|
subtitle: Text(L10().appReleaseNotes),
|
||||||
leading: Icon(TablerIcons.file, color: COLOR_ACTION),
|
leading: Icon(TablerIcons.file, color: COLOR_ACTION),
|
||||||
|
trailing: LinkIcon(),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
_releaseNotes(context);
|
_releaseNotes(context);
|
||||||
},
|
},
|
||||||
@@ -193,6 +195,7 @@ class InvenTreeAboutWidget extends StatelessWidget {
|
|||||||
title: Text(L10().credits),
|
title: Text(L10().credits),
|
||||||
subtitle: Text(L10().appCredits),
|
subtitle: Text(L10().appCredits),
|
||||||
leading: Icon(TablerIcons.balloon, color: COLOR_ACTION),
|
leading: Icon(TablerIcons.balloon, color: COLOR_ACTION),
|
||||||
|
trailing: LinkIcon(),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
_credits(context);
|
_credits(context);
|
||||||
},
|
},
|
||||||
@@ -204,6 +207,7 @@ class InvenTreeAboutWidget extends StatelessWidget {
|
|||||||
title: Text(L10().documentation),
|
title: Text(L10().documentation),
|
||||||
subtitle: Text(DOCS_URL),
|
subtitle: Text(DOCS_URL),
|
||||||
leading: Icon(TablerIcons.book, color: COLOR_ACTION),
|
leading: Icon(TablerIcons.book, color: COLOR_ACTION),
|
||||||
|
trailing: LinkIcon(external: true),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
_openDocs();
|
_openDocs();
|
||||||
},
|
},
|
||||||
@@ -215,6 +219,7 @@ class InvenTreeAboutWidget extends StatelessWidget {
|
|||||||
title: Text(L10().translate),
|
title: Text(L10().translate),
|
||||||
subtitle: Text(L10().translateHelp),
|
subtitle: Text(L10().translateHelp),
|
||||||
leading: Icon(TablerIcons.language, color: COLOR_ACTION),
|
leading: Icon(TablerIcons.language, color: COLOR_ACTION),
|
||||||
|
trailing: LinkIcon(external: true),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
_translate();
|
_translate();
|
||||||
},
|
},
|
||||||
@@ -226,6 +231,7 @@ class InvenTreeAboutWidget extends StatelessWidget {
|
|||||||
title: Text(L10().reportBug),
|
title: Text(L10().reportBug),
|
||||||
subtitle: Text(L10().reportBugDescription),
|
subtitle: Text(L10().reportBugDescription),
|
||||||
leading: Icon(TablerIcons.bug, color: COLOR_ACTION),
|
leading: Icon(TablerIcons.bug, color: COLOR_ACTION),
|
||||||
|
trailing: LinkIcon(external: true),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
_reportBug(context);
|
_reportBug(context);
|
||||||
},
|
},
|
||||||
|
@@ -14,6 +14,8 @@ import "package:inventree/settings/part_settings.dart";
|
|||||||
import "package:inventree/settings/purchase_order_settings.dart";
|
import "package:inventree/settings/purchase_order_settings.dart";
|
||||||
import "package:inventree/settings/sales_order_settings.dart";
|
import "package:inventree/settings/sales_order_settings.dart";
|
||||||
|
|
||||||
|
import "package:inventree/widget/link_icon.dart";
|
||||||
|
|
||||||
// InvenTree settings view
|
// InvenTree settings view
|
||||||
class InvenTreeSettingsWidget extends StatefulWidget {
|
class InvenTreeSettingsWidget extends StatefulWidget {
|
||||||
@override
|
@override
|
||||||
@@ -50,6 +52,7 @@ class _InvenTreeSettingsState extends State<InvenTreeSettingsWidget> {
|
|||||||
title: Text(L10().server),
|
title: Text(L10().server),
|
||||||
subtitle: Text(L10().configureServer),
|
subtitle: Text(L10().configureServer),
|
||||||
leading: Icon(TablerIcons.server, color: COLOR_ACTION),
|
leading: Icon(TablerIcons.server, color: COLOR_ACTION),
|
||||||
|
trailing: LinkIcon(),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
@@ -64,6 +67,7 @@ class _InvenTreeSettingsState extends State<InvenTreeSettingsWidget> {
|
|||||||
title: Text(L10().appSettings),
|
title: Text(L10().appSettings),
|
||||||
subtitle: Text(L10().appSettingsDetails),
|
subtitle: Text(L10().appSettingsDetails),
|
||||||
leading: Icon(TablerIcons.settings, color: COLOR_ACTION),
|
leading: Icon(TablerIcons.settings, color: COLOR_ACTION),
|
||||||
|
trailing: LinkIcon(),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
@@ -77,6 +81,7 @@ class _InvenTreeSettingsState extends State<InvenTreeSettingsWidget> {
|
|||||||
title: Text(L10().homeScreen),
|
title: Text(L10().homeScreen),
|
||||||
subtitle: Text(L10().homeScreenSettings),
|
subtitle: Text(L10().homeScreenSettings),
|
||||||
leading: Icon(TablerIcons.home, color: COLOR_ACTION),
|
leading: Icon(TablerIcons.home, color: COLOR_ACTION),
|
||||||
|
trailing: LinkIcon(),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
@@ -90,6 +95,7 @@ class _InvenTreeSettingsState extends State<InvenTreeSettingsWidget> {
|
|||||||
title: Text(L10().barcodes),
|
title: Text(L10().barcodes),
|
||||||
subtitle: Text(L10().barcodeSettings),
|
subtitle: Text(L10().barcodeSettings),
|
||||||
leading: Icon(TablerIcons.barcode, color: COLOR_ACTION),
|
leading: Icon(TablerIcons.barcode, color: COLOR_ACTION),
|
||||||
|
trailing: LinkIcon(),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
@@ -103,6 +109,7 @@ class _InvenTreeSettingsState extends State<InvenTreeSettingsWidget> {
|
|||||||
title: Text(L10().part),
|
title: Text(L10().part),
|
||||||
subtitle: Text(L10().partSettings),
|
subtitle: Text(L10().partSettings),
|
||||||
leading: Icon(TablerIcons.box, color: COLOR_ACTION),
|
leading: Icon(TablerIcons.box, color: COLOR_ACTION),
|
||||||
|
trailing: LinkIcon(),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
@@ -116,6 +123,7 @@ class _InvenTreeSettingsState extends State<InvenTreeSettingsWidget> {
|
|||||||
title: Text(L10().purchaseOrder),
|
title: Text(L10().purchaseOrder),
|
||||||
subtitle: Text(L10().purchaseOrderSettings),
|
subtitle: Text(L10().purchaseOrderSettings),
|
||||||
leading: Icon(TablerIcons.shopping_cart, color: COLOR_ACTION),
|
leading: Icon(TablerIcons.shopping_cart, color: COLOR_ACTION),
|
||||||
|
trailing: LinkIcon(),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
@@ -130,6 +138,7 @@ class _InvenTreeSettingsState extends State<InvenTreeSettingsWidget> {
|
|||||||
title: Text(L10().salesOrder),
|
title: Text(L10().salesOrder),
|
||||||
subtitle: Text(L10().salesOrderSettings),
|
subtitle: Text(L10().salesOrderSettings),
|
||||||
leading: Icon(TablerIcons.truck, color: COLOR_ACTION),
|
leading: Icon(TablerIcons.truck, color: COLOR_ACTION),
|
||||||
|
trailing: LinkIcon(),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
@@ -143,6 +152,7 @@ class _InvenTreeSettingsState extends State<InvenTreeSettingsWidget> {
|
|||||||
ListTile(
|
ListTile(
|
||||||
title: Text(L10().about),
|
title: Text(L10().about),
|
||||||
leading: Icon(TablerIcons.info_circle, color: COLOR_ACTION),
|
leading: Icon(TablerIcons.info_circle, color: COLOR_ACTION),
|
||||||
|
trailing: LinkIcon(),
|
||||||
onTap: _about,
|
onTap: _about,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
Reference in New Issue
Block a user