mirror of
https://github.com/lifegpc/eh_downloader_flutter.git
synced 2026-07-08 01:30:28 +08:00
Fix layout
This commit is contained in:
@@ -66,41 +66,24 @@ class UserCard extends StatelessWidget {
|
|||||||
onPressed: () => showDialog(
|
onPressed: () => showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
final maxWidth = MediaQuery.of(context).size.width;
|
return AlertDialog(
|
||||||
return Dialog(
|
title: Text(i18n.deleteUser),
|
||||||
child: Container(
|
content:
|
||||||
padding: maxWidth < 400
|
Text(i18n.deleteUserConfirm(user.username)),
|
||||||
? const EdgeInsets.symmetric(
|
actions: [
|
||||||
vertical: 20, horizontal: 10)
|
TextButton(
|
||||||
: const EdgeInsets.all(20),
|
onPressed: () {
|
||||||
decoration: BoxDecoration(
|
context.pop();
|
||||||
borderRadius:
|
_deleteUser(
|
||||||
BorderRadius.circular(10)),
|
user.id, i18n.failedDeleteUser);
|
||||||
width: maxWidth < 500 ? null : 500,
|
},
|
||||||
child: Column(
|
child: Text(i18n.yes)),
|
||||||
mainAxisSize: MainAxisSize.min,
|
TextButton(
|
||||||
children: [
|
onPressed: () {
|
||||||
Text(i18n
|
context.pop();
|
||||||
.deleteUserConfirm(user.username)),
|
},
|
||||||
Row(
|
child: Text(i18n.no)),
|
||||||
mainAxisAlignment:
|
]);
|
||||||
MainAxisAlignment.end,
|
|
||||||
children: [
|
|
||||||
TextButton(
|
|
||||||
onPressed: () {
|
|
||||||
context.pop();
|
|
||||||
_deleteUser(user.id,
|
|
||||||
i18n.failedDeleteUser);
|
|
||||||
},
|
|
||||||
child: Text(i18n.yes)),
|
|
||||||
TextButton(
|
|
||||||
onPressed: () {
|
|
||||||
context.pop();
|
|
||||||
},
|
|
||||||
child: Text(i18n.no)),
|
|
||||||
]),
|
|
||||||
],
|
|
||||||
)));
|
|
||||||
}),
|
}),
|
||||||
tooltip: i18n.delete,
|
tooltip: i18n.delete,
|
||||||
icon: const Icon(Icons.delete))
|
icon: const Icon(Icons.delete))
|
||||||
|
|||||||
@@ -224,5 +224,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"failedDeleteUser": "Failed to delete user: "
|
"failedDeleteUser": "Failed to delete user: ",
|
||||||
|
"deleteUser": "Delete user"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -224,5 +224,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"failedDeleteUser": "删除用户失败:"
|
"failedDeleteUser": "删除用户失败:",
|
||||||
|
"deleteUser": "删除用户"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ class _UsersPage extends State<UsersPage> with ThemeModeWidget, IsTopWidget2 {
|
|||||||
maxCrossAxisExtent: 360.0,
|
maxCrossAxisExtent: 360.0,
|
||||||
mainAxisSpacing: 10.0,
|
mainAxisSpacing: 10.0,
|
||||||
crossAxisSpacing: 10.0,
|
crossAxisSpacing: 10.0,
|
||||||
childAspectRatio: 4.0,
|
mainAxisExtent: 80.0,
|
||||||
),
|
),
|
||||||
delegate: SliverChildBuilderDelegate(
|
delegate: SliverChildBuilderDelegate(
|
||||||
(BuildContext context, int index) {
|
(BuildContext context, int index) {
|
||||||
|
|||||||
Reference in New Issue
Block a user