mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-04 12:24:47 +00:00
Added create and remove static lease and restore leases
This commit is contained in:
parent
b48c2a8d3b
commit
8f8ef05a3f
9 changed files with 724 additions and 20 deletions
44
lib/screens/settings/dhcp/delete_static_lease_modal.dart
Normal file
44
lib/screens/settings/dhcp/delete_static_lease_modal.dart
Normal file
|
@ -0,0 +1,44 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
class DeleteStaticLeaseModal extends StatelessWidget {
|
||||
final void Function() onConfirm;
|
||||
|
||||
const DeleteStaticLeaseModal({
|
||||
Key? key,
|
||||
required this.onConfirm
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AlertDialog(
|
||||
title: Column(
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.delete_rounded,
|
||||
size: 26,
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
Text(
|
||||
AppLocalizations.of(context)!.deleteStaticLease,
|
||||
textAlign: TextAlign.center,
|
||||
)
|
||||
],
|
||||
),
|
||||
content: Text(AppLocalizations.of(context)!.deleteStaticLeaseDescription),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(context),
|
||||
child: Text(AppLocalizations.of(context)!.cancel)
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
onConfirm();
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Text(AppLocalizations.of(context)!.confirm)
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue