mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-27 04:07:14 +00:00
Fixed issue on post requests
This commit is contained in:
parent
97a25fb8e9
commit
441dad441d
5 changed files with 24 additions and 7 deletions
|
@ -154,5 +154,6 @@
|
||||||
"selectAll": "Select all",
|
"selectAll": "Select all",
|
||||||
"unselectAll": "Unselect all",
|
"unselectAll": "Unselect all",
|
||||||
"all": "All",
|
"all": "All",
|
||||||
"filtered": "Filtered"
|
"filtered": "Filtered",
|
||||||
|
"checkAppLogs": "Check app logs"
|
||||||
}
|
}
|
|
@ -154,5 +154,6 @@
|
||||||
"selectAll": "Seleccionar todo",
|
"selectAll": "Seleccionar todo",
|
||||||
"unselectAll": "Deseleccionar todo",
|
"unselectAll": "Deseleccionar todo",
|
||||||
"all": "Todas",
|
"all": "Todas",
|
||||||
"filtered": "Filtrada"
|
"filtered": "Filtrada",
|
||||||
|
"checkAppLogs": "Comprueba los logs de la app"
|
||||||
}
|
}
|
|
@ -5,6 +5,7 @@ import 'package:provider/provider.dart';
|
||||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||||
|
|
||||||
import 'package:adguard_home_manager/screens/settings/custom_list_tile.dart';
|
import 'package:adguard_home_manager/screens/settings/custom_list_tile.dart';
|
||||||
|
import 'package:adguard_home_manager/screens/app_logs/app_logs.dart';
|
||||||
|
|
||||||
import 'package:adguard_home_manager/providers/app_config_provider.dart';
|
import 'package:adguard_home_manager/providers/app_config_provider.dart';
|
||||||
|
|
||||||
|
@ -58,6 +59,24 @@ class AdvancedSettings extends StatelessWidget {
|
||||||
right: 10
|
right: 10
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
CustomListTile(
|
||||||
|
leadingIcon: Icons.list_rounded,
|
||||||
|
label: AppLocalizations.of(context)!.logs,
|
||||||
|
description: AppLocalizations.of(context)!.checkAppLogs,
|
||||||
|
onTap: () => {
|
||||||
|
Navigator.of(context).push(
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder: (context) => const AppLogs()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
},
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
top: 10,
|
||||||
|
bottom: 10,
|
||||||
|
left: 20,
|
||||||
|
right: 10
|
||||||
|
)
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -94,10 +94,6 @@ class Settings extends StatelessWidget {
|
||||||
CustomListTile(
|
CustomListTile(
|
||||||
label: AppLocalizations.of(context)!.appVersion,
|
label: AppLocalizations.of(context)!.appVersion,
|
||||||
description: appConfigProvider.getAppInfo!.version,
|
description: appConfigProvider.getAppInfo!.version,
|
||||||
onDoubleTap: () => Navigator.of(context).push(
|
|
||||||
MaterialPageRoute(builder: (context) => const AppLogs())
|
|
||||||
),
|
|
||||||
disableRipple: true,
|
|
||||||
),
|
),
|
||||||
CustomListTile(
|
CustomListTile(
|
||||||
label: AppLocalizations.of(context)!.createdBy,
|
label: AppLocalizations.of(context)!.createdBy,
|
||||||
|
|
|
@ -36,7 +36,7 @@ Future<http.Response> postRequest({
|
||||||
headers: {
|
headers: {
|
||||||
'Authorization': 'Basic ${server.authToken}'
|
'Authorization': 'Basic ${server.authToken}'
|
||||||
},
|
},
|
||||||
body: body ?? stringBody
|
body: (body != null ? jsonEncode(body) : null) ?? stringBody
|
||||||
).timeout(const Duration(seconds: 10));
|
).timeout(const Duration(seconds: 10));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue