mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-14 05:52:51 +00:00
Merge branch 'beta'
This commit is contained in:
commit
6e01ace7b6
4 changed files with 240 additions and 267 deletions
|
@ -176,65 +176,6 @@ class _HomeState extends State<Home> {
|
|||
),
|
||||
|
||||
TopItemsLists(order: appConfigProvider.homeTopItemsOrder),
|
||||
|
||||
// if (width > 700) Column(
|
||||
// children: [
|
||||
// Wrap(
|
||||
// alignment: WrapAlignment.center,
|
||||
// children: appConfigProvider.homeTopItemsOrder.map((item) {
|
||||
// switch (item) {
|
||||
// case HomeTopItems.queriedDomains:
|
||||
// return Padding(
|
||||
// padding: const EdgeInsets.only(bottom: 16),
|
||||
// child: ConstrainedBox(
|
||||
// constraints: const BoxConstraints(
|
||||
// maxWidth: 500
|
||||
// ),
|
||||
// child: TopItems(
|
||||
// label: AppLocalizations.of(context)!.topQueriedDomains,
|
||||
// data: statusProvider.serverStatus!.stats.topQueriedDomains,
|
||||
// type: 'topQueriedDomains',
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
|
||||
// case HomeTopItems.blockedDomains:
|
||||
// return Padding(
|
||||
// padding: const EdgeInsets.only(bottom: 16),
|
||||
// child: ConstrainedBox(
|
||||
// constraints: const BoxConstraints(
|
||||
// maxWidth: 500
|
||||
// ),
|
||||
// child: TopItems(
|
||||
// label: AppLocalizations.of(context)!.topBlockedDomains,
|
||||
// data: statusProvider.serverStatus!.stats.topBlockedDomains,
|
||||
// type: 'topBlockedDomains',
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
|
||||
// case HomeTopItems.recurrentClients:
|
||||
// return Padding(
|
||||
// padding: const EdgeInsets.only(bottom: 16),
|
||||
// child: ConstrainedBox(
|
||||
// constraints: const BoxConstraints(
|
||||
// maxWidth: 500
|
||||
// ),
|
||||
// child: TopItems(
|
||||
// label: AppLocalizations.of(context)!.topClients,
|
||||
// data: statusProvider.serverStatus!.stats.topClients,
|
||||
// type: 'topClients',
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
|
||||
// default:
|
||||
// return const SizedBox();
|
||||
// }
|
||||
// }).toList(),
|
||||
// ),
|
||||
// ],
|
||||
// )
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -31,6 +31,8 @@ class _ManagementModalState extends State<ManagementModal> with SingleTickerProv
|
|||
late Animation<double> animation;
|
||||
final ExpandableController expandableController = ExpandableController();
|
||||
|
||||
final _chipsScrollController = ScrollController();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
expandableController.addListener(() async {
|
||||
|
@ -155,9 +157,19 @@ class _ManagementModalState extends State<ManagementModal> with SingleTickerProv
|
|||
|
||||
Widget bottomRow() {
|
||||
return Container(
|
||||
height: 40,
|
||||
height: Platform.isMacOS || Platform.isLinux || Platform.isWindows ? 50 : 40,
|
||||
margin: const EdgeInsets.only(top: 8),
|
||||
child: Scrollbar(
|
||||
controller: _chipsScrollController,
|
||||
thumbVisibility: Platform.isMacOS || Platform.isLinux || Platform.isWindows,
|
||||
interactive: Platform.isMacOS || Platform.isLinux || Platform.isWindows,
|
||||
thickness: Platform.isMacOS || Platform.isLinux || Platform.isWindows ? 8 : 0,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
bottom: Platform.isMacOS || Platform.isLinux || Platform.isWindows ? 16 : 0
|
||||
),
|
||||
child: ListView(
|
||||
controller: _chipsScrollController,
|
||||
scrollDirection: Axis.horizontal,
|
||||
children: [
|
||||
ActionChip(
|
||||
|
@ -196,6 +208,8 @@ class _ManagementModalState extends State<ManagementModal> with SingleTickerProv
|
|||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -157,16 +157,19 @@ class _TopItemsState extends State<TopItems> {
|
|||
const SizedBox(height: 24),
|
||||
|
||||
if (widget.data.isEmpty) noItems,
|
||||
if (widget.data.isNotEmpty && width > 700) SizedBox(
|
||||
height: 240,
|
||||
child: Row(
|
||||
if (widget.data.isNotEmpty && width > 700) Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: ConstrainedBox(
|
||||
constraints: const BoxConstraints(
|
||||
maxHeight: 250
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: chart,
|
||||
),
|
||||
)
|
||||
),
|
||||
Expanded(
|
||||
|
@ -180,18 +183,20 @@ class _TopItemsState extends State<TopItems> {
|
|||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
if (widget.data.isNotEmpty && width <= 700) ...[
|
||||
if (_showChart) ...[
|
||||
chart,
|
||||
SizedBox(
|
||||
height: 300,
|
||||
child: chart
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
],
|
||||
...itemsList,
|
||||
if (_showChart) OthersRowItem(items: widget.data)
|
||||
if (_showChart) OthersRowItem(items: widget.data),
|
||||
const SizedBox(height: 16),
|
||||
],
|
||||
|
||||
if (widget.data.length > 5) ...[
|
||||
const SizedBox(height: 20),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 20),
|
||||
child: Row(
|
||||
|
|
|
@ -129,7 +129,16 @@ class SettingsWidget extends StatelessWidget {
|
|||
)
|
||||
)
|
||||
],
|
||||
body: ListView(
|
||||
body: SafeArea(
|
||||
top: false,
|
||||
bottom: false,
|
||||
child: Builder(
|
||||
builder: (context) => CustomScrollView(
|
||||
slivers: [
|
||||
SliverOverlapInjector(
|
||||
handle: NestedScrollView.sliverOverlapAbsorberHandleFor(context),
|
||||
),
|
||||
SliverList.list(
|
||||
children: [
|
||||
if (
|
||||
serversProvider.selectedServer != null &&
|
||||
|
@ -281,6 +290,10 @@ class SettingsWidget extends StatelessWidget {
|
|||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
)
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue