mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-24 12:32:40 +08:00
@@ -176,64 +176,62 @@ class _FollowPageState extends State<FollowPage> {
|
||||
void _onHandleTag(int index, MemberTagItemModel item) {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return AlertDialog(
|
||||
clipBehavior: Clip.hardEdge,
|
||||
contentPadding: const EdgeInsets.symmetric(vertical: 12),
|
||||
content: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
ListTile(
|
||||
onTap: () {
|
||||
Get.back();
|
||||
String tagName = item.name!;
|
||||
showConfirmDialog(
|
||||
context: context,
|
||||
title: '编辑分组名称',
|
||||
content: TextFormField(
|
||||
autofocus: true,
|
||||
initialValue: tagName,
|
||||
onChanged: (value) => tagName = value,
|
||||
inputFormatters: [
|
||||
LengthLimitingTextInputFormatter(16),
|
||||
],
|
||||
decoration: const InputDecoration(
|
||||
border: OutlineInputBorder(),
|
||||
),
|
||||
builder: (context) => AlertDialog(
|
||||
clipBehavior: Clip.hardEdge,
|
||||
contentPadding: const EdgeInsets.symmetric(vertical: 12),
|
||||
content: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
ListTile(
|
||||
onTap: () {
|
||||
Get.back();
|
||||
String tagName = item.name!;
|
||||
showConfirmDialog(
|
||||
context: context,
|
||||
title: '编辑分组名称',
|
||||
content: TextFormField(
|
||||
autofocus: true,
|
||||
initialValue: tagName,
|
||||
onChanged: (value) => tagName = value,
|
||||
inputFormatters: [
|
||||
LengthLimitingTextInputFormatter(16),
|
||||
],
|
||||
decoration: const InputDecoration(
|
||||
border: OutlineInputBorder(),
|
||||
),
|
||||
onConfirm: () {
|
||||
if (tagName.isNotEmpty) {
|
||||
_followController.onUpdateTag(item, tagName);
|
||||
}
|
||||
},
|
||||
);
|
||||
},
|
||||
dense: true,
|
||||
title: const Text(
|
||||
'修改名称',
|
||||
style: TextStyle(fontSize: 14),
|
||||
),
|
||||
),
|
||||
onConfirm: () {
|
||||
if (tagName.isNotEmpty) {
|
||||
_followController.onUpdateTag(item, tagName);
|
||||
}
|
||||
},
|
||||
);
|
||||
},
|
||||
dense: true,
|
||||
title: const Text(
|
||||
'修改名称',
|
||||
style: TextStyle(fontSize: 14),
|
||||
),
|
||||
ListTile(
|
||||
onTap: () {
|
||||
Get.back();
|
||||
showConfirmDialog(
|
||||
context: context,
|
||||
title: '删除分组',
|
||||
content: '删除后,该分组下的用户依旧保留?',
|
||||
onConfirm: () => _followController.onDelTag(item.tagid!),
|
||||
);
|
||||
},
|
||||
dense: true,
|
||||
title: const Text(
|
||||
'删除分组',
|
||||
style: TextStyle(fontSize: 14),
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
onTap: () {
|
||||
Get.back();
|
||||
showConfirmDialog(
|
||||
context: context,
|
||||
title: '删除分组',
|
||||
content: '删除后,该分组下的用户依旧保留?',
|
||||
onConfirm: () => _followController.onDelTag(item.tagid!),
|
||||
);
|
||||
},
|
||||
dense: true,
|
||||
title: const Text(
|
||||
'删除分组',
|
||||
style: TextStyle(fontSize: 14),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user