mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-04-19 05:19:11 +00:00
Ui improvements and iOS improvements
This commit is contained in:
parent
156b6a12e3
commit
a736516e7b
29 changed files with 245 additions and 161 deletions
|
@ -3,7 +3,7 @@
|
|||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 50;
|
||||
objectVersion = 54;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
|
@ -217,6 +217,7 @@
|
|||
};
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
alwaysOutOfDate = 1;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
|
@ -231,6 +232,7 @@
|
|||
};
|
||||
9740EEB61CF901F6004384FC /* Run Script */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
alwaysOutOfDate = 1;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
|
|
|
@ -104,6 +104,7 @@ class _ClientsWidgetState extends State<ClientsWidget> with TickerProviderStateM
|
|||
title: Text(AppLocalizations.of(context)!.clients),
|
||||
pinned: true,
|
||||
floating: true,
|
||||
centerTitle: false,
|
||||
forceElevated: innerBoxIsScrolled,
|
||||
actions: [
|
||||
if (serversProvider.clients.loadStatus == 1) ...[
|
||||
|
|
|
@ -68,20 +68,54 @@ class _TagsModalState extends State<TagsModal> {
|
|||
child: ListView.builder(
|
||||
shrinkWrap: true,
|
||||
itemCount: widget.tags.length,
|
||||
itemBuilder: (context, index) => CheckboxListTile(
|
||||
title: Text(
|
||||
widget.tags[index],
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.normal,
|
||||
color: Theme.of(context).colorScheme.onSurface
|
||||
itemBuilder: (context, index) => Material(
|
||||
color: Colors.transparent,
|
||||
child: InkWell(
|
||||
onTap: () => checkUncheckTag(!selectedTags.contains(widget.tags[index]), widget.tags[index]),
|
||||
child: Container(
|
||||
padding: const EdgeInsets.only(
|
||||
left: 24,
|
||||
top: 8,
|
||||
bottom: 8,
|
||||
right: 12
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
widget.tags[index],
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: Theme.of(context).colorScheme.onSurface,
|
||||
),
|
||||
),
|
||||
Checkbox(
|
||||
value: selectedTags.contains(widget.tags[index]),
|
||||
onChanged: (value) => checkUncheckTag(value!, widget.tags[index]),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(5)
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
value: selectedTags.contains(widget.tags[index]),
|
||||
checkboxShape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(5)
|
||||
),
|
||||
onChanged: (value) => checkUncheckTag(value!, widget.tags[index])
|
||||
)
|
||||
),
|
||||
// itemBuilder: (context, index) => CheckboxListTile(
|
||||
// title: Text(
|
||||
// widget.tags[index],
|
||||
// style: TextStyle(
|
||||
// fontWeight: FontWeight.normal,
|
||||
// color: Theme.of(context).colorScheme.onSurface
|
||||
// ),
|
||||
// ),
|
||||
// value: selectedTags.contains(widget.tags[index]),
|
||||
// checkboxShape: RoundedRectangleBorder(
|
||||
// borderRadius: BorderRadius.circular(5)
|
||||
// ),
|
||||
// onChanged: (value) => checkUncheckTag(value!, widget.tags[index])
|
||||
// )
|
||||
),
|
||||
),
|
||||
actions: [
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
|
@ -69,7 +71,7 @@ class _AddListModalState extends State<AddListModal> {
|
|||
return Padding(
|
||||
padding: MediaQuery.of(context).viewInsets,
|
||||
child: Container(
|
||||
height: 370,
|
||||
height: Platform.isIOS ? 386 : 370,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: const BorderRadius.only(
|
||||
topLeft: Radius.circular(28),
|
||||
|
@ -81,7 +83,7 @@ class _AddListModalState extends State<AddListModal> {
|
|||
children: [
|
||||
Expanded(
|
||||
child: ListView(
|
||||
physics: 410 < MediaQuery.of(context).size.height
|
||||
physics: (Platform.isIOS ? 426 : 410) < MediaQuery.of(context).size.height
|
||||
? const NeverScrollableScrollPhysics()
|
||||
: null,
|
||||
children: [
|
||||
|
@ -192,7 +194,8 @@ class _AddListModalState extends State<AddListModal> {
|
|||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
),
|
||||
if (Platform.isIOS) const SizedBox(height: 16)
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
@ -146,7 +146,12 @@ class _BlockedServicesScreenStateWidget extends State<BlockedServicesScreenWidge
|
|||
serversProvider.blockedServicesList.services![index]
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 28, vertical: 5),
|
||||
padding: const EdgeInsets.only(
|
||||
top: 6,
|
||||
bottom: 6,
|
||||
right: 12,
|
||||
left: 24
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
|
@ -5,9 +5,9 @@ import 'package:provider/provider.dart';
|
|||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
import 'package:adguard_home_manager/screens/filters/filters_list.dart';
|
||||
import 'package:adguard_home_manager/screens/filters/blocked_services_scren.dart';
|
||||
import 'package:adguard_home_manager/screens/filters/check_host_modal.dart';
|
||||
import 'package:adguard_home_manager/screens/filters/custom_rules_list.dart';
|
||||
import 'package:adguard_home_manager/screens/filters/blocked_services_screen.dart';
|
||||
import 'package:adguard_home_manager/screens/filters/update_interval_lists_modal.dart';
|
||||
|
||||
import 'package:adguard_home_manager/functions/snackbar.dart';
|
||||
|
@ -235,6 +235,7 @@ class _FiltersWidgetState extends State<FiltersWidget> with TickerProviderStateM
|
|||
pinned: true,
|
||||
floating: true,
|
||||
forceElevated: innerBoxIsScrolled,
|
||||
centerTitle: false,
|
||||
actions: serversProvider.filtering.loadStatus == 1 ? [
|
||||
IconButton(
|
||||
onPressed: enableDisableFiltering,
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
// ignore_for_file: use_build_context_synchronously
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
@ -301,7 +303,7 @@ class _ListDetailsScreenState extends State<ListDetailsScreen> {
|
|||
curve: Curves.easeInOut,
|
||||
bottom: fabVisible ?
|
||||
appConfigProvider.showingSnackbar
|
||||
? 70 : 20
|
||||
? 70 : (Platform.isIOS ? 40 : 20)
|
||||
: -70,
|
||||
right: 20,
|
||||
child: FloatingActionButton(
|
||||
|
|
|
@ -42,7 +42,7 @@ class _UpdateIntervalListsModalState extends State<UpdateIntervalListsModal> {
|
|||
return Padding(
|
||||
padding: mediaQueryData.viewInsets,
|
||||
child: Container(
|
||||
height: 390,
|
||||
height: Platform.isIOS ? 406 : 390,
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).dialogBackgroundColor,
|
||||
borderRadius: const BorderRadius.only(
|
||||
|
@ -55,7 +55,7 @@ class _UpdateIntervalListsModalState extends State<UpdateIntervalListsModal> {
|
|||
children: [
|
||||
Expanded(
|
||||
child: ListView(
|
||||
physics: 410 < MediaQuery.of(context).size.height
|
||||
physics: (Platform.isIOS ? 426 : 410) < MediaQuery.of(context).size.height
|
||||
? const NeverScrollableScrollPhysics()
|
||||
: null,
|
||||
children: [
|
||||
|
@ -298,7 +298,8 @@ class _UpdateIntervalListsModalState extends State<UpdateIntervalListsModal> {
|
|||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
),
|
||||
if (Platform.isIOS) const SizedBox(height: 16)
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
// ignore_for_file: use_build_context_synchronously
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
@ -123,7 +125,7 @@ class ManagementModal extends StatelessWidget {
|
|||
|
||||
return Container(
|
||||
width: double.maxFinite,
|
||||
height: 540,
|
||||
height: Platform.isIOS ? 556 : 540,
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).dialogBackgroundColor,
|
||||
borderRadius: const BorderRadius.only(
|
||||
|
@ -135,7 +137,7 @@ class ManagementModal extends StatelessWidget {
|
|||
children: [
|
||||
Expanded(
|
||||
child: ListView(
|
||||
physics: 540 < MediaQuery.of(context).size.height
|
||||
physics: (Platform.isIOS ? 556 : 540) < MediaQuery.of(context).size.height
|
||||
? const NeverScrollableScrollPhysics()
|
||||
: null,
|
||||
children: [
|
||||
|
@ -202,7 +204,8 @@ class ManagementModal extends StatelessWidget {
|
|||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
),
|
||||
if (Platform.isIOS) const SizedBox(height: 16)
|
||||
],
|
||||
),
|
||||
);
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
@ -48,15 +50,22 @@ class _ClientsModalState extends State<ClientsModal> {
|
|||
child: InkWell(
|
||||
onTap: () => onChanged(),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 8),
|
||||
padding: const EdgeInsets.only(
|
||||
left: 24,
|
||||
top: 8,
|
||||
right: 12,
|
||||
bottom: 8
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
label,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: Theme.of(context).colorScheme.onSurface
|
||||
Flexible(
|
||||
child: Text(
|
||||
label,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: Theme.of(context).colorScheme.onSurface
|
||||
),
|
||||
),
|
||||
),
|
||||
Checkbox(
|
||||
|
@ -88,7 +97,7 @@ class _ClientsModalState extends State<ClientsModal> {
|
|||
return Container(
|
||||
height: height >= (logsProvider.clients!.length*64) == true
|
||||
? logsProvider.clients!.length*64
|
||||
: height-25,
|
||||
: height-50,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: const BorderRadius.only(
|
||||
topLeft: Radius.circular(28),
|
||||
|
@ -164,7 +173,8 @@ class _ClientsModalState extends State<ClientsModal> {
|
|||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
),
|
||||
if (Platform.isIOS) const SizedBox(height: 16)
|
||||
],
|
||||
),
|
||||
);
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
@ -82,8 +84,8 @@ class _FilterStatusModalState extends State<FilterStatusModal> {
|
|||
}
|
||||
|
||||
return Container(
|
||||
height: height >= 720 == true
|
||||
? 720
|
||||
height: height >= (Platform.isIOS ? 736 : 720) == true
|
||||
? (Platform.isIOS ? 736 : 720)
|
||||
: height-25,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: const BorderRadius.only(
|
||||
|
@ -183,7 +185,8 @@ class _FilterStatusModalState extends State<FilterStatusModal> {
|
|||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
),
|
||||
if (Platform.isIOS) const SizedBox(height: 16)
|
||||
],
|
||||
),
|
||||
);
|
||||
|
|
|
@ -379,6 +379,7 @@ class _LogsWidgetState extends State<LogsWidget> {
|
|||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(AppLocalizations.of(context)!.logs),
|
||||
centerTitle: false,
|
||||
actions: [
|
||||
logsProvider.loadStatus == 1
|
||||
? IconButton(
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
@ -122,7 +124,7 @@ class _LogsConfigModalWidgetState extends State<LogsConfigModalWidget> {
|
|||
children: [
|
||||
Expanded(
|
||||
child: ListView(
|
||||
physics: 420 < MediaQuery.of(context).size.height
|
||||
physics: (Platform.isIOS ? 436 : 420) < MediaQuery.of(context).size.height
|
||||
? const NeverScrollableScrollPhysics()
|
||||
: null,
|
||||
children: [
|
||||
|
@ -178,54 +180,61 @@ class _LogsConfigModalWidgetState extends State<LogsConfigModalWidget> {
|
|||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Material(
|
||||
color: Colors.transparent,
|
||||
child: InkWell(
|
||||
onTap: () => setState(() => anonymizeClientIp = !anonymizeClientIp),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 30),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
AppLocalizations.of(context)!.anonymizeClientIp,
|
||||
style: const TextStyle(
|
||||
fontSize: 16
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 14),
|
||||
child: Column(
|
||||
children: [
|
||||
Material(
|
||||
color: Colors.transparent,
|
||||
child: InkWell(
|
||||
onTap: () => setState(() => anonymizeClientIp = !anonymizeClientIp),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 30),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
AppLocalizations.of(context)!.anonymizeClientIp,
|
||||
style: const TextStyle(
|
||||
fontSize: 16
|
||||
),
|
||||
),
|
||||
Switch(
|
||||
value: anonymizeClientIp,
|
||||
onChanged: (value) => setState(() => anonymizeClientIp = value),
|
||||
activeColor: Theme.of(context).colorScheme.primary,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
Switch(
|
||||
value: anonymizeClientIp,
|
||||
onChanged: (value) => setState(() => anonymizeClientIp = value),
|
||||
activeColor: Theme.of(context).colorScheme.primary,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24),
|
||||
child: DropdownButtonFormField(
|
||||
items: retentionItems.map<DropdownMenuItem<String>>((Map<String, dynamic> item) {
|
||||
return DropdownMenuItem<String>(
|
||||
value: item['value'].toString(),
|
||||
child: Text(item['label']),
|
||||
);
|
||||
}).toList(),
|
||||
value: retentionTime,
|
||||
onChanged: (value) => setState(() => retentionTime = value),
|
||||
decoration: InputDecoration(
|
||||
border: const OutlineInputBorder(
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(10)
|
||||
)
|
||||
const SizedBox(height: 16),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24),
|
||||
child: DropdownButtonFormField(
|
||||
items: retentionItems.map<DropdownMenuItem<String>>((Map<String, dynamic> item) {
|
||||
return DropdownMenuItem<String>(
|
||||
value: item['value'].toString(),
|
||||
child: Text(item['label']),
|
||||
);
|
||||
}).toList(),
|
||||
value: retentionTime,
|
||||
onChanged: (value) => setState(() => retentionTime = value),
|
||||
decoration: InputDecoration(
|
||||
border: const OutlineInputBorder(
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(10)
|
||||
)
|
||||
),
|
||||
label: Text(AppLocalizations.of(context)!.retentionTime)
|
||||
),
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
),
|
||||
),
|
||||
label: Text(AppLocalizations.of(context)!.retentionTime)
|
||||
),
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -272,7 +281,8 @@ class _LogsConfigModalWidgetState extends State<LogsConfigModalWidget> {
|
|||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
),
|
||||
if (Platform.isIOS) const SizedBox(height: 16)
|
||||
],
|
||||
);
|
||||
|
||||
|
@ -310,7 +320,7 @@ class _LogsConfigModalWidgetState extends State<LogsConfigModalWidget> {
|
|||
}
|
||||
|
||||
return Container(
|
||||
height: 420,
|
||||
height: Platform.isIOS ? 436 : 420,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: const BorderRadius.only(
|
||||
topLeft: Radius.circular(28),
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
// ignore_for_file: use_build_context_synchronously
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
@ -283,7 +285,8 @@ class _LogsFiltersModalWidgetState extends State<LogsFiltersModalWidget> {
|
|||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
),
|
||||
if (Platform.isIOS) const SizedBox(height: 16)
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:expandable/expandable.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
|
@ -69,6 +71,7 @@ class _ServersState extends State<Servers> {
|
|||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(AppLocalizations.of(context)!.servers),
|
||||
centerTitle: false,
|
||||
),
|
||||
body: Stack(
|
||||
children: [
|
||||
|
@ -83,7 +86,7 @@ class _ServersState extends State<Servers> {
|
|||
curve: Curves.easeInOut,
|
||||
bottom: isVisible ?
|
||||
appConfigProvider.showingSnackbar
|
||||
? 70 : 20
|
||||
? 70 : (Platform.isIOS ? 40 : 20)
|
||||
: -70,
|
||||
right: 20,
|
||||
child: FloatingActionButton(
|
||||
|
|
|
@ -87,6 +87,7 @@ class _AccessSettingsWidgetState extends State<AccessSettingsWidget> with Ticker
|
|||
title: Text(AppLocalizations.of(context)!.accessSettings),
|
||||
pinned: true,
|
||||
floating: true,
|
||||
centerTitle: false,
|
||||
forceElevated: innerBoxIsScrolled,
|
||||
bottom: TabBar(
|
||||
controller: tabController,
|
||||
|
@ -112,45 +113,35 @@ class _AccessSettingsWidgetState extends State<AccessSettingsWidget> with Ticker
|
|||
)
|
||||
];
|
||||
}),
|
||||
body: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).scaffoldBackgroundColor,
|
||||
border: Border(
|
||||
top: BorderSide(
|
||||
color: Theme.of(context).colorScheme.onSurface.withOpacity(0.1)
|
||||
)
|
||||
)
|
||||
),
|
||||
child: TabBarView(
|
||||
controller: tabController,
|
||||
children: [
|
||||
ClientsList(
|
||||
type: 'allowed',
|
||||
scrollController: scrollController,
|
||||
loadStatus: serversProvider.clients.loadStatus,
|
||||
data: serversProvider.clients.loadStatus == 1
|
||||
? serversProvider.clients.data!.clientsAllowedBlocked!.allowedClients : [],
|
||||
fetchClients: fetchClients
|
||||
),
|
||||
ClientsList(
|
||||
type: 'disallowed',
|
||||
scrollController: scrollController,
|
||||
loadStatus: serversProvider.clients.loadStatus,
|
||||
data: serversProvider.clients.loadStatus == 1
|
||||
? serversProvider.clients.data!.clientsAllowedBlocked!.disallowedClients : [],
|
||||
fetchClients: fetchClients
|
||||
),
|
||||
ClientsList(
|
||||
type: 'domains',
|
||||
scrollController: scrollController,
|
||||
loadStatus: serversProvider.clients.loadStatus,
|
||||
data: serversProvider.clients.loadStatus == 1
|
||||
? serversProvider.clients.data!.clientsAllowedBlocked!.blockedHosts : [],
|
||||
fetchClients: fetchClients
|
||||
),
|
||||
]
|
||||
)
|
||||
),
|
||||
body: TabBarView(
|
||||
controller: tabController,
|
||||
children: [
|
||||
ClientsList(
|
||||
type: 'allowed',
|
||||
scrollController: scrollController,
|
||||
loadStatus: serversProvider.clients.loadStatus,
|
||||
data: serversProvider.clients.loadStatus == 1
|
||||
? serversProvider.clients.data!.clientsAllowedBlocked!.allowedClients : [],
|
||||
fetchClients: fetchClients
|
||||
),
|
||||
ClientsList(
|
||||
type: 'disallowed',
|
||||
scrollController: scrollController,
|
||||
loadStatus: serversProvider.clients.loadStatus,
|
||||
data: serversProvider.clients.loadStatus == 1
|
||||
? serversProvider.clients.data!.clientsAllowedBlocked!.disallowedClients : [],
|
||||
fetchClients: fetchClients
|
||||
),
|
||||
ClientsList(
|
||||
type: 'domains',
|
||||
scrollController: scrollController,
|
||||
loadStatus: serversProvider.clients.loadStatus,
|
||||
data: serversProvider.clients.loadStatus == 1
|
||||
? serversProvider.clients.data!.clientsAllowedBlocked!.blockedHosts : [],
|
||||
fetchClients: fetchClients
|
||||
),
|
||||
]
|
||||
)
|
||||
)
|
||||
),
|
||||
);
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
|
@ -66,7 +68,7 @@ class _AddClientModalState extends State<AddClientModal> {
|
|||
return Padding(
|
||||
padding: MediaQuery.of(context).viewInsets,
|
||||
child: Container(
|
||||
height: 305,
|
||||
height: Platform.isIOS ? 321 : 305,
|
||||
padding: const EdgeInsets.all(24),
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).dialogBackgroundColor,
|
||||
|
@ -79,7 +81,7 @@ class _AddClientModalState extends State<AddClientModal> {
|
|||
children: [
|
||||
Expanded(
|
||||
child: ListView(
|
||||
physics: 322 < MediaQuery.of(context).size.height
|
||||
physics: (Platform.isIOS ? 338 : 322) < MediaQuery.of(context).size.height
|
||||
? const NeverScrollableScrollPhysics()
|
||||
: null,
|
||||
children: [
|
||||
|
@ -146,7 +148,8 @@ class _AddClientModalState extends State<AddClientModal> {
|
|||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
),
|
||||
if (Platform.isIOS) const SizedBox(height: 16)
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
// ignore_for_file: use_build_context_synchronously
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
@ -317,7 +319,7 @@ class _ClientsListState extends State<ClientsList> {
|
|||
curve: Curves.easeInOut,
|
||||
bottom: isVisible ?
|
||||
appConfigProvider.showingSnackbar
|
||||
? 70 : 20
|
||||
? 70 : (Platform.isIOS ? 40 : 20)
|
||||
: -70,
|
||||
right: 20,
|
||||
child: FloatingActionButton(
|
||||
|
@ -341,7 +343,7 @@ class _ClientsListState extends State<ClientsList> {
|
|||
case 2:
|
||||
return SizedBox(
|
||||
width: double.maxFinite,
|
||||
height: MediaQuery.of(context).size.height-171,
|
||||
height: MediaQuery.of(context).size.height-101,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
|
|
|
@ -39,6 +39,7 @@ class AdvancedSettings extends StatelessWidget {
|
|||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(AppLocalizations.of(context)!.advancedSettings),
|
||||
centerTitle: false,
|
||||
),
|
||||
body: ListView(
|
||||
children: [
|
||||
|
|
|
@ -59,6 +59,7 @@ class _CustomizationWidgetState extends State<CustomizationWidget> {
|
|||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(AppLocalizations.of(context)!.customization),
|
||||
centerTitle: false,
|
||||
),
|
||||
body: ListView(
|
||||
children: [
|
||||
|
|
|
@ -765,6 +765,7 @@ class _DhcpWidgetState extends State<DhcpWidget> {
|
|||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(AppLocalizations.of(context)!.dhcpSettings),
|
||||
centerTitle: false,
|
||||
actions: selectedInterface != null ? [
|
||||
IconButton(
|
||||
onPressed: checkDataValid() == true
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
|
@ -137,20 +139,15 @@ class SelectInterfaceModal extends StatelessWidget {
|
|||
if (interfaces[index].ipv4Addresses.isNotEmpty) ...[
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
"${AppLocalizations.of(context)!.ipv4addresses}: ",
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant
|
||||
Flexible(
|
||||
child: Text(
|
||||
"${AppLocalizations.of(context)!.ipv4addresses}: ${interfaces[index].ipv4Addresses.join(', ')}",
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant
|
||||
),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
interfaces[index].ipv4Addresses.join(', '),
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
|
@ -158,20 +155,15 @@ class SelectInterfaceModal extends StatelessWidget {
|
|||
if (interfaces[index].ipv6Addresses.isNotEmpty) ...[
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
"${AppLocalizations.of(context)!.ipv4addresses}: ",
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant
|
||||
Flexible(
|
||||
child: Text(
|
||||
"${AppLocalizations.of(context)!.ipv6addresses}: ${interfaces[index].ipv6Addresses.join(', ')}",
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant
|
||||
),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
interfaces[index].ipv6Addresses.join(', '),
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
]
|
||||
|
@ -195,7 +187,8 @@ class SelectInterfaceModal extends StatelessWidget {
|
|||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
),
|
||||
if (Platform.isIOS) const SizedBox(height: 16)
|
||||
],
|
||||
),
|
||||
);
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
|
@ -51,7 +53,7 @@ class _AddDnsRewriteModalState extends State<AddDnsRewriteModal> {
|
|||
return Padding(
|
||||
padding: MediaQuery.of(context).viewInsets,
|
||||
child: Container(
|
||||
height: 400,
|
||||
height: Platform.isIOS ? 416 : 400,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: const BorderRadius.only(
|
||||
topLeft: Radius.circular(28),
|
||||
|
@ -63,7 +65,7 @@ class _AddDnsRewriteModalState extends State<AddDnsRewriteModal> {
|
|||
children: [
|
||||
Expanded(
|
||||
child: ListView(
|
||||
physics: 410 < MediaQuery.of(context).size.height
|
||||
physics: (Platform.isIOS ? 426 : 410) < MediaQuery.of(context).size.height
|
||||
? const NeverScrollableScrollPhysics()
|
||||
: null,
|
||||
children: [
|
||||
|
@ -155,7 +157,8 @@ class _AddDnsRewriteModalState extends State<AddDnsRewriteModal> {
|
|||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
),
|
||||
if (Platform.isIOS) const SizedBox(height: 16)
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
@ -283,6 +283,7 @@ class _DnsRewritesWidgetState extends State<DnsRewritesWidget> {
|
|||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(AppLocalizations.of(context)!.dnsRewrites),
|
||||
centerTitle: false,
|
||||
),
|
||||
body: generateBody(),
|
||||
floatingActionButton: FloatingActionButton(
|
||||
|
|
|
@ -630,6 +630,7 @@ class _EncryptionSettingsWidgetState extends State<EncryptionSettingsWidget> {
|
|||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(AppLocalizations.of(context)!.encryptionSettings),
|
||||
centerTitle: false,
|
||||
actions: [
|
||||
IconButton(
|
||||
onPressed: certKeyValidApi == 2 && validDataError != null
|
||||
|
|
|
@ -57,7 +57,8 @@ class GeneralSettings extends StatelessWidget {
|
|||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(AppLocalizations.of(context)!.generalSettings) ,
|
||||
title: Text(AppLocalizations.of(context)!.generalSettings),
|
||||
centerTitle: false,
|
||||
),
|
||||
body: ListView(
|
||||
children: [
|
||||
|
|
|
@ -179,6 +179,7 @@ class _ServerInformationWidgetState extends State<ServerInformationWidget> {
|
|||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(AppLocalizations.of(context)!.serverInformation),
|
||||
centerTitle: false,
|
||||
),
|
||||
body: generateBody()
|
||||
);
|
||||
|
|
|
@ -57,7 +57,10 @@ class Settings extends StatelessWidget {
|
|||
}
|
||||
|
||||
return Scaffold(
|
||||
appBar: const SettingsAppBar(),
|
||||
appBar: AppBar(
|
||||
title: Text(AppLocalizations.of(context)!.settings),
|
||||
centerTitle: false,
|
||||
),
|
||||
body: ListView(
|
||||
children: [
|
||||
if (serversProvider.selectedServer != null) ...[
|
||||
|
|
|
@ -85,7 +85,7 @@ class CustomListTile extends StatelessWidget {
|
|||
),
|
||||
),
|
||||
if (trailing != null) ...[
|
||||
const SizedBox(width: 10),
|
||||
const SizedBox(width: 16),
|
||||
trailing!
|
||||
]
|
||||
],
|
||||
|
|
Loading…
Add table
Reference in a new issue