mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 11:36:24 +00:00
Adds new setting to control whether HTTPs is "strict" or not
- "non strict" allows use of self-signed server certificates for example
This commit is contained in:
parent
eeb707a955
commit
38652cdba3
4 changed files with 43 additions and 13 deletions
|
|
@ -29,6 +29,7 @@ class _InvenTreeAppSettingsState extends State<InvenTreeAppSettingsWidget> {
|
|||
bool stockShowHistory = false;
|
||||
|
||||
bool reportErrors = true;
|
||||
bool strictHttps = false;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
|
@ -50,6 +51,7 @@ class _InvenTreeAppSettingsState extends State<InvenTreeAppSettingsWidget> {
|
|||
stockShowHistory = await InvenTreeSettingsManager().getValue(INV_STOCK_SHOW_HISTORY, false) as bool;
|
||||
|
||||
reportErrors = await InvenTreeSettingsManager().getValue(INV_REPORT_ERRORS, true) as bool;
|
||||
strictHttps = await InvenTreeSettingsManager().getValue(INV_STRICT_HTTPS, false) as bool;
|
||||
|
||||
setState(() {
|
||||
});
|
||||
|
|
@ -163,15 +165,29 @@ class _InvenTreeAppSettingsState extends State<InvenTreeAppSettingsWidget> {
|
|||
Divider(height: 1),
|
||||
ListTile(
|
||||
title: Text(
|
||||
L10().errorReporting,
|
||||
L10().appSettings,
|
||||
style: TextStyle(fontWeight: FontWeight.bold),
|
||||
),
|
||||
leading: FaIcon(FontAwesomeIcons.bug),
|
||||
leading: FaIcon(FontAwesomeIcons.mobile),
|
||||
),
|
||||
ListTile(
|
||||
title: Text(L10().strictHttps),
|
||||
subtitle: Text(L10().strictHttpsDetails),
|
||||
leading: FaIcon(FontAwesomeIcons.lock),
|
||||
trailing: Switch(
|
||||
value: strictHttps,
|
||||
onChanged: (bool value) {
|
||||
InvenTreeSettingsManager().setValue(INV_STRICT_HTTPS, value);
|
||||
setState(() {
|
||||
strictHttps = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
title: Text(L10().errorReportUpload),
|
||||
subtitle: Text(L10().errorReportUploadDetails),
|
||||
leading: FaIcon(FontAwesomeIcons.cloudUploadAlt),
|
||||
leading: FaIcon(FontAwesomeIcons.bug),
|
||||
trailing: Switch(
|
||||
value: reportErrors,
|
||||
onChanged: (bool value) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue