backup: before home page modernization

This commit is contained in:
Hiddify User
2025-12-26 02:47:20 +03:00
parent 063f2464ee
commit 3b9d3ef2b7
2 changed files with 61 additions and 28 deletions

View File

@@ -20,14 +20,19 @@ class ProxyTile extends HookConsumerWidget with PresLogger {
Widget build(BuildContext context, WidgetRef ref) {
final theme = Theme.of(context);
return ListTile(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
title: Text(
proxy.name,
overflow: TextOverflow.ellipsis,
style: TextStyle(fontFamily: FontFamily.emoji),
),
leading: Padding(
return Card(
elevation: selected ? 3 : 1,
shadowColor: selected ? theme.colorScheme.primary.withOpacity(0.3) : null,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
margin: const EdgeInsets.symmetric(horizontal: 4, vertical: 3),
child: ListTile(
contentPadding: const EdgeInsets.symmetric(horizontal: 12, vertical: 4),
title: Text(
proxy.name,
overflow: TextOverflow.ellipsis,
style: TextStyle(fontFamily: FontFamily.emoji),
),
leading: Padding(
padding: const EdgeInsets.symmetric(vertical: 8),
child: Container(
width: 6,
@@ -58,22 +63,23 @@ class ProxyTile extends HookConsumerWidget with PresLogger {
)
: null,
selected: selected,
onTap: onSelect,
onLongPress: () async {
showDialog(
context: context,
builder: (context) => AlertDialog(
content: SelectionArea(child: Text(proxy.name)),
actions: [
TextButton(
onPressed: Navigator.of(context).pop,
child: Text(MaterialLocalizations.of(context).closeButtonLabel),
),
],
),
);
},
horizontalTitleGap: 4,
onTap: onSelect,
onLongPress: () async {
showDialog(
context: context,
builder: (context) => AlertDialog(
content: SelectionArea(child: Text(proxy.name)),
actions: [
TextButton(
onPressed: Navigator.of(context).pop,
child: Text(MaterialLocalizations.of(context).closeButtonLabel),
),
],
),
);
},
horizontalTitleGap: 4,
),
);
}