mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-04-21 06:19:10 +00:00
Fix desktop and sliver app bar add client
This commit is contained in:
parent
ad6cb92d4b
commit
ce8d38958e
2 changed files with 91 additions and 69 deletions
|
@ -235,9 +235,16 @@ class _ClientScreenState extends State<ClientScreen> {
|
|||
|
||||
|
||||
if (widget.fullScreen == true) {
|
||||
return Dialog.fullscreen(
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
return Material(
|
||||
child: NestedScrollView(
|
||||
headerSliverBuilder: (context, innerBoxIsScrolled) => [
|
||||
SliverOverlapAbsorber(
|
||||
handle: NestedScrollView.sliverOverlapAbsorberHandleFor(context),
|
||||
sliver: SliverAppBar.large(
|
||||
pinned: true,
|
||||
floating: true,
|
||||
centerTitle: false,
|
||||
forceElevated: innerBoxIsScrolled,
|
||||
leading: IconButton(
|
||||
onPressed: () => Navigator.pop(context),
|
||||
icon: const Icon(Icons.close)
|
||||
|
@ -248,10 +255,19 @@ class _ClientScreenState extends State<ClientScreen> {
|
|||
: AppLocalizations.of(context)!.addClient
|
||||
),
|
||||
actions: actions(),
|
||||
),
|
||||
)
|
||||
)
|
||||
],
|
||||
body: SafeArea(
|
||||
child: ListView(
|
||||
controller: _scrollController,
|
||||
top: false,
|
||||
bottom: true,
|
||||
child: Builder(
|
||||
builder: (context) => CustomScrollView(
|
||||
slivers: [
|
||||
SliverOverlapInjector(
|
||||
handle: NestedScrollView.sliverOverlapAbsorberHandleFor(context),
|
||||
),
|
||||
SliverList.list(
|
||||
children: [
|
||||
if (!_nameValid || !_identifiersValid || !_dnsCacheValid) _Errors(
|
||||
nameValid: _nameValid,
|
||||
|
@ -298,8 +314,11 @@ class _ClientScreenState extends State<ClientScreen> {
|
|||
setBlockedServicesSchedule: (v) => setState(() => _blockedServicesSchedule = v),
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
)
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -148,11 +148,14 @@ class LogTile extends StatelessWidget {
|
|||
}
|
||||
|
||||
void openAddClient() {
|
||||
openClientFormModal(
|
||||
Future.delayed(
|
||||
const Duration(milliseconds: 0),
|
||||
() => openClientFormModal(
|
||||
context: context,
|
||||
width: MediaQuery.of(context).size.width,
|
||||
onConfirm: confirmAddClient,
|
||||
initialData: ClientInitialData(name: "Client ${log.client}", ip: log.client)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue