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

@@ -127,10 +127,37 @@ class ProxiesOverviewPage extends HookConsumerWidget with PresLogger {
), ),
], ],
), ),
floatingActionButton: FloatingActionButton( floatingActionButton: Builder(
onPressed: () async => notifier.urlTest(group.tag), builder: (context) {
tooltip: t.proxies.delayTestTooltip, final theme = Theme.of(context);
child: const Icon(FluentIcons.arrow_clockwise_24_filled), return Container(
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [
theme.colorScheme.primary,
theme.colorScheme.primary.withOpacity(0.8),
],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
),
borderRadius: BorderRadius.circular(16),
boxShadow: [
BoxShadow(
color: theme.colorScheme.primary.withOpacity(0.4),
blurRadius: 12,
offset: const Offset(0, 4),
),
],
),
child: FloatingActionButton(
onPressed: () async => notifier.urlTest(group.tag),
tooltip: t.proxies.delayTestTooltip,
backgroundColor: Colors.transparent,
elevation: 0,
child: const Icon(FluentIcons.arrow_clockwise_24_filled),
),
);
},
), ),
); );

View File

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