mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-06-28 20:09:51 +00:00
Small issue fixed
This commit is contained in:
parent
d9f68484e0
commit
aa403dedd8
1 changed files with 28 additions and 21 deletions
|
@ -25,6 +25,29 @@ class ActiveClientTile extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
void openOptionsModal() {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (context) => OptionsModal(
|
||||||
|
options: [
|
||||||
|
MenuOption(
|
||||||
|
title: AppLocalizations.of(context)!.copyClipboard,
|
||||||
|
icon: Icons.copy_rounded,
|
||||||
|
action: () {
|
||||||
|
copyToClipboard(
|
||||||
|
context: context,
|
||||||
|
value: client.name != ''
|
||||||
|
? client.name!
|
||||||
|
: client.ip,
|
||||||
|
successMessage: AppLocalizations.of(context)!.copiedClipboard,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
)
|
||||||
|
]
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (splitView == true) {
|
if (splitView == true) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||||
|
@ -51,27 +74,10 @@ class ActiveClientTile extends StatelessWidget {
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
borderRadius: BorderRadius.circular(28),
|
borderRadius: BorderRadius.circular(28),
|
||||||
onTap: () => onTap(client),
|
onTap: () => onTap(client),
|
||||||
onLongPress: () => showDialog(
|
onLongPress: () {
|
||||||
context: context,
|
Navigator.pop(context);
|
||||||
builder: (context) => OptionsModal(
|
openOptionsModal();
|
||||||
options: [
|
},
|
||||||
MenuOption(
|
|
||||||
title: AppLocalizations.of(context)!.copyClipboard,
|
|
||||||
icon: Icons.copy_rounded,
|
|
||||||
action: () {
|
|
||||||
copyToClipboard(
|
|
||||||
context: context,
|
|
||||||
value: client.name != ''
|
|
||||||
? client.name!
|
|
||||||
: client.ip,
|
|
||||||
successMessage: AppLocalizations.of(context)!.copiedClipboard,
|
|
||||||
);
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
)
|
|
||||||
]
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: Container(
|
child: Container(
|
||||||
width: double.maxFinite,
|
width: double.maxFinite,
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
|
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
|
||||||
|
@ -155,6 +161,7 @@ class ActiveClientTile extends StatelessWidget {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
onTap: () => onTap(client),
|
onTap: () => onTap(client),
|
||||||
|
onLongPress: openOptionsModal,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue